Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.1.0

E22843-01


com.tangosol.net.events
Class AbstractEventInterceptor

java.lang.Object
  extended by com.tangosol.net.events.AbstractEventInterceptor

All Implemented Interfaces:
EventInterceptor

public abstract class AbstractEventInterceptor
extends java.lang.Object
implements EventInterceptor

An abstract base implementation of EventInterceptor.

Since:
Coherence 3.7.1
Author:
mwj, rhan, nsa, rhl 2011.03.29

Field Summary
protected  boolean m_fFirst
          Flag indicating whether this EventInterceptor should be added at the head of the EventDispatcher's interceptor chain.
protected  java.util.Set m_setTypes
          The set of event types that this EventInterceptor subscribes to.

 

Constructor Summary
protected AbstractEventInterceptor()
          Construct an EventInterceptor that subscribes to all events registering at the end of the interceptor chain.
protected AbstractEventInterceptor(boolean fFirst)
          Construct an EventInterceptor that subscribes to all events.
protected AbstractEventInterceptor(java.util.Set setTypes, boolean fFirst)
          Construct an EventInterceptor with specified Event types and chain position.

 

Method Summary
abstract  boolean evaluate(EventDispatcher dispatcher)
          Evaluate whether this EventInterceptor should be registered with the specified EventDispatcher.
 java.util.Set getEventTypes()
          Return the set of event types that this EventInterceptor subscribes to.
 void introduceEventDispatcher(java.lang.String sIdentifier, EventDispatcher dispatcher)
          Introduce and possibly bind this EventInterceptor to the specified EventDispatcher.
 boolean isFirst()
          Return true iff this EventInterceptor should be added to the head of the EventDispatcher's chain of EventInterceptors.

 

Methods inherited from interface com.tangosol.net.events.EventInterceptor
onEvent

 

Field Detail

m_fFirst

protected boolean m_fFirst
Flag indicating whether this EventInterceptor should be added at the head of the EventDispatcher's interceptor chain.

m_setTypes

protected java.util.Set m_setTypes
The set of event types that this EventInterceptor subscribes to.

Constructor Detail

AbstractEventInterceptor

protected AbstractEventInterceptor()
Construct an EventInterceptor that subscribes to all events registering at the end of the interceptor chain.

AbstractEventInterceptor

protected AbstractEventInterceptor(boolean fFirst)
Construct an EventInterceptor that subscribes to all events.
Parameters:
fFirst - true iff the EventInterceptor is to be added to the head of the EventDispatcher interceptor chain

AbstractEventInterceptor

protected AbstractEventInterceptor(java.util.Set setTypes,
                                   boolean fFirst)
Construct an EventInterceptor with specified Event types and chain position.
Parameters:
setTypes - the set of Event types this interceptor subscribes to, or null to subscribe to all events
fFirst - true iff the EventInterceptor is to be added to the head of the EventDispatcher interceptor chain

Method Detail

introduceEventDispatcher

public void introduceEventDispatcher(java.lang.String sIdentifier,
                                     EventDispatcher dispatcher)
Introduce and possibly bind this EventInterceptor to the specified EventDispatcher.

Note that EventInterceptors are responsible for determining whether they should be registered with an EventDispatcher by calling EventDispatcher.addEventInterceptor(java.lang.String, com.tangosol.net.events.EventInterceptor, java.util.Set, boolean).

Specified by:
introduceEventDispatcher in interface EventInterceptor
Parameters:
sIdentifier - the unique name identifying this interceptor
dispatcher - the dispatcher being introduced

getEventTypes

public java.util.Set getEventTypes()
Return the set of event types that this EventInterceptor subscribes to.
Returns:
the set of event types that this interceptor subscribes to

isFirst

public boolean isFirst()
Return true iff this EventInterceptor should be added to the head of the EventDispatcher's chain of EventInterceptors.
Returns:
true iff this interceptor should be added to the head of the dispatcher's chain of interceptors

evaluate

public abstract boolean evaluate(EventDispatcher dispatcher)
Evaluate whether this EventInterceptor should be registered with the specified EventDispatcher.
Parameters:
dispatcher - the EventDispatcher to be evaluated
Returns:
true iff this interceptor should be registered with the specified dispatcher

Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.1.0

E22843-01


Copyright © 2000, 2011, Oracle and/or its affiliates. All rights reserved.