public class SimpleFileQueueConsumer extends Object implements Closeable
| Modifier and Type | Field and Description |
|---|---|
private String |
outputDir |
private org.hobbit.core.rabbit.SimpleFileReceiver |
receiver |
private Thread |
thread |
| Constructor and Description |
|---|
SimpleFileQueueConsumer(org.hobbit.core.rabbit.RabbitQueueFactory queueFactory,
String queueName)
Initializes consuming of messages coming through specified queue.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Terminates the receiving and waits until remaining data is processed.
|
private static String |
getTempDir() |
void |
handle(String[] files)
Abstract method which is called when receiving is terminated.
|
private String outputDir
private org.hobbit.core.rabbit.SimpleFileReceiver receiver
private Thread thread
public SimpleFileQueueConsumer(org.hobbit.core.rabbit.RabbitQueueFactory queueFactory,
String queueName)
throws IOException
queueFactory - factory to create queues withqueueName - name of the queueIOExceptionprivate static String getTempDir() throws IOException
IOExceptionpublic void close()
close in interface Closeableclose in interface AutoCloseablepublic void handle(String[] files)
files - array of file names receivedCopyright © 2019–2020. All rights reserved.