Interface TransportLayer

All Known Implementing Classes:
AbstractJMSTransport, AbstractTransport, JMSQueueTransport, JMSTopicTransport, JMSTransport, MLLPTransport, URLTransport

public interface TransportLayer
Encapsulates the transport layer of a connection to another HL7 server. This is the layer responsible for sending and receiving message strings. The underlying protocol used is implementation dependent, that is there may be transport layers that are implemented over email, or JMS, or HTTP.
Version:
$Revision: 1.1 $ updated on $Date: 2007-02-19 02:24:38 $ by $Author: jamesagnew $
Author:
Bryan Tripp
  • Method Details

    • send

      void send(Transportable theMessage) throws TransportException
      Sends a message to a remote HL7 service.
      Parameters:
      theMessage - the message to send
      Throws:
      TransportException
    • receive

      Gets the next message from the remote system. This call blocks until the next message is available.
      Returns:
      the next available message
      Throws:
      TransportException
    • getCommonMetadata

      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).
    • connect

      Initializes a connection to the remote server. This can be called after an exception is encountered, to refresh a dead connection.
      Throws:
      TransportException
    • isConnected

      boolean isConnected()
      Returns:
      true if connect() has completed successfully. Note that true may be returned even if a connection is dead (ie the implementation need not test a connection during this call) but should return false if connect() has not been called, or if connect() has been called and is pending.
    • disconnect

      Drops any existing connection to the remote server.
      Throws:
      TransportException