|
Jumpi v1.2.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jumpi.impl.connector.jms10.JmsContext
A JmsContext encapsulates point-to-point JmsQueueContext and publish-subscribe JmsTopicContexts, providing common functionality needed by the JmsConnector to send and receive messages to both context types. The JMS Producer and JMS Consumer instances which are created for sending and receiving messages are maintained once opened by the JmsContext. The JMS Producer and Consumer share the same non-transacted JMS Session. The JMS Consumer is auto-acknowledging.
Field Summary | |
protected JmsDestination |
dest_
The default JMS Destination linked to the JmsContext. |
static java.lang.String |
PROPERTY_JMS_CORRELATION_ID
The JMSCorrelationID property used on sent messages. |
static java.lang.String |
PROPERTY_JMS_RECEIVE_TIMEOUT
The receive timeout property used for synchronous reception. |
static java.lang.String |
PROPERTY_JMS_REPLY_DESTINATION
The Temporary JmsDestination created on send when PROPERTY_JMS_REPLY_WANTED_FLAG is true. |
static java.lang.String |
PROPERTY_JMS_REPLY_WANTED_FLAG
The JMSReplyTo property used on sent messages. - value is true or false. |
static java.lang.String |
PROPERTY_JMS_TTL
The time to live for JMS messages before expiry. |
Constructor Summary | |
JmsContext(JmsDestination dest)
Creates a new JmsContext object. |
Method Summary | |
abstract void |
close()
Close the JmsContext, which entails closing any established JMS entities.. |
protected java.util.Hashtable |
consolidatedProperties(Envelope env)
Customizing properties may be sent from either the Jumpi client layer, or from the Controller layer. |
protected java.lang.String |
getCorrelationID(java.util.Hashtable props)
The correlationID placed on outgoing Messages, or to filter incoming messages by, as determined by the PROPERTY_JMS_CORRELATION_ID property. |
JmsDestination |
getDestination()
Get the associated JmsDestination. |
protected long |
getReceiveTimeout(java.util.Hashtable props)
The receive timeout in milliseconds determined by the PROPERTY_JMS_TTL property. |
protected long |
getTTL(java.util.Hashtable props)
The time to live in milliseconds of outgoing Messages determined by the PROPERTY_JMS_TTL property. |
protected boolean |
isReplyTo(java.util.Hashtable props)
Whether a JMSReplyTo Destination should be set on outgoing Messages, since the PROPERTY_JMS_REPLY_WANTED_FLAG is "true". |
abstract boolean |
recv(JmsDestination dest,
Envelope env)
Receive an ObjectMessage from the JmsDestination provided. |
abstract boolean |
send(JmsDestination dest,
Envelope env)
Send an ObjectMessage to the JmsDestination provided. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String PROPERTY_JMS_REPLY_DESTINATION
public static final java.lang.String PROPERTY_JMS_TTL
public static final java.lang.String PROPERTY_JMS_REPLY_WANTED_FLAG
public static final java.lang.String PROPERTY_JMS_CORRELATION_ID
public static final java.lang.String PROPERTY_JMS_RECEIVE_TIMEOUT
protected JmsDestination dest_
Constructor Detail |
public JmsContext(JmsDestination dest)
dest
- the associated JMS Destination.Method Detail |
public JmsDestination getDestination()
public abstract boolean send(JmsDestination dest, Envelope env) throws java.lang.Exception
JmsConnector.onSend(org.jumpi.spi.Envelope)
.
dest
- the JmsDestination which may contain a Temporary Destination
to use, instead of the instance's default Destination.env
- the Envelope containing the message and customizing
properties.
java.lang.Exception
- if any error condition occurs, failing the operation.public abstract boolean recv(JmsDestination dest, Envelope env) throws java.lang.Exception
JmsConnector.onRecv(org.jumpi.spi.Envelope)
.
dest
- the JmsDestination which may contain a Temporary Destination
to use, instead of the instance's default Destination.env
- the Envelope to place the message and containing customizing
properties.
java.lang.Exception
- if any error condition occurs, failing the operation.public abstract void close() throws java.lang.Exception
java.lang.Exception
- if any failure condition occurs.protected java.util.Hashtable consolidatedProperties(Envelope env)
env
- the Envelope.containing client properties and, or Controller
properties.
protected boolean isReplyTo(java.util.Hashtable props) throws java.lang.Exception
props
- the consolidated customizing properties.
java.lang.Exception
- if any failure condition occurs.protected long getTTL(java.util.Hashtable props) throws java.lang.Exception
props
- the consolidated customizing properties.
java.lang.Exception
- if any failure condition occurs.protected long getReceiveTimeout(java.util.Hashtable props) throws java.lang.Exception
props
- the consolidated customizing properties.
java.lang.Exception
- if any failure condition occurs.protected java.lang.String getCorrelationID(java.util.Hashtable props) throws java.lang.Exception
props
- the consolidated customizing properties.
java.lang.Exception
- if any failure condition occurs.
|
Jumpi v1.2.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |