public abstract class AbstractQueueItemHandler<Q,T,R> extends java.lang.Object implements QueueItemHandler<Q,T,R>
| Constructor and Description |
|---|
AbstractQueueItemHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
onComplete(Q queueItem)
Called whether the processing results in success or failure on the
queue item processing thread.
|
void |
onError(Q queueItem,
java.lang.Throwable throwable)
Called when an Exception occurs while processing the given queue item on
the queue item processing thread.
|
void |
onSuccess(Q queueItem,
R result)
Called when processing completes successfully on the queue item processing
thread.
|
void |
withFuture(Q queueItem,
java.util.concurrent.Future<org.apache.commons.lang3.tuple.Pair<Q,R>> future)
Called after the queue item is retrieved off of the queue and handed off to
an Executor for processing.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconvert, processpublic void onSuccess(Q queueItem, R result)
QueueItemHandleronSuccess in interface QueueItemHandler<Q,T,R>queueItem - the original queue item that was successfully processedresult - the result returned from successful queue item handlingpublic void onError(Q queueItem, java.lang.Throwable throwable)
QueueItemHandleronError in interface QueueItemHandler<Q,T,R>queueItem - the queue item receivedthrowable - the error that occurred while trying to process the queue itempublic void onComplete(Q queueItem)
QueueItemHandleronComplete in interface QueueItemHandler<Q,T,R>queueItem - the original queue item being handledpublic void withFuture(Q queueItem, java.util.concurrent.Future<org.apache.commons.lang3.tuple.Pair<Q,R>> future)
QueueItemHandlerwithFuture in interface QueueItemHandler<Q,T,R>queueItem - the queue item to be processedfuture - the Future created after submitting the handling task to the executor