ca.uhn.hl7v2.protocol.impl
Class JMSTopicTransport

java.lang.Object
  extended by ca.uhn.hl7v2.protocol.impl.AbstractTransport
      extended by ca.uhn.hl7v2.protocol.impl.AbstractJMSTransport
          extended by ca.uhn.hl7v2.protocol.impl.JMSTopicTransport
All Implemented Interfaces:
TransportLayer

public class JMSTopicTransport
extends AbstractJMSTransport

A TransportLayer that uses a JMS Topic.

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

Field Summary
 
Fields inherited from class ca.uhn.hl7v2.protocol.impl.AbstractJMSTransport
CLIENT_ID_KEY, CONNECTION_METADATA_KEY, DESTINATION_NAME_KEY
 
Constructor Summary
JMSTopicTransport(javax.jms.TopicConnection theConnection, javax.jms.Topic theDestination)
           
JMSTopicTransport(javax.jms.TopicConnection theConnection, javax.jms.Topic theDestination, java.lang.String theMessageSelector)
           
 
Method Summary
 void doConnect()
          Performs connection as described in TransportLayer.connect().
 void doDisconnect()
          Performs disconnection as described in TransportLayer.disconnect().
 javax.jms.Connection getConnection()
           
protected  java.lang.String getDestinationName()
           
protected  javax.jms.Message getMessage()
           
protected  javax.jms.Message receiveJMS()
           
protected  void sendJMS(javax.jms.Message theMessage)
          Sends a message to the underlying Destination
 
Methods inherited from class ca.uhn.hl7v2.protocol.impl.AbstractJMSTransport
doReceive, doSend, getCommonMetadata, toMessage, toTransportable
 
Methods inherited from class ca.uhn.hl7v2.protocol.impl.AbstractTransport
connect, disconnect, isConnected, receive, send
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ca.uhn.hl7v2.protocol.TransportLayer
connect, disconnect, isConnected, receive, send
 

Constructor Detail

JMSTopicTransport

public JMSTopicTransport(javax.jms.TopicConnection theConnection,
                         javax.jms.Topic theDestination)
Parameters:
theConnection - the connection over which messages are written and read
theDestination - the destination to/from which messages are written/read

JMSTopicTransport

public JMSTopicTransport(javax.jms.TopicConnection theConnection,
                         javax.jms.Topic theDestination,
                         java.lang.String theMessageSelector)
Parameters:
theConnection - the connection over which messages are written and read
theDestination - the destination to/from which messages are written/read
theMessageSelector - a JMS message selector which restricts the inbound messages that are received (se JMS docs)
Method Detail

getDestinationName

protected java.lang.String getDestinationName()
                                       throws javax.jms.JMSException
Specified by:
getDestinationName in class AbstractJMSTransport
Returns:
the name of the destination at which messages are written and read
Throws:
javax.jms.JMSException
See Also:
AbstractJMSTransport.getDestinationName()

getConnection

public javax.jms.Connection getConnection()
Specified by:
getConnection in class AbstractJMSTransport
Returns:
the QueueConnection or TopicConnection over which messages are transported
See Also:
AbstractJMSTransport.getConnection()

getMessage

protected javax.jms.Message getMessage()
                                throws javax.jms.JMSException
Specified by:
getMessage in class AbstractJMSTransport
Returns:
a new JMS Message created on the sending Session.
Throws:
javax.jms.JMSException
See Also:
AbstractJMSTransport.getMessage()

sendJMS

protected void sendJMS(javax.jms.Message theMessage)
                throws javax.jms.JMSException
Description copied from class: AbstractJMSTransport
Sends a message to the underlying Destination

Specified by:
sendJMS in class AbstractJMSTransport
Throws:
javax.jms.JMSException
See Also:
ca.uhn.hl7v2.protocol.impl.AbstractJMSTransport#send(javax.jms.Message)

receiveJMS

protected javax.jms.Message receiveJMS()
                                throws javax.jms.JMSException
Specified by:
receiveJMS in class AbstractJMSTransport
Returns:
the next available message from the underlying Destination
Throws:
javax.jms.JMSException
See Also:
AbstractTransport.receive()

doConnect

public void doConnect()
               throws TransportException
Description copied from class: AbstractTransport
Performs connection as described in TransportLayer.connect(). The connect() method of this class delegates to doConnect() after some internal housekeeping.

Specified by:
doConnect in class AbstractTransport
Throws:
TransportException
See Also:
ca.uhn.hl7v2.protocol.AbstractJMSTransport#doConnect()

doDisconnect

public void doDisconnect()
                  throws TransportException
Description copied from class: AbstractTransport
Performs disconnection as described in TransportLayer.disconnect(). The disconnect() method of this class delegates to doDisconnect() after some internal housekeeping.

Specified by:
doDisconnect in class AbstractTransport
Throws:
TransportException
See Also:
AbstractTransport.doDisconnect()


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