Jumpi v1.2.0

org.jumpi.impl.connector.jms10
Class JmsQueueContext

java.lang.Object
  |
  +--org.jumpi.impl.connector.jms10.JmsContext
        |
        +--org.jumpi.impl.connector.jms10.JmsQueueContext

public class JmsQueueContext
extends JmsContext

A JmsQueueContext represents a JMS QueueSession, with a JMS QueueSender and QueueReceiver pair. The QueueSender and QueueReceiver are created lazily on send and receive respectively.


Field Summary
 
Fields inherited from class org.jumpi.impl.connector.jms10.JmsContext
dest_, PROPERTY_JMS_CORRELATION_ID, PROPERTY_JMS_RECEIVE_TIMEOUT, PROPERTY_JMS_REPLY_DESTINATION, PROPERTY_JMS_REPLY_WANTED_FLAG, PROPERTY_JMS_TTL
 
Constructor Summary
JmsQueueContext(JmsDestination dest, javax.jms.QueueConnection connection)
          Creates a new JmsQueueContext object.
 
Method Summary
 void close()
          Close the JmsContext, which entails closing any established JMS entities..
 boolean recv(JmsDestination dest, Envelope env)
          Receive an ObjectMessage from the JmsDestination provided.
 boolean send(JmsDestination dest, Envelope env)
          Send an ObjectMessage to the JmsDestination provided.
 
Methods inherited from class org.jumpi.impl.connector.jms10.JmsContext
consolidatedProperties, getCorrelationID, getDestination, getReceiveTimeout, getTTL, isReplyTo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JmsQueueContext

public JmsQueueContext(JmsDestination dest,
                       javax.jms.QueueConnection connection)
Creates a new JmsQueueContext object.

Parameters:
dest - the JmsDestination associated with the instance.
connection - the QueueConnection associated with the instance.
Method Detail

send

public boolean send(JmsDestination dest,
                    Envelope env)
             throws java.lang.Exception
Description copied from class: JmsContext
Send an ObjectMessage to the JmsDestination provided. Several configuration parameters are allowed from the Envelope's client properties or parameters. See JmsConnector.onSend(org.jumpi.spi.Envelope).

Specified by:
send in class JmsContext
Parameters:
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.
Returns:
true if the operation succeeds, otherwise false if managed failure.
Throws:
java.lang.Exception - if any error condition occurs, failing the operation.
See Also:
JmsContext.send(org.jumpi.impl.connector.jms10.JmsDestination, org.jumpi.spi.Envelope)

recv

public boolean recv(JmsDestination dest,
                    Envelope env)
             throws java.lang.Exception
Description copied from class: JmsContext
Receive an ObjectMessage from the JmsDestination provided. Receive timeout returns false. Several configuration parameters are allowed from the Envelope's client properties or parameters. See JmsConnector.onRecv(org.jumpi.spi.Envelope).

Specified by:
recv in class JmsContext
Parameters:
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.
Returns:
true if the operation succeeds, otherwise false if the receive times-out.
Throws:
java.lang.Exception - if any error condition occurs, failing the operation.
See Also:
JmsContext.send(org.jumpi.impl.connector.jms10.JmsDestination, org.jumpi.spi.Envelope)

close

public void close()
Description copied from class: JmsContext
Close the JmsContext, which entails closing any established JMS entities..

Specified by:
close in class JmsContext
See Also:
JmsContext.close()

Jumpi v1.2.0

Copyright © 2003, Peter Jonathan Klauser.