com.apama.correlator.jms
Event JMSConnection


An event object representing a JMS connection, with actions for manipulating a connection's existing senders and receivers, and also for dynamically adding senders and receivers at runtime.

Senders and receivers may be added dynamically either using the comprehensive JMSConnection.addReceiver/SenderWithConfiguration() actions which provide access to all configuration parameters, or one of the other addReceiver/Sender*() actions that simplify creation of senders/receivers using the more common configuration parameter sets.
See Also:
com.apama.correlator.jms.JMS#getConnection() - Use this method to get a JMSConnection

Action summary
 com.apama.correlator.jms.JMSReceiveraddReceiver(string destination, string receiverReliability)

Requests the addition of a new dynamic JMS receiver, with the specified queue/topic name and reliability setting.
 com.apama.correlator.jms.JMSReceiveraddReceiverWithConfiguration(com.apama.correlator.jms.JMSReceiverConfiguration config)

Requests the addition of a new dynamic JMS receiver, with the specified receiver configuration.
 com.apama.correlator.jms.JMSReceiveraddReceiverWithDurableTopicSubscription(string destination, string receiverReliability, string durableTopicSubscriptionName, string messageSelector)

Requests the addition of a new dynamic JMS durable topic subscription.
 com.apama.correlator.jms.JMSSenderaddSender(string senderReliability)

Requests the addition of a new dynamic JMS sender, with the specified reliability setting.
 com.apama.correlator.jms.JMSSenderaddSenderWithConfiguration(com.apama.correlator.jms.JMSSenderConfiguration config)

Requests the addition of a new dynamic JMS sender, with the specified sender configuration.
 com.apama.correlator.jms.JMSReceiverConfigurationcreateReceiverConfiguration(string receiverId, string destination)

Create a JMSReceiverConfiguration for this connection that can be used to add a new receiver with the specified settings.
 com.apama.correlator.jms.JMSSenderConfigurationcreateSenderConfiguration(string senderId)

Create a JMSSenderConfiguration for this connection that can be used to add a new sender with the specified settings.
 stringgetConnectionId()

The unique identifier of this connection.
 com.apama.correlator.jms.JMSSendergetDefaultSender()

Get a JMSSender event object representing the default sender for this connection (which exists automatically if no other static senders were explicitly configured).
 com.apama.correlator.jms.JMSReceiverstatic getReceiver(string receiverId)

Get a JMSReceiver event object representing a receiver that already exists, which might have been added dynamically, or defined statically in the XML configuration file.
 com.apama.correlator.jms.JMSSenderstatic getSender(string senderId)

Get a JMSSender event object representing a sender that already exists, which might have been added dynamically, or defined statically in the XML configuration file.
 
Action detail

addReceiver

            com.apama.correlator.jms.JMSReceiver addReceiver(string destination, string receiverReliability)
        
Requests the addition of a new dynamic JMS receiver, with the specified queue/topic name and reliability setting.

EPL applications may listen for the JMSReceiverStatus event to be notified when the new receiver has been added, and when it has reached the "OK" state.

A unique receiverId will be generated automatically.

The monitor instance will usually be terminated with an ERROR if invalid arguments are provided.
Parameters:
destination - A JMS queue name, JMS topic name, or JNDI name, prefixed by "queue:", "topic:" or "jndi:".
receiverReliability - An enumeration value from JMSReceiverReliability indicating the reliability setting to use. Alternatively, specify an empty string "" to use the connection's defaultReceiverReliability.
Returns:
A JMSReceiver instance which can be used to get the receiverId for status monitoring, and an action for removing the receiver when it is no longer required.
See Also:
com.apama.correlator.jms.JMSReceiverReliability - 

addReceiverWithConfiguration

            com.apama.correlator.jms.JMSReceiver addReceiverWithConfiguration(com.apama.correlator.jms.JMSReceiverConfiguration config)
        
Requests the addition of a new dynamic JMS receiver, with the specified receiver configuration.

EPL applications may listen for the JMSReceiverStatus event to be notified when the new receiver has been added, and when it has reached the "OK" state.

The monitor instance will usually be terminated with an ERROR if invalid arguments are provided.
Parameters:
config - An event representing the configuration of the new receiver, constructed using JMSConnection.createReceiverConfiguration and the setter methods on JMSReceiverConfiguration.
Returns:
A JMSReceiver instance which can be used to get the receiverId for status monitoring, and an action for removing the receiver when it is no longer required.
See Also:
com.apama.correlator.jms.JMSConnection#createReceiverConfiguration() - 

addReceiverWithDurableTopicSubscription

            com.apama.correlator.jms.JMSReceiver addReceiverWithDurableTopicSubscription(string destination, string receiverReliability, string durableTopicSubscriptionName, string messageSelector)
        
Requests the addition of a new dynamic JMS durable topic subscription.

EPL applications may listen for the JMSReceiverStatus event to be notified when the new receiver has been added, and when it has reached the "OK" state.

This durable topic subscription will remain on the JMS broker until this dynamic receiver is removed using JMSReceiver.remove().

A unique receiverId will be generated automatically.

The monitor instance will usually be terminated with an ERROR if invalid arguments are provided.
Parameters:
destination - A JMS topic name, or JNDI name, prefixed by "topic:" or "jndi:".
receiverReliability - An enumeration value from JMSReceiverReliability indicating the reliability setting to use. For a durable topic subscription, this must not be BEST_EFFORT. Specify an empty string "" to use the connection's defaultReceiverReliability.
durableTopicSubscriptionName - The unique identifier used by the JMS broker for for this durable topic subscription.

Must not be "", and must not match any other subscription name with the same connection clientID.

messageSelector - An optional JMS message selector query string to select a subset of topic messages to be processed by this receiver, or "" to receive all messages.

See the JMS documentation for the javax.jms.Message interface for more details.

Returns:
A JMSReceiver instance which can be used to get the receiverId for status monitoring, and an action for removing the receiver when it is no longer required.
See Also:
com.apama.correlator.jms.JMSReceiverReliability - 
com.apama.correlator.jms.JMSReceiver#remove() - 

addSender

            com.apama.correlator.jms.JMSSender addSender(string senderReliability)
        
Requests the addition of a new dynamic JMS sender, with the specified reliability setting.

EPL applications may listen for the JMSSenderStatus event to be notified when the new sender has been added, and when it has reached the "OK" state. Events can be sent to the sender's channel as soon as this action returns.

A unique senderId will be generated automatically.

The monitor instance will usually be terminated with an ERROR if invalid arguments are provided.
Parameters:
senderReliability - An enumeration value from JMSSenderReliability indicating the reliability setting to use for sending events. Alternatively, specify an empty string "" to use the connection's defaultSenderReliability.
Returns:
A JMSSender instance which can be used to get the senderId for status monitoring, the channel to send events to, and an action for removing the sender when it is no longer required.
See Also:
com.apama.correlator.jms.JMSSenderReliability - 

addSenderWithConfiguration

            com.apama.correlator.jms.JMSSender addSenderWithConfiguration(com.apama.correlator.jms.JMSSenderConfiguration config)
        
Requests the addition of a new dynamic JMS sender, with the specified sender configuration.

EPL applications may listen for the JMSSenderStatus event to be notified when the new sender has been added, and when it has reached the "OK" state. Note that no events will actually be sent into the Correlator until JMS.onApplicationInitialized() has been called.

The monitor instance will usually be terminated with an ERROR if invalid arguments are provided.
Parameters:
config - An event representing the configuration of the new sender, constructed using JMSConnection.createSenderConfiguration and the setter methods on JMSSenderConfiguration.
Returns:
A JMSSender instance which can be used to get the senderId for status monitoring, the channel to send events to, and an action for removing the sender when it is no longer required.
See Also:
com.apama.correlator.jms.JMSConnection#createSenderConfiguration() - 

createReceiverConfiguration

            com.apama.correlator.jms.JMSReceiverConfiguration createReceiverConfiguration(string receiverId, string destination)
        
Create a JMSReceiverConfiguration for this connection that can be used to add a new receiver with the specified settings.
Parameters:
receiverId - An application-defined unique identifier for this receiver, used to track status and removal. The receiverId must not be an empty string or contain the colon ":" character - if it does, the monitor will terminate with an error when trying to create the receiver.

Applications are encouraged to use integer.incrementCounter("apama.JMSSessionId").toString() or a similar generator of unique numbers for all or part of the receiverId.

destination - A JMS queue name, JMS topic name, or JNDI name, prefixed by "queue:", "topic:" or "jndi:".
See Also:
com.apama.correlator.jms.JMSConnection#addReceiverWithConfiguration() - 

createSenderConfiguration

            com.apama.correlator.jms.JMSSenderConfiguration createSenderConfiguration(string senderId)
        
Create a JMSSenderConfiguration for this connection that can be used to add a new sender with the specified settings.
Parameters:
senderId - An application-defined unique identifier for this sender, used to track status and removal. The senderId must not be an empty string or contain the colon ":" character - if it does, the monitor will terminate with an error when trying to create the sender.

Applications are encouraged to use integer.incrementCounter("apama.JMSSessionId").toString() or a similar generator of unique numbers for all or part of the senderId.

See Also:
com.apama.correlator.jms.JMSConnection#addSenderWithConfiguration() - 

getConnectionId

            string getConnectionId()
        
The unique identifier of this connection.

getDefaultSender

            com.apama.correlator.jms.JMSSender getDefaultSender()
        
Get a JMSSender event object representing the default sender for this connection (which exists automatically if no other static senders were explicitly configured).

getReceiver

            com.apama.correlator.jms.JMSReceiver static getReceiver(string receiverId)
        
Get a JMSReceiver event object representing a receiver that already exists, which might have been added dynamically, or defined statically in the XML configuration file.

It is the caller's responsibility to specify a valid receiverId - the specified identifier is not be validated as part of this action call. If the identifier does not represent an existing receiver then operations on the returned JMSReceiver (such as remove()) will cause an error.
Parameters:
receiverId

getSender

            com.apama.correlator.jms.JMSSender static getSender(string senderId)
        
Get a JMSSender event object representing a sender that already exists, which might have been added dynamically, or defined statically in the XML configuration file.

It is the caller's responsibility to specify a valid senderId - the specified identifier is not be validated as part of this action call. If the identifier does not represent an existing sender then operations on the returned JMSSender (such as remove()) will cause an error.
Parameters:
senderId