Developing Apama Applications > Developing Clients > The EventService API > The IEventServiceChannel interface
The IEventServiceChannel interface
After you have an EventService object, you can create an EventServiceChannel object by calling the addChannel() method. With the EventServiceChannel object the following methods are available:
*void addEventListener(IEventListener eventListener)
Add an IEventListener that will be notified of every event (of a pre-registered type) that is received by this EventServiceChannel instance.
*void addEventListener() — defined as:

void addEventListener(
IEventListener eventListener,
EventType eventType)
Add an IEventListener that will be notified of every event, of the specified EventType, that is received by this EventServiceChannel instance.
*void asyncRequestResponse() — defined as:

void asyncRequestResponse(
IResponseListener responseListener,
Event requestEvent,
EventType responseEventType)
Emulate an asynchronous RPC call to the correlator by sending an event, and then invoking a callback when a matching response event is received (non-blocking call).
*void asyncRequestResponse() - defined as:

void asyncRequestResponse(
IResponseListener responseListener,
Event requestEvent,
EventType responseEventType,
long timeout)
Emulate an asynchronous RPC call to the correlator by sending an event, and then invoking a callback when a matching response event is received (non-blocking call, with timeout).
*void clearProcessingQueue()
Immediately remove (discard) all events from the internal processing queue.
*void destroy()
Destroy this EventServiceChannel instance.
*java.util.Map<String, Object> getConfig()
Get the channel configuration that define the requested operating semantics of this instance.
*java.lang.String getName()
Get the name of the channel(s) that this instance is consuming events from.
*boolean isDestroyed()
Determine if this EventServiceChannel channel (not the correlator) is destroyed.
*void registerEventType(EventType eventType)
Register an arbitrary EventType with this EventServiceChannel.
*void removeEventListener(IEventListener eventListener)
Remove a previously registered IEventListener that was listening to all events received.
*void removeEventListener() - defined as:

void removeEventListener(
IEventListener eventListener,
EventType eventType)
Remove a previously registered IEventListener that was listening to all events received of the specified EventType.
*IResponseWrapper requestResponse() — defined as:

IResponseWrapper requestResponse(
Event requestEvent,
EventType responseEventType)
Emulate a synchronous RPC call to the correlator by sending an event and awaiting a matching response event (blocking call).
*IResponseWrapper requestResponse() — defined as:

IResponseWrapper requestResponse(
Event requestEvent,
EventType responseEventType,
long timeout)
Emulate a synchronous RPC call to the correlator by sending an event and awaiting a matching response event (blocking call with timeout).
*void setLateResponseListener(IEventListener eventListener)
Register the single IEventListener that will be notified of any “late” responses to either synchronous or asynchronous request-response calls.
*void unregisterEventType(EventType eventType)
Unregister an arbitrary EventType from this EventServiceChannel.
An EventServiceChannel object provides several fields that you can use to specify configuration options and default values for channel properties. These are described in the Javadoc documentation for the IEventServiceChannel interface.
Copyright © 2013 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or Terracotta Inc., San Francisco, CA, USA, and/or Software AG (Canada) Inc., Cambridge, Ontario, Canada, and/or, Software AG (UK) Ltd., Derby, United Kingdom, and/or Software A.G. (Israel) Ltd., Or-Yehuda, Israel and/or their licensors.