Class LowerLayerProtocol

java.lang.Object
ca.uhn.hl7v2.llp.LowerLayerProtocol
Direct Known Subclasses:
ExtendedMinLowerLayerProtocol, MinLowerLayerProtocol

public abstract class LowerLayerProtocol extends Object
Represents a particular "lower layer protocol" over which HL7 messages can be sent. An example is the "minimal lower layer protocol" defines in the HL7 implementation guide (appendix C) - this is implemented by the class MinLowerLayerProtocol. Implementations should call the static method logCharacterReceived() when a character is read from a remote system. This method may or may not log receipt, as configured (see docs for this method).
Author:
Bryan Tripp
  • Field Details

  • Constructor Details

  • Method Details

    • makeLLP

      public static LowerLayerProtocol makeLLP()
      Deprecated.
      as there is now the choice between MinLowerLayerProtocol and ExtendedMinLowerLayerProtocol.
      Returns a particular implementation of LowerLayerProtocol.
    • makeLLP

      public static LowerLayerProtocol makeLLP(boolean respectMSH18)
      Returns a particular implementation of LowerLayerProtocol
      Parameters:
      respectMSH18 -
      Returns:
      LowerLayerProtocol implementation
    • getReader

      public abstract HL7Reader getReader(InputStream in) throws LLPException
      Returns an HL7Reader that implements message reading according to this protocol.
      Throws:
      LLPException
    • getWriter

      public abstract HL7Writer getWriter(OutputStream out) throws LLPException
      Returns an HL7Writer that implements message writing according to this protocol.
      Throws:
      LLPException
    • logCharacterReceived

      public static void logCharacterReceived(int c)

      Logs the fact that a character has been received, if configured to do so.

      This logging is enabled by configuring the underlying log system to allow the logger named "ca.uhn.hl7v2.llp.LowerLayerProtocol" to log events at a level of "trace".

    • setCharset

      public void setCharset(Charset theCharset)
      Provides a charset to use for character encoding
      Parameters:
      theCharset - The charset to use
      Since:
      1.3
    • setCharset

      public void setCharset(String charsetName)
      Provides a charset to use for character encoding
      Parameters:
      charsetName - The name of the charset to use
      Since:
      2.1