|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectca.uhn.hl7v2.protocol.impl.AbstractTransport
ca.uhn.hl7v2.protocol.impl.JMSTransport
public class JMSTransport
A TransportLayer
that exchanges messages through JMS destinations.
Field Summary | |
---|---|
static java.lang.String |
INBOUND_CLIENT_ID_KEY
|
static java.lang.String |
INBOUND_CONNECTION_METADATA_KEY
|
static java.lang.String |
INBOUND_DESTINATION_NAME_KEY
|
static java.lang.String |
OUTBOUND_CLIENT_ID_KEY
|
static java.lang.String |
OUTBOUND_CONNECTION_METADATA_KEY
|
static java.lang.String |
OUTBOUND_DESTINATION_NAME_KEY
|
Constructor Summary | |
---|---|
JMSTransport()
|
|
JMSTransport(JMSDestination theInboundDestination,
JMSDestination theOutboundDestination)
|
Method Summary | |
---|---|
void |
doConnect()
Performs connection as described in TransportLayer.connect(). |
void |
doDisconnect()
Performs disconnection as described in TransportLayer.disconnect(). |
Transportable |
doReceive()
Called by receive(), which then adds common metadata. |
void |
doSend(Transportable theMessage)
The method send() delegates to this method after checking whether we are connected. |
java.util.Map |
getCommonMetadata()
Returns metadata under the static keys defined by this class. |
protected javax.jms.Message |
toMessage(Transportable theSource)
Fills a JMS message object with text and metadata from the given Transportable . |
protected Transportable |
toTransportable(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, 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 |
Field Detail |
---|
public static final java.lang.String INBOUND_DESTINATION_NAME_KEY
public static final java.lang.String INBOUND_CLIENT_ID_KEY
public static final java.lang.String INBOUND_CONNECTION_METADATA_KEY
public static final java.lang.String OUTBOUND_DESTINATION_NAME_KEY
public static final java.lang.String OUTBOUND_CLIENT_ID_KEY
public static final java.lang.String OUTBOUND_CONNECTION_METADATA_KEY
Constructor Detail |
---|
public JMSTransport(JMSDestination theInboundDestination, JMSDestination theOutboundDestination)
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 retrievedpublic JMSTransport()
theConnection
- JMS connection over which messages are exchangedtheDestination
- JMS destination to which messages are produced and
from which messages are consumedMethod Detail |
---|
public void doSend(Transportable theMessage) throws TransportException
AbstractTransport
doSend
in class AbstractTransport
TransportException
ca.uhn.hl7v2.protocol.Transport#doSend(ca.uhn.hl7v2.protocol.Transportable)
protected javax.jms.Message toMessage(Transportable theSource) throws TransportException
Transportable
. 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.
theSource
- a Transportable from which to obtain data for filling the
given Message
TransportException
protected Transportable toTransportable(javax.jms.Message theMessage) throws TransportException
theMessage
- a JMS Message from which to obtain data
TransportException
public Transportable doReceive() throws TransportException
AbstractTransport
doReceive
in class AbstractTransport
TransportException
ca.uhn.hl7v2.protocol.AbstractTransport#doReceive()
public java.util.Map getCommonMetadata()
getCommonMetadata
in interface TransportLayer
getCommonMetadata
in class AbstractTransport
TransportLayer.getCommonMetadata()
public void doConnect() throws TransportException
AbstractTransport
doConnect
in class AbstractTransport
TransportException
AbstractTransport.doConnect()
public void doDisconnect() throws TransportException
AbstractTransport
doDisconnect
in class AbstractTransport
TransportException
AbstractTransport.doDisconnect()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |