public interface ConsumerOperationsInterface
Modifier and Type | Field and Description |
---|---|
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).
|
Modifier and Type | Method and Description |
---|---|
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.
|
void |
addPropertyChangeListenerSync(java.beans.PropertyChangeListener listener)
Deprecated.
Use addPropertyChangeListener instead
|
void |
addPropertyChangeListenerSync(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
Deprecated.
Use addPropertyChangeListener instead
|
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 |
removePropertyChangeListenerSync(java.beans.PropertyChangeListener listener)
Deprecated.
|
void |
removePropertyChangeListenerSync(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
Deprecated.
|
void |
setChannels(java.lang.String[] channels)
Set the list of channel names to which this consumer is subscribed.
|
static final java.lang.String PROPERTY_CONSUMER_CONNECTED
static final java.lang.String PROPERTY_CONSUMER_CHANNELS
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 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.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.@Deprecated void addPropertyChangeListenerSync(java.beans.PropertyChangeListener listener)
listener
- the listener to be added.@Deprecated void addPropertyChangeListenerSync(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
propertyName
- the name of the property to listen on.listener
- the listener to be added.@Deprecated void removePropertyChangeListenerSync(java.beans.PropertyChangeListener listener)
listener
- the listener to be removed.@Deprecated void removePropertyChangeListenerSync(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
propertyName
- the name of the property that was listened on.listener
- the listener to be removed.Submit a bug or feature
Copyright (c) 2013-2017 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors. Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG.