Package org.hobbit.core.rabbit
Class SimpleFileReceiver
java.lang.Object
org.hobbit.core.rabbit.SimpleFileReceiver
- Author:
- Michael Röder (roeder@informatik.uni-leipzig.de)
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected QueueingConsumerprotected static final longprotected intprotected ExecutorServiceprotected Map<String,FileReceiveState> private static final org.slf4j.Loggerprotected RabbitQueueprotected booleanprotected long -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSimpleFileReceiver(RabbitQueue queue, QueueingConsumer consumer) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidclose()static SimpleFileReceivercreate(RabbitQueue queue) static SimpleFileReceivercreate(RabbitQueueFactory factory, String queueName) voidintprotected voidString[]receiveData(String outputDirectory) voidsetWaitingForMsgTimeout(long waitingForMsgTimeout) void
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
DEFAULT_TIMEOUT
protected static final long DEFAULT_TIMEOUT- See Also:
-
consumer
-
queue
-
fileStates
-
terminated
protected boolean terminated -
errorCount
protected int errorCount -
executor
-
waitingForMsgTimeout
protected long waitingForMsgTimeout
-
-
Constructor Details
-
SimpleFileReceiver
-
-
Method Details
-
create
public static SimpleFileReceiver create(RabbitQueueFactory factory, String queueName) throws IOException - Throws:
IOException
-
create
- Throws:
IOException
-
receiveData
public String[] receiveData(String outputDirectory) throws IOException, com.rabbitmq.client.ShutdownSignalException, com.rabbitmq.client.ConsumerCancelledException, InterruptedException - Throws:
IOExceptioncom.rabbitmq.client.ShutdownSignalExceptioncom.rabbitmq.client.ConsumerCancelledExceptionInterruptedException
-
terminate
public void terminate() -
forceTermination
public void forceTermination() -
increaseErrorCount
protected void increaseErrorCount() -
getErrorCount
public int getErrorCount() -
setWaitingForMsgTimeout
public void setWaitingForMsgTimeout(long waitingForMsgTimeout) -
close
protected void close()
-