|
||||||||||
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 TransportLayer
TransportLayer.getCommonMetadata()
public Transportable receive() throws TransportException
doReceive()
and adds common metadata
to the resulting Transportable
before it is returned.
receive
in interface TransportLayer
TransportException
public abstract Transportable doReceive() throws TransportException
TransportException
public void send(Transportable theMessage) throws TransportException
doSend()
after checking that we are connected.
send
in interface TransportLayer
theMessage
- the message to send
TransportException
TransportLayer.send(Transportable)
public abstract void doSend(Transportable theMessage) throws TransportException
theMessage
-
TransportException
public void connect() throws TransportException
connect
in interface TransportLayer
TransportException
TransportLayer.connect()
public abstract void doConnect() throws TransportException
TransportException
public boolean isConnected()
isConnected
in interface TransportLayer
TransportLayer.isConnected()
public void disconnect() throws TransportException
TransportLayer
disconnect
in interface TransportLayer
TransportException
TransportLayer.disconnect()
public abstract void doDisconnect() throws TransportException
TransportException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |