public interface InterceptorRegistry
EventInterceptors
and facilitates the introduction of EventInterceptors to EventDispatchers.
Registering an EventInterceptor will cause it to be introduced to all
currently registered and future EventDispatchers. EventInterceptors
can assume responsibility for determining whether or not to bind to each
EventDispatcher by implementing
EventDispatcherAwareInterceptor.introduceEventDispatcher(java.lang.String, com.tangosol.net.events.EventDispatcher).
The semantics of how to act upon discovering a duplicate interceptor, based
on identifier, can be prescribed via the RegistrationBehavior enum.
| Modifier and Type | Method and Description |
|---|---|
EventInterceptor<?> |
getEventInterceptor(String sIdentifier)
Return a registered
EventInterceptor. |
String |
registerEventInterceptor(EventInterceptor<?> interceptor)
Register an
EventInterceptor uniquely identified based on the
presence of an annotation or default to the fully qualified class name. |
String |
registerEventInterceptor(EventInterceptor<?> interceptor,
RegistrationBehavior behavior)
Register an
EventInterceptor uniquely identified based on the
presence of an annotation or default to the fully qualified class name. |
String |
registerEventInterceptor(String sIdentifier,
EventInterceptor<?> interceptor,
RegistrationBehavior behavior)
Register a uniquely identified
EventInterceptor. |
void |
unregisterEventInterceptor(String sIdentifier)
Unregister an
EventInterceptor, and remove it from all EventDispatchers. |
String registerEventInterceptor(EventInterceptor<?> interceptor)
EventInterceptor uniquely identified based on the
presence of an annotation or default to the fully qualified class name. The
EventInterceptor will be introduced to all current and future
EventDispatchers.interceptor - the EventInterceptor to registerIllegalArgumentException - if an EventInterceptor with the
same identifier is already registeredString registerEventInterceptor(EventInterceptor<?> interceptor, RegistrationBehavior behavior)
EventInterceptor uniquely identified based on the
presence of an annotation or default to the fully qualified class name. The RegistrationBehavior specifies how to act upon registering a duplicate
interceptor. The EventInterceptor will be introduced to all current and
future EventDispatchers.interceptor - the EventInterceptor to registerbehavior - the behavior enacted upon discovering duplicate
interceptorsIllegalArgumentException - if an EventInterceptor with the
same identifier is already registeredString registerEventInterceptor(String sIdentifier, EventInterceptor<?> interceptor, RegistrationBehavior behavior)
EventInterceptor. The
EventInterceptor will be introduced to all current and future
EventDispatchers.sIdentifier - the unique name identifying the EventInterceptorinterceptor - the EventInterceptor to registerbehavior - the behavior enacted upon discovering duplicate
interceptorsIllegalArgumentException - if an EventInterceptor with the same
identifier is already registeredvoid unregisterEventInterceptor(String sIdentifier)
EventInterceptor, and remove it from all EventDispatchers.sIdentifier - the unique identifier of the interceptor to unregisterEventInterceptor<?> getEventInterceptor(String sIdentifier)
EventInterceptor.