Examples of LowerLayerProtocol


Examples of ca.uhn.hl7v2.llp.LowerLayerProtocol

public class HL7Server {

    private SimpleServer server;

    public HL7Server(int port) {
        LowerLayerProtocol llp = LowerLayerProtocol.makeLLP(); // The transport protocol
        PipeParser parser = new PipeParser();
        server = new SimpleServer(port, llp, parser);
    }
View Full Code Here

Examples of ca.uhn.hl7v2.llp.LowerLayerProtocol

        return new HL7Endpoint();
    }

    @Override
    protected void startEndpoint(HL7Endpoint endpoint) throws AxisFault {
        LowerLayerProtocol llp = LowerLayerProtocol.makeLLP();
        PipeParser parser = new PipeParser();
        SimpleServer server = new SimpleServer(endpoint.getPort(), llp, parser);
        Application callback = new HL7MessageProcessor(endpoint);
        server.registerApplication("*", "*", callback);
        server.start();
View Full Code Here

Examples of ca.uhn.hl7v2.llp.LowerLayerProtocol

      boolean tls = false;
      int i = 0;

      try {
        if (args.length > 0) {
          LowerLayerProtocol llp = LowerLayerProtocol.makeLLP();

          if ("tls".equals(args[i]) || "ssl".equals(args[i])) {
            tls = true;
            i++;
          }
View Full Code Here

Examples of ca.uhn.hl7v2.llp.LowerLayerProtocol

      // 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";
View Full Code Here

Examples of ca.uhn.hl7v2.llp.LowerLayerProtocol

      // 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";
View Full Code Here

Examples of ca.uhn.hl7v2.llp.LowerLayerProtocol

  public Connection attach(String host, int outboundPort, int inboundPort,
      Parser parser, Class<? extends LowerLayerProtocol> llpClass,
      boolean tls) throws HL7Exception {
    try {
      LowerLayerProtocol llp = llpClass.newInstance();
      return attach(host, outboundPort, inboundPort, parser, llp, tls);
    } catch (InstantiationException e) {
      throw new HL7Exception("Cannot open connection to " + host + ":"
          + outboundPort, e);
    } catch (IllegalAccessException e) {
View Full Code Here

Examples of ca.uhn.hl7v2.llp.LowerLayerProtocol

          }
         
          if (conn == null) {
              try {
                  //Parser p = (Parser) parserClass.newInstance();
                  LowerLayerProtocol llp = llpClass.newInstance();
                  conn = connect(host, port, parser, llp);
              } catch (ClassCastException e) {
                  //Log.tryToLog(cce, "Problem opening new connection to " + host + " port " + port);
                  throw new HL7Exception( "ClassCastException - need a LowerLayerProtocol class to get an Inititator",
                                          HL7Exception.APPLICATION_INTERNAL_ERROR,
View Full Code Here

Examples of ca.uhn.hl7v2.llp.LowerLayerProtocol

        /*
         * Create a server to listen for incoming messages
         */

        int port = 1011; // The port to listen on
        LowerLayerProtocol llp = LowerLayerProtocol.makeLLP(); // The transport protocol
        PipeParser parser = new PipeParser(); // The message parser
        SimpleServer server = new SimpleServer(port, llp, parser);

        /*
         * The server may have any number of "application" objects registered to handle messages. We
View Full Code Here

Examples of ca.uhn.hl7v2.llp.LowerLayerProtocol

        /*
         * Create a server to listen for incoming messages
         */

        int port = 1011; // The port to listen on
        LowerLayerProtocol llp = LowerLayerProtocol.makeLLP(); // The transport protocol
        PipeParser parser = new PipeParser(); // The message parser
        SimpleServer server = new SimpleServer(port, llp, parser);

        /*
         * The server may have any number of "application" objects registered to handle messages. We
View Full Code Here

Examples of ca.uhn.hl7v2.llp.LowerLayerProtocol

      boolean tls = false;
      int i = 0;

      try {
        if (args.length > 0) {
          LowerLayerProtocol llp = LowerLayerProtocol.makeLLP();

          if ("tls".equals(args[i]) || "ssl".equals(args[i])) {
            tls = true;
            i++;
          }
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.