001    /*
002     * Created on 15-Apr-2004
003     */
004    package ca.uhn.hl7v2.protocol;
005    
006    import java.util.Map;
007    
008    /**
009     * An HL7 message in text form, with optional metadata, which can 
010     * be handled in a transport layer. 
011     * 
012     * @author <a href="mailto:bryan.tripp@uhn.on.ca">Bryan Tripp</a>
013     * @version $Revision: 1.1 $ updated on $Date: 2007/02/19 02:24:38 $ by $Author: jamesagnew $
014     */
015    public interface Transportable {
016    
017        /**
018         * @return the text of an HL7 message (either ER7 or XML encoding).
019         */
020        public String getMessage();
021        
022        /**
023         * @return metadata associated with the message.  If the message is being 
024         * sent to a <code>TransportLayer</code>, this may include selected message fields
025         * (eg to facilitate routing based on MSH fields without re-parsing the   
026         * message).  If the message is being received, this may include 
027         * information such as the IP address of the server from which the message 
028         * was received (this depends on the underlying <code>TransportLayer</code> used).  
029         * Message fields are keyed with <code>Terser</code> path names.  
030         */
031        public Map getMetadata();
032        
033    }