public abstract class AbstractDeadlineManager extends Object implements DeadlineManager
DeadlineManager to be implemented by concrete solutions for the
DeadlineManager. Provides functionality to perform a call to the DeadlineManager in the
UnitOfWork.Phase#PREPARE_COMMIT phase. This #runOnPrepareCommitOrNow(Runnable) functionality is required, as
the DeadlineManager schedules a Message which needs to happen on order with the
other messages published throughout the system.| Constructor and Description |
|---|
AbstractDeadlineManager() |
| Modifier and Type | Method and Description |
|---|---|
protected List<MessageDispatchInterceptor<? super DeadlineMessage<?>>> |
dispatchInterceptors()
Provides a list of registered dispatch interceptors.
|
protected List<MessageHandlerInterceptor<? super DeadlineMessage<?>>> |
handlerInterceptors()
Provides a list of registered handler interceptors.
|
protected <T> DeadlineMessage<T> |
processDispatchInterceptors(DeadlineMessage<T> message)
Applies registered
MessageDispatchInterceptors to the given message. |
Registration |
registerDispatchInterceptor(MessageDispatchInterceptor<? super DeadlineMessage<?>> dispatchInterceptor)
Register the given DispatchInterceptor.
|
Registration |
registerHandlerInterceptor(MessageHandlerInterceptor<? super DeadlineMessage<?>> handlerInterceptor)
Register the given
handlerInterceptor. |
protected void |
runOnPrepareCommitOrNow(Runnable deadlineCall)
Run a given
deadlineCall immediately, or schedule it for the UnitOfWork.Phase#PREPARE_COMMIT
phase if a UnitOfWork is active. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcancelAll, cancelSchedule, schedule, schedule, schedule, schedule, schedule, scheduleprotected void runOnPrepareCommitOrNow(Runnable deadlineCall)
deadlineCall immediately, or schedule it for the UnitOfWork.Phase#PREPARE_COMMIT
phase if a UnitOfWork is active. This is required as the DeadlineManager schedule message which we want to happen
on order with other message being handled.deadlineCall - a Runnable to be executed now or on prepare commit if a UnitOfWork is activepublic Registration registerDispatchInterceptor(MessageDispatchInterceptor<? super DeadlineMessage<?>> dispatchInterceptor)
MessageDispatchInterceptorSupportregisterDispatchInterceptor in interface MessageDispatchInterceptorSupport<DeadlineMessage<?>>dispatchInterceptor - The interceptor to registerpublic Registration registerHandlerInterceptor(MessageHandlerInterceptor<? super DeadlineMessage<?>> handlerInterceptor)
MessageHandlerInterceptorSupporthandlerInterceptor. After registration, the interceptor will be invoked for each
handled Message on the messaging component that it was registered to, prior to invoking the message's handler.registerHandlerInterceptor in interface MessageHandlerInterceptorSupport<DeadlineMessage<?>>handlerInterceptor - The interceptor to registerprotected List<MessageDispatchInterceptor<? super DeadlineMessage<?>>> dispatchInterceptors()
protected List<MessageHandlerInterceptor<? super DeadlineMessage<?>>> handlerInterceptors()
protected <T> DeadlineMessage<T> processDispatchInterceptors(DeadlineMessage<T> message)
MessageDispatchInterceptors to the given message.T - the type of deadline message payloadmessage - the deadline message to be interceptedCopyright © 2010–2018. All rights reserved.