Examples of LowerLayerProtocol


Examples of ca.uhn.hl7v2.llp.LowerLayerProtocol

  public void afterPropertiesSet() throws Exception {
    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

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

      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

  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

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

      final Parser parser = new PipeParser();
      LowerLayerProtocol llp = new MinLowerLayerProtocol();
      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

  /**
   * @since 2.0
   */
  public Connection attach(String host, int outboundPort, int inboundPort, Parser parser,
    Class<? extends LowerLayerProtocol> llpClass, boolean tls) throws HL7Exception {
    LowerLayerProtocol llp = ReflectionUtil.instantiate(llpClass);
    return attach(host, outboundPort, inboundPort, parser, llp, tls);
  }
View Full Code Here

Examples of ca.uhn.hl7v2.llp.LowerLayerProtocol

           
            try {
                if (args.length > 0) {
                    HL7Service service = null;
                    GenericParser parser = new GenericParser();
                    LowerLayerProtocol llp = LowerLayerProtocol.makeLLP();
                    int inPort = Integer.parseInt(args[0]);
                    if (args.length > 1) {
                        int outPort = Integer.parseInt(args[1]);
                        service = new TwoPortService(panel.getParser(), llp, inPort, outPort);
                    } else {
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";

            //get a bunch of threads to send messages
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

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

      final Parser parser = new PipeParser();
      LowerLayerProtocol llp = new MinLowerLayerProtocol();
      Connection connection = new ActiveConnection(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
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.