public class CallbackManager
extends java.lang.Object
Although this costs an additional thread, it is worth for the benefit of isolation.
| Constructor and Description |
|---|
CallbackManager(MessageFactory factory,
Timer timer) |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy() |
void |
notifyAfterRun(Job job,
int result) |
void |
notifyCancelResult(CancelResult result,
CancelResult.AsyncCancelCallback callback) |
void |
notifyOnAdded(Job job) |
void |
notifyOnCancel(Job job,
boolean byCancelRequest,
java.lang.Throwable throwable) |
void |
notifyOnDone(Job job) |
void |
notifyOnRun(Job job,
int result) |
boolean |
waitUntilAllMessagesAreConsumed(int seconds)
convenience method to wait for existing callbacks to be consumed
|
public CallbackManager(MessageFactory factory, Timer timer)
public boolean waitUntilAllMessagesAreConsumed(int seconds)
public void notifyOnRun(@NonNull
Job job,
int result)
public void notifyAfterRun(@NonNull
Job job,
int result)
public void notifyOnCancel(@NonNull
Job job,
boolean byCancelRequest,
@Nullable
java.lang.Throwable throwable)
public void notifyOnAdded(@NonNull
Job job)
public void notifyOnDone(@NonNull
Job job)
public void notifyCancelResult(@NonNull
CancelResult result,
@NonNull
CancelResult.AsyncCancelCallback callback)
public void destroy()