public class ReplayQueueEventProxy extends java.lang.Object implements QueueEventProxy, QueueListener
Constructor and Description |
---|
ReplayQueueEventProxy() |
Modifier and Type | Method and Description |
---|---|
void |
addQueueListener(QueueListener listener)
Add a
QueueListener that will be notified on events
relative to the observed QueueService . |
void |
enlisted(JobInfo info)
Invoked when a job is just being enlisted (before processing).
|
void |
executed(JobInfo info,
java.lang.Object result)
Invoked when a job's execution is finished successfully.
|
void |
failed(JobInfo info,
java.lang.Throwable throwable)
Invoked when a job's execution is finished with error.
|
void |
removeQueueListener(QueueListener listener)
Remove a
QueueListener from the observed QueueService . |
void |
started(JobInfo info)
Invoked when a job's execution is just about to be started.
|
public void addQueueListener(QueueListener listener)
QueueEventProxy
QueueListener
that will be notified on events
relative to the observed QueueService
.addQueueListener
in interface QueueEventProxy
listener
- added listenerpublic void removeQueueListener(QueueListener listener)
QueueEventProxy
QueueListener
from the observed QueueService
.removeQueueListener
in interface QueueEventProxy
listener
- removed listenerpublic void enlisted(JobInfo info)
QueueListener
JobInfo.getEnlistmentTime()
and JobInfo.getWaitDuration()
provides meaningful values.
Note that waitDuration
value is re-evaluated at each call.enlisted
in interface QueueListener
info
- The job being enlistedpublic void started(JobInfo info)
QueueListener
JobInfo.getEnlistmentTime()
, JobInfo.getWaitDuration()
, JobInfo.getStartTime()
and JobInfo.getExecutionDuration()
provides meaningful values.
Note that executionDuration
value is re-evaluated at each call.started
in interface QueueListener
info
- The job being startedpublic void executed(JobInfo info, java.lang.Object result)
QueueListener
result
(memory leak).executed
in interface QueueListener
info
- The executed jobresult
- The job's resultpublic void failed(JobInfo info, java.lang.Throwable throwable)
QueueListener
throwable
(memory leak).failed
in interface QueueListener
info
- The failed jobthrowable
- The job's thrown exceptionCopyright © 2006-2014 The Apache Software Foundation. All Rights Reserved.