View Javadoc

1   /*
2    * Created on 15-Apr-2004
3    */
4   package ca.uhn.hl7v2.protocol;
5   
6   import java.util.Map;
7   
8   /**
9    * An HL7 message in text form, with optional metadata, which can 
10   * be handled in a transport layer. 
11   * 
12   * @author <a href="mailto:bryan.tripp@uhn.on.ca">Bryan Tripp</a>
13   * @version $Revision: 1.1 $ updated on $Date: 2007-02-19 02:24:38 $ by $Author: jamesagnew $
14   */
15  public interface Transportable {
16  
17      /**
18       * @return the text of an HL7 message (either ER7 or XML encoding).
19       */
20      public String getMessage();
21      
22      /**
23       * @return metadata associated with the message.  If the message is being 
24       * sent to a <code>TransportLayer</code>, this may include selected message fields
25       * (eg to facilitate routing based on MSH fields without re-parsing the   
26       * message).  If the message is being received, this may include 
27       * information such as the IP address of the server from which the message 
28       * was received (this depends on the underlying <code>TransportLayer</code> used).  
29       * Message fields are keyed with <code>Terser</code> path names.  
30       */
31      public Map<String, Object> getMetadata();
32      
33  }