Package com.tangosol.net.events
Interface InterceptorRegistry
-
public interface InterceptorRegistryAn InterceptorRegistry manages the registration ofEventInterceptors and facilitates the introduction of EventInterceptors toEventDispatchers.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
RegistrationBehaviorenum.- Since:
- Coherence 12.1.2
- Author:
- rhan, nsa, mwj, rhl, hr 2011.03.29
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description EventInterceptor<?>getEventInterceptor(String sIdentifier)Return a registeredEventInterceptor.StringregisterEventInterceptor(EventInterceptor<?> interceptor)Register anEventInterceptoruniquely identified based on the presence of anannotationor default to the fully qualified class name.StringregisterEventInterceptor(EventInterceptor<?> interceptor, RegistrationBehavior behavior)Register anEventInterceptoruniquely identified based on the presence of anannotationor default to the fully qualified class name.StringregisterEventInterceptor(String sIdentifier, EventInterceptor<?> interceptor, RegistrationBehavior behavior)Register a uniquely identifiedEventInterceptor.voidunregisterEventInterceptor(String sIdentifier)Unregister anEventInterceptor, and remove it from allEventDispatchers.
-
-
-
Method Detail
-
registerEventInterceptor
String registerEventInterceptor(EventInterceptor<?> interceptor)
Register anEventInterceptoruniquely identified based on the presence of anannotationor default to the fully qualified class name. The EventInterceptor will be introduced to all current and futureEventDispatchers.- Parameters:
interceptor- the EventInterceptor to register- Returns:
- a string identifier used to register the interceptor
- Throws:
IllegalArgumentException- if an EventInterceptor with the same identifier is already registered
-
registerEventInterceptor
String registerEventInterceptor(EventInterceptor<?> interceptor, RegistrationBehavior behavior)
Register anEventInterceptoruniquely identified based on the presence of anannotationor default to the fully qualified class name. TheRegistrationBehaviorspecifies how to act upon registering a duplicate interceptor. The EventInterceptor will be introduced to all current and futureEventDispatchers.- Parameters:
interceptor- the EventInterceptor to registerbehavior- the behavior enacted upon discovering duplicate interceptors- Returns:
- a string identifier used to register the interceptor
- Throws:
IllegalArgumentException- if an EventInterceptor with the same identifier is already registered
-
registerEventInterceptor
String registerEventInterceptor(String sIdentifier, EventInterceptor<?> interceptor, RegistrationBehavior behavior)
Register a uniquely identifiedEventInterceptor. The EventInterceptor will be introduced to all current and futureEventDispatchers.- Parameters:
sIdentifier- the unique name identifying the EventInterceptorinterceptor- the EventInterceptor to registerbehavior- the behavior enacted upon discovering duplicate interceptors- Throws:
IllegalArgumentException- if an EventInterceptor with the same identifier is already registered
-
unregisterEventInterceptor
void unregisterEventInterceptor(String sIdentifier)
Unregister anEventInterceptor, and remove it from allEventDispatchers.- Parameters:
sIdentifier- the unique identifier of the interceptor to unregister
-
getEventInterceptor
EventInterceptor<?> getEventInterceptor(String sIdentifier)
Return a registeredEventInterceptor.- Returns:
- sIdentifier the unique identifier of the interceptor
-
-