ca.uhn.hl7v2.protocol.impl
Class JMSQueueAdapter

java.lang.Object
  extended by ca.uhn.hl7v2.protocol.impl.JMSQueueAdapter
All Implemented Interfaces:
JMSDestination

public class JMSQueueAdapter
extends java.lang.Object
implements JMSDestination

An implementation of JMSDestination that uses an underlying Queue.

Version:
$Revision: 1.1 $ updated on $Date: 2007/02/19 02:24:26 $ by $Author: jamesagnew $
Author:
Bryan Tripp

Constructor Summary
JMSQueueAdapter(javax.jms.QueueConnection theConnection, javax.jms.Queue theDestination)
           
 
Method Summary
 void connect()
          Creates a new session, sender/publisher, and receiver/subscriber.
 javax.jms.TextMessage createMessage()
           
 void disconnect()
          Closes the JMS session.
 javax.jms.Connection getConnection()
           
 java.lang.String getName()
           
 boolean isConnected()
           
 javax.jms.Message receive()
           
 void send(javax.jms.Message theMessage)
          Sends the given message to the JMS destination.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JMSQueueAdapter

public JMSQueueAdapter(javax.jms.QueueConnection theConnection,
                       javax.jms.Queue theDestination)
Parameters:
theConnection -
theDestination -
Method Detail

getName

public java.lang.String getName()
                         throws javax.jms.JMSException
Specified by:
getName in interface JMSDestination
Returns:
the name of the Queue or Topic
Throws:
javax.jms.JMSException
See Also:
JMSDestination.getName()

createMessage

public javax.jms.TextMessage createMessage()
                                    throws javax.jms.JMSException
Specified by:
createMessage in interface JMSDestination
Returns:
a new JMS Message object.
Throws:
javax.jms.JMSException
See Also:
JMSDestination.createMessage()

connect

public void connect()
             throws javax.jms.JMSException
Description copied from interface: JMSDestination
Creates a new session, sender/publisher, and receiver/subscriber.

Specified by:
connect in interface JMSDestination
Throws:
javax.jms.JMSException
See Also:
JMSDestination.connect()

disconnect

public void disconnect()
                throws javax.jms.JMSException
Description copied from interface: JMSDestination
Closes the JMS session.

Specified by:
disconnect in interface JMSDestination
Throws:
javax.jms.JMSException
See Also:
JMSDestination.disconnect()

send

public void send(javax.jms.Message theMessage)
          throws javax.jms.JMSException
Description copied from interface: JMSDestination
Sends the given message to the JMS destination.

Specified by:
send in interface JMSDestination
Parameters:
theMessage - message to send
Throws:
javax.jms.JMSException
See Also:
JMSDestination.send(javax.jms.Message)

receive

public javax.jms.Message receive()
                          throws javax.jms.JMSException
Specified by:
receive in interface JMSDestination
Returns:
a message received from the JMS destination.
Throws:
javax.jms.JMSException
See Also:
JMSDestination.receive()

isConnected

public boolean isConnected()
Specified by:
isConnected in interface JMSDestination
Returns:
true if connected.
See Also:
JMSDestination.isConnected()

getConnection

public javax.jms.Connection getConnection()
Specified by:
getConnection in interface JMSDestination
Returns:
the JMS Connection underlying this destination
See Also:
JMSDestination.getConnection()


Copyright © 2001-2011 University Health Network. All Rights Reserved.