Package ca.uhn.hl7v2.protocol.impl
Class JMSTransport
java.lang.Object
ca.uhn.hl7v2.protocol.impl.AbstractTransport
ca.uhn.hl7v2.protocol.impl.JMSTransport
- All Implemented Interfaces:
TransportLayer
A
TransportLayer that exchanges messages through JMS destinations.- Version:
- $Revision: 1.1 $ updated on $Date: 2007-02-19 02:24:26 $ by $Author: jamesagnew $
- Author:
- Bryan Tripp
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJMSTransport(JMSDestination theInboundDestination, JMSDestination theOutboundDestination) -
Method Summary
Modifier and TypeMethodDescriptionvoidPerforms connection as described in TransportLayer.connect().voidPerforms disconnection as described in TransportLayer.disconnect().Called by receive(), which then adds common metadata.voiddoSend(Transportable theMessage) The method send() delegates to this method after checking whether we are connected.Returns metadata under the static keys defined by this class.protected javax.jms.MessagetoMessage(Transportable theSource) Fills a JMS message object with text and metadata from the givenTransportable.protected TransportabletoTransportable(javax.jms.Message theMessage) Copies data from the given Message into a Transportable.Methods inherited from class ca.uhn.hl7v2.protocol.impl.AbstractTransport
connect, disconnect, isConnected, receive, sendMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ca.uhn.hl7v2.protocol.TransportLayer
connect, disconnect, isConnected, receive, send
-
Field Details
-
INBOUND_DESTINATION_NAME_KEY
- See Also:
-
INBOUND_CLIENT_ID_KEY
- See Also:
-
INBOUND_CONNECTION_METADATA_KEY
- See Also:
-
OUTBOUND_DESTINATION_NAME_KEY
- See Also:
-
OUTBOUND_CLIENT_ID_KEY
- See Also:
-
OUTBOUND_CONNECTION_METADATA_KEY
- See Also:
-
-
Constructor Details
-
JMSTransport
- Parameters:
theInboundDestination- wrapper around the Queue or Topic to which outgoing messages are to be senttheOutboundDestination- wrapper around the Queue or Topic from which incoming messages are to be retrieved
-
JMSTransport
public JMSTransport()
-
-
Method Details
-
doSend
Description copied from class:AbstractTransportThe method send() delegates to this method after checking whether we are connected.- Specified by:
doSendin classAbstractTransport- Throws:
TransportException- See Also:
-
toMessage
Fills a JMS message object with text and metadata from the givenTransportable. The default implementation obtains a the Message from getMessage(), and expects this to be a TextMessage. Override this method if you want to use a different message type.- Parameters:
theSource- a Transportable from which to obtain data for filling the given Message- Returns:
- a Message containing data from the given Transportable
- Throws:
TransportException
-
toTransportable
Copies data from the given Message into a Transportable. The default implementation expects a TextMessage, but this can be overridden.- Parameters:
theMessage- a JMS Message from which to obtain data- Returns:
- a Transportable containing data from the given Message
- Throws:
TransportException
-
doReceive
Description copied from class:AbstractTransportCalled by receive(), which then adds common metadata.- Specified by:
doReceivein classAbstractTransport- Returns:
- Transportable the next available message
- Throws:
TransportException- See Also:
-
getCommonMetadata
Returns metadata under the static keys defined by this class.- Specified by:
getCommonMetadatain interfaceTransportLayer- Overrides:
getCommonMetadatain classAbstractTransport- Returns:
- metadata to be added to the metadata of all incoming messages. This provides a way of associating connection information with incoming messages (eg the IP address of the remote server).
- See Also:
-
doConnect
Description copied from class:AbstractTransportPerforms connection as described in TransportLayer.connect(). The connect() method of this class delegates to doConnect() after some internal housekeeping.- Specified by:
doConnectin classAbstractTransport- Throws:
TransportException- See Also:
-
doDisconnect
Description copied from class:AbstractTransportPerforms disconnection as described in TransportLayer.disconnect(). The disconnect() method of this class delegates to doDisconnect() after some internal housekeeping.- Specified by:
doDisconnectin classAbstractTransport- Throws:
TransportException- See Also:
-