Package ca.uhn.hl7v2.parser

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


    if (myPort <= 0) {
      throw new IllegalStateException("Port not set");
    }
   
    LowerLayerProtocol llp = new ExtendedMinLowerLayerProtocol();
    Parser parser = new PipeParser(new GenericModelClassFactory());
    myServer = new SimpleServer(myPort, llp, parser);

    for (int i = 0; i < myAppRoutingData.size(); i++) {
      myServer.registerApplication(myAppRoutingData.get(i), myApplications.get(i));
    }
View Full Code Here

     * <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

  public boolean hasNext() {
    return myWrapped.hasNext();
  }

  private void init() {
    myParser = new PipeParser();
    myParser.setValidationContext(new ValidationContextImpl());
  }
View Full Code Here

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

                    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

      // 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();
      connection.activate();
      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

      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

  private boolean tls;
  private BlockingQueue<AcceptedSocket> queue;
  private AcceptorThread inboundAcceptor, outboundAcceptor;

  public TwoPortService(int inboundPort, int outboundPort) {
    this(new PipeParser(), LowerLayerProtocol.makeLLP(), inboundPort,
        outboundPort, false);
  }
View Full Code Here

    this(new PipeParser(), LowerLayerProtocol.makeLLP(), inboundPort,
        outboundPort, false);
  }

  public TwoPortService(int inboundPort, int outboundPort, boolean tls) {
    this(new PipeParser(), LowerLayerProtocol.makeLLP(), inboundPort,
        outboundPort, tls);
  }
View Full Code Here

TOP

Related Classes of ca.uhn.hl7v2.parser.PipeParser

Copyright © 2018 www.massapicom. 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.