Examples of PipeParser


Examples of ca.uhn.hl7v2.parser.PipeParser

      
    private PipeParser parser;
   
    /** Creates a new instance of TestApplication */
    public TestApplication() {
        parser = new PipeParser();
    }
View Full Code Here

Examples of ca.uhn.hl7v2.parser.PipeParser

      char[] cbuf = new char[fileLength];
      in.read(cbuf, 0, fileLength);
      String messageString = new String(cbuf);

      // parse inbound message ...
      final Parser parser = new PipeParser();
      Message inMessage = null;
      try {
        inMessage = parser.parse(messageString);
      } catch (HL7Exception e) {
        e.printStackTrace();
      }

      // process with responder ...
View Full Code Here

Examples of ca.uhn.hl7v2.parser.PipeParser

  /**
   * Creates a new instance of SimpleServer that listens on the given port,
   * using the {@link MinLowerLayerProtocol} and a standard {@link PipeParser}.
   */
  public SimpleServer(int port) {
    this(port, LowerLayerProtocol.makeLLP(), new PipeParser(), false);
  }
View Full Code Here

Examples of ca.uhn.hl7v2.parser.PipeParser

  /**
   * Creates a new instance of SimpleServer that listens on the given port,
   * using the {@link MinLowerLayerProtocol} and a standard {@link PipeParser}.
   */
  public SimpleServer(int port, boolean tls) {
    this(port, LowerLayerProtocol.makeLLP(), new PipeParser(), tls);
 
View Full Code Here

Examples of ca.uhn.hl7v2.parser.PipeParser

      // set up connection to server
      String host = args[0];
      int port = Integer.parseInt(args[1]);

      final Parser parser = new PipeParser();
      LowerLayerProtocol llp = LowerLayerProtocol.makeLLP();
      Connection connection = new Connection(parser, llp, new Socket(
          host, port));
      final Initiator initiator = connection.getInitiator();
      final String outText = "MSH|^~\\&|||||||ACK^^ACK|||R|2.4|\rMSA|AA";

      // get a bunch of threads to send messages
      for (int i = 0; i < 1000; i++) {
        Thread sender = new Thread(new Runnable() {
          public void run() {
            try {
              // get message ID
              String ID = MessageIDGenerator.getInstance()
                  .getNewID();
              Message out = parser.parse(outText);
              Terser tOut = new Terser(out);
              tOut.set("/MSH-10", ID);

              // send, get response
              Message in = initiator.sendAndReceive(out);
View Full Code Here

Examples of ca.uhn.hl7v2.parser.PipeParser

        return new ca.uhn.hl7v2.conf.check.DefaultValidator(this);
    }

    public synchronized PipeParser getPipeParser() {
        if (pipeParser == null) {
            pipeParser = new PipeParser(this);
        }
        return pipeParser;
    }
View Full Code Here

Examples of ca.uhn.hl7v2.parser.PipeParser

  public void setDefaultModelClassFactory(ModelClassFactory modelClassFactory) {
    this.modelClassFactory = modelClassFactory;
  }

  public PipeParser getPipeParser() {
    return new PipeParser(this);
  }
View Full Code Here

Examples of ca.uhn.hl7v2.parser.PipeParser

                    for (int i = 0; i < nextStructureList.size(); i++) {
                        if (i > 0) {
                            indent(theStringBuilder, currentIndent + structurePrefix.length());
                        }
                        Segment nextSegment = (Segment)nextStructureList.get(i);
                        theStringBuilder.append(new PipeParser().doEncode(nextSegment, EncodingCharacters.getInstance(getMessage())));
                        theStringBuilder.append(lineSeparator);
                       
                    }
                }
               
View Full Code Here

Examples of ca.uhn.hl7v2.parser.PipeParser

     * <p>Serialization note: The message parser is marked as transient, so it will not
     * survive serialization.</p>
     */
    public Parser getParser() {
        if (myParser == null) {
            myParser = new PipeParser();
        }

        return myParser;
    }
View Full Code Here

Examples of ca.uhn.hl7v2.parser.PipeParser

      char[] cbuf = new char[fileLength];
      in.read(cbuf, 0, fileLength);
      String messageString = new String(cbuf);

      // parse inbound message ...
      final Parser parser = new PipeParser();
      Message inMessage = null;
      try {
        inMessage = parser.parse(messageString);
      } catch (HL7Exception e) {
        e.printStackTrace();
      }

      // process with responder ...
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.