|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ReceiveConsumerOperationsInterface
ReceiveConsumerOperationsInterface is an interface providing the ability to create consumers for receiving events from an Apama server component.
Field Summary | |
---|---|
static java.lang.String |
PROPERTY_ALL_CONSUMERS_CONNECTED
The string name of the bound property that is used to indicate if the bean and all individual named consumers are connected (typically "allConsumersConnected", but this constant should be used to be sure). |
Method Summary | |
---|---|
ConsumerOperationsInterface |
addConsumer(java.lang.String uniqueName,
java.lang.String... channels)
Add a new uniquely-named consumer that listens on a specified set of channels. |
ConsumerOperationsInterface |
addConsumer(java.lang.String uniqueName,
java.lang.String[] channels,
boolean disconnectSlow)
Add a new uniquely-named consumer that listens on a specified set of channels. |
ConsumerOperationsInterface |
addConsumer(java.lang.String uniqueName,
java.lang.String[] channels,
boolean disconnectSlow,
boolean async)
Add a new uniquely-named consumer that listens on a specified set of channels. |
ConsumerOperationsInterface[] |
getAllConsumers()
Get all existing uniquely-named consumers. |
ConsumerOperationsInterface |
getConsumer(java.lang.String uniqueName)
Get an existing uniquely-named consumer. |
boolean |
isAllConsumersConnected()
Determine if the bean and existing uniquely-named consumers are connected. |
void |
removeAllConsumers()
Remove and disconnect all existing uniquely-named consumers. |
void |
removeConsumer(java.lang.String uniqueName)
Remove and disconnect any existing uniquely-named consumer. |
Field Detail |
---|
static final java.lang.String PROPERTY_ALL_CONSUMERS_CONNECTED
Note that this property applies only to individual named consumers, and NOT to the single receiver. From 5.0 onwards this property also takes into account whether the bean itself is connected, and will always be false when the bean is not connected, even if no consumers were added.
Method Detail |
---|
ConsumerOperationsInterface addConsumer(java.lang.String uniqueName, java.lang.String... channels) throws EngineException
uniqueName
- the unique name for the new consumer.channels
- The list of channels on which the consumer should receive events. Must be non-null, and contain
no null elements.
EngineException
- if the consumer cannot be added (e.g. if the name is not unique), or if the channels parameter is invalid.ConsumerOperationsInterface addConsumer(java.lang.String uniqueName, java.lang.String[] channels, boolean disconnectSlow) throws EngineException
uniqueName
- the unique name for the new consumer.channels
- the list of channels on which the consumer should receive events. Must be non-null, and contain no null elements.disconnectSlow
- Whether we should be disconnected if we don't keep up.
Only the first consumer's disconnectSlow value is used; subsequent consumers
to the same correlator (even if via different EngineManagement objects) share
the connection and thus the disconnect behaviour.
EngineException
- if the consumer cannot be added (e.g. if the name is not unique), or if the channels parameter is invalid.ConsumerOperationsInterface addConsumer(java.lang.String uniqueName, java.lang.String[] channels, boolean disconnectSlow, boolean async) throws EngineException
uniqueName
- the unique name for the new consumer.channels
- the list of channels on which the consumer should receive events. Must be non-null, and contain no null elements.disconnectSlow
- Whether we should be disconnected if we don't keep up.
Only the first consumer's disconnectSlow value is used; subsequent consumers
to the same correlator (even if via different EngineManagement objects) share
the connection and thus the disconnect behaviour.async
- Whether the consumer is asynchronous. If it is, events are queued
and delivered in a separate thread, and EventListeners of the consumer can
perform re-entrant calls to the bean. EventListeners of asynchronous consumers
may be called after having been disconnected.
EngineException
- if the consumer cannot be added (e.g. if the name is not unique), or if the channels parameter is invalid.ConsumerOperationsInterface getConsumer(java.lang.String uniqueName)
uniqueName
- the unique-name of an existing consumer.
ConsumerOperationsInterface[] getAllConsumers()
boolean isAllConsumersConnected()
This is a bound property, so clients may also listen for property changes to ReceiveConsumerOperationsInterface.PROPERTY_ALL_CONSUMERS_CONNECTED. If no named consumers have been added, this property is identical to isBeanConnected.
The method name may sound odd, but "is" is the accepted method-name prefix for testing boolean properties.
void removeConsumer(java.lang.String uniqueName) throws EngineException
uniqueName
- the unique-name of an existing consumer.
EngineException
- if there are problems with removing the consumer.void removeAllConsumers() throws EngineException
EngineException
- if there are problems while removing any of the consumers.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |