|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectca.uhn.hl7v2.protocol.impl.AbstractTransport
public abstract class AbstractTransport
A base implementation of TransportLayer which looks after the
addition of common metadata to each inbound Transportable.
| Constructor Summary | |
|---|---|
AbstractTransport()
|
|
| Method Summary | |
|---|---|
void |
connect()
Sets isConnected() to false, then calls doConnect(), then sets isConnected() to true. |
void |
disconnect()
Drops any existing connection to the remote server. |
abstract void |
doConnect()
Performs connection as described in TransportLayer.connect(). |
abstract void |
doDisconnect()
Performs disconnection as described in TransportLayer.disconnect(). |
abstract Transportable |
doReceive()
Called by receive(), which then adds common metadata. |
abstract void |
doSend(Transportable theMessage)
The method send() delegates to this method after checking whether we are connected. |
java.util.Map |
getCommonMetadata()
|
boolean |
isConnected()
|
Transportable |
receive()
Delegates to doReceive() and adds common metadata
to the resulting Transportable before it is returned. |
void |
send(Transportable theMessage)
Delegates to doSend() after checking that we are connected. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractTransport()
| Method Detail |
|---|
public java.util.Map getCommonMetadata()
getCommonMetadata in interface TransportLayerTransportLayer.getCommonMetadata()
public Transportable receive()
throws TransportException
doReceive() and adds common metadata
to the resulting Transportable before it is returned.
receive in interface TransportLayerTransportException
public abstract Transportable doReceive()
throws TransportException
TransportException
public void send(Transportable theMessage)
throws TransportException
doSend() after checking that we are connected.
send in interface TransportLayertheMessage - the message to send
TransportExceptionTransportLayer.send(Transportable)
public abstract void doSend(Transportable theMessage)
throws TransportException
theMessage -
TransportException
public void connect()
throws TransportException
connect in interface TransportLayerTransportExceptionTransportLayer.connect()
public abstract void doConnect()
throws TransportException
TransportExceptionpublic boolean isConnected()
isConnected in interface TransportLayerTransportLayer.isConnected()
public void disconnect()
throws TransportException
TransportLayer
disconnect in interface TransportLayerTransportExceptionTransportLayer.disconnect()
public abstract void doDisconnect()
throws TransportException
TransportException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||