JCAT
v0.3.1

javax.csapi.cc.jcc
Interface EventFilter


public interface EventFilter

An instance of this EventFilter is supplied to the event source in the addxxxListener() method by the EventListener to indicate what Events are required by the EventListener. When a JccEvent occurs, the event source will call the predicate getEventDisposition(JccEvent) to determine if the Event should be fired to the EventListener. Given an event, getEventDisposition() returns

  1. EVENT_DISCARD if the listener is not interested in receiving the event.
  2. EVENT_NOTIFY if the listener should be sent a non-blocking notification.
  3. EVENT_BLOCK if the listener should be sent a blocking event (trigger). This return value applies to JccConnectionEvents only.
The EventFilter while providing flexibility will impact the performance of the platform. Hence, the JCC implementation is expected to provide for some standard EventFilters as explained in the JccProvider interface.

Since:
1.0

Field Summary
static int EVENT_BLOCK
          Predicate return constant: Indicates that the specified event is required and is a blocking Event, that is, call processing will be suspended until the JccConnection.continueProcessing() or any other valid method is called.
static int EVENT_DISCARD
          Predicate return constant: Indicates that the specified event is not required.
static int EVENT_NOTIFY
          Predicate return constant: Indicates that the specified event is required and is a non-blocking Event (notification only), that is, call processing will not be suspended.
 
Method Summary
 int getEventDisposition(JccEvent event)
          This predicate indicates whether the specified Event is required by an EventListener.
 

Field Detail

EVENT_DISCARD

public static final int EVENT_DISCARD
Predicate return constant: Indicates that the specified event is not required. This is one of the possible return values of getEventDisposition()

See Also:
Constant Field Values

EVENT_NOTIFY

public static final int EVENT_NOTIFY
Predicate return constant: Indicates that the specified event is required and is a non-blocking Event (notification only), that is, call processing will not be suspended. This is one of the possible return values of getEventDisposition()

See Also:
Constant Field Values

EVENT_BLOCK

public static final int EVENT_BLOCK
Predicate return constant: Indicates that the specified event is required and is a blocking Event, that is, call processing will be suspended until the JccConnection.continueProcessing() or any other valid method is called. This is one of the possible return values of getEventDisposition()

See Also:
Constant Field Values
Method Detail

getEventDisposition

public int getEventDisposition(JccEvent event)
This predicate indicates whether the specified Event is required by an EventListener. This method will be called by the Event source prior to firing the event. The return type can be either of
  1. EVENT_DISCARD if the listener is not interested in receiving the event.
  2. EVENT_NOTIFY if the listener should be sent a non-blocking notification.
  3. EVENT_BLOCK if the listener should be sent a blocking event (trigger). This return value applies to JccConnectionEvents only since the other type of events are non-blocking.

Parameters:
event - specifies the event.
Returns:
an int representing the disposition for the event concerned.

JCAT
v0.3.1

August, 2003
If you have any comments or queries, please mail them to JSR-122-EG@JCP.ORG

Copyright - 2001, 2003 Sun Microsystems