public abstract class AbstractProcessor<T> extends Object implements HosebirdMessageProcessor
| Modifier and Type | Field and Description |
|---|---|
static long |
DEFAULT_OFFER_TIMEOUT_MILLIS |
protected long |
offerTimeoutMillis |
protected BlockingQueue<T> |
queue |
| Constructor and Description |
|---|
AbstractProcessor(BlockingQueue<T> queue) |
AbstractProcessor(BlockingQueue<T> queue,
long offerTimeoutMillis) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
process() |
protected abstract T |
processNextMessage() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetuppublic static final long DEFAULT_OFFER_TIMEOUT_MILLIS
protected final BlockingQueue<T> queue
protected final long offerTimeoutMillis
public AbstractProcessor(BlockingQueue<T> queue)
public AbstractProcessor(BlockingQueue<T> queue, long offerTimeoutMillis)
public boolean process()
throws IOException,
InterruptedException
process in interface HosebirdMessageProcessorIOExceptionInterruptedException@Nullable protected abstract T processNextMessage() throws IOException
IOExceptionCopyright © 2014. All Rights Reserved.