|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ConsumerOperationsInterface
ConsumerOperationsInterface is an interface that specifies the standard operations to enable a client to receive events on specific channels from a remote Correlator.
Field Summary | |
---|---|
static java.lang.String |
PROPERTY_CONSUMER_CHANNELS
The string name of the bound property that is used for "consumerChannels" updates (typically "consumerChannels", but this constant should be used to be sure). |
static java.lang.String |
PROPERTY_CONSUMER_CONNECTED
The string name of the bound property that is used for "consumerConnected" updates (typically "consumerConnected", but this constant should be used to be sure). |
Method Summary | |
---|---|
void |
addEventListener(IEventListener listener)
Add a listener that will be notified whenever events are received on any of the channels on which this consumer is listening. |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add a property change listener. |
void |
addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
Add a property change listener for a specific named property. |
java.lang.String[] |
getChannels()
Get the list of channel names to which this consumer is subscribed. |
IEventListener[] |
getEventListeners()
Get a list of all subscribed listeners (as an array). |
java.lang.String |
getName()
Get the name of this consumer. |
boolean |
isConsumerConnected()
Determine if this consumer is really connected to the remote Correlator. |
void |
removeAllEventListeners()
Remove all event listeners that are listening to this consumer. |
void |
removeEventListener(IEventListener listener)
Remove a previously added event listener. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove a property change listener. |
void |
removePropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
Remove a property change listener for a specific named property. |
void |
setChannels(java.lang.String[] channels)
Set the list of channel names to which this consumer is subscribed. |
Field Detail |
---|
static final java.lang.String PROPERTY_CONSUMER_CONNECTED
static final java.lang.String PROPERTY_CONSUMER_CHANNELS
Method Detail |
---|
java.lang.String getName()
void setChannels(java.lang.String[] channels) throws EngineException
channels
- The set of channels to which to subscribe. Must be non-null, and contain no null elements.
EngineException
- Thrown if any exceptions occur in the Client SDK, or if the channels parameter is invalid.java.lang.String[] getChannels()
boolean isConsumerConnected()
void addEventListener(IEventListener listener)
Threading note: unless this was created as an asynchronous consumer, it is essential that the specified event listener does not lock the consumer or bean, and does not call any methods on the consumer or bean, to avoid the possibility of deadlock. If the handler does need to call bean methods (e.g. to send events) then an asynchronous named consumer must be used instead.
Note that only the plural handleEvents(Event[]) method of the listener will be called.
Clients should consider using the EventListenerAdapter
adapter class
so that events can be handled one at a time by implementing only the
EventListenerAdapter.handleEvent(com.apama.event.Event)
method.
listener
- the listener to be added.void removeEventListener(IEventListener listener)
listener
- the listener to be removed.IEventListener[] getEventListeners()
void removeAllEventListeners()
void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- the listener to be added.void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
propertyName
- the name of the property to listen on.listener
- the listener to be added.void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- the listener to be removed.void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
propertyName
- the name of the property that was listened on.listener
- the listener to be removed.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |