Package ca.uhn.hl7v2.llp

Examples of ca.uhn.hl7v2.llp.MinLowerLayerProtocol


  /**
   * 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, new MinLowerLayerProtocol(), new PipeParser(), tls);
 
View Full Code Here


            ValidationContext validationContext, ModelClassFactory modelClassFactory) {
        VersionLogger.init();
        setParserConfiguration(parserConfiguration);
        setValidationContext(validationContext);
        setModelClassFactory(modelClassFactory);
        setLowerLayerProtocol(new MinLowerLayerProtocol(false));
        setSocketFactory(new StandardSocketFactory());
        setValidationExceptionHandlerFactory(new ReportingValidationExceptionHandler(true));
        setProfileStore(ProfileStoreFactory.getProfileStore());
        setCodeStoreRegistry(new DefaultCodeStoreRegistry());
        setServerConfiguration(new ServerConfiguration());
View Full Code Here

            ValidationRuleBuilder builder, ModelClassFactory modelClassFactory) {
        VersionLogger.init();
        setParserConfiguration(parserConfiguration);
        setValidationRuleBuilder(builder);
        setModelClassFactory(modelClassFactory);
        setLowerLayerProtocol(new MinLowerLayerProtocol(false));
        setSocketFactory(new StandardSocketFactory());
        setProfileStore(ProfileStoreFactory.getProfileStore());
        setCodeStoreRegistry(new DefaultCodeStoreRegistry());
        setServerConfiguration(new ServerConfiguration());
    }
View Full Code Here

  public MessageValidator getMessageValidator() {
    return new MessageValidator(this);
  }

  public HL7Service getSimpleService(int port, boolean tls) {
    return new SimpleServer(port, new MinLowerLayerProtocol(), getPipeParser(), tls,
        getExecutorService());
  }
View Full Code Here

    return new SimpleServer(port, new MinLowerLayerProtocol(), getPipeParser(), tls,
        getExecutorService());
  }

  public HL7Service getTwoPortService(int port1, int port2, boolean tls) {
    return new TwoPortService(getPipeParser(), new MinLowerLayerProtocol(), port1, port2, tls,
        getExecutorService());
  }
View Full Code Here

    myContext = new DefaultHapiContext();
    StandardSocketFactory socketFactory = new StandardSocketFactory();
    socketFactory.setAcceptedSocketTimeout(2000);
    myContext.setSocketFactory(socketFactory);
    myContext.setExecutorService(Executors.newCachedThreadPool(new MyThreadFactory()));
    myContext.setLowerLayerProtocol(new MinLowerLayerProtocol(true));
    myContext.setModelClassFactory(new GenericModelClassFactory());
    myServer = myContext.newServer(myPort, false);

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

     *
     * By default, MinLowerLayerProtocol uses the "US-ASCII" character set, which is not likely
     * what you are looking for if you want to process accents or characters that don't
     * appear in the English alphabet.
     */
    SimpleServer s = new SimpleServer(123, new MinLowerLayerProtocol(), new PipeParser());

    /*
     * Using MinLowerLayerProtocol, it is possible to set the use of a specific character set
     * by using a system property. For example, if you wanted to receive Central and Eastern
     * European characters, you probably need the ISO-8859-2 charset. Setting the following
     * system property before using MinLowerLayerProtocol tells the LLP that incoming
     * messages should be received using this encoding. Note that you can not change this
     * value after a connection is established.
     */
    System.setProperty(MinLLPReader.CHARSET_KEY, "ISO-8859-2");
    s = new SimpleServer(123, new MinLowerLayerProtocol(), new PipeParser());
   
    /*
     * If the systems sending you messages are correctly
     * populating MSH-18, as in the following message which specified "8859/1", or
     * ISO-8859-1 encoding, you have another option.
View Full Code Here

            ValidationContext validationContext, ModelClassFactory modelClassFactory) {
        VersionLogger.init();
        setParserConfiguration(parserConfiguration);
        setValidationContext(validationContext);
        setModelClassFactory(modelClassFactory);
        setLowerLayerProtocol(new MinLowerLayerProtocol());
        setSocketFactory(new StandardSocketFactory());
        setValidationExceptionHandlerFactory(new ReportingValidationExceptionHandler(true));
        setProfileStore(ProfileStoreFactory.getProfileStore());
        setCodeStoreRegistry(new DefaultCodeStoreRegistry());
    }
View Full Code Here

            ValidationRuleBuilder builder, ModelClassFactory modelClassFactory) {
        VersionLogger.init();
        setParserConfiguration(parserConfiguration);
        setValidationRuleBuilder(builder);
        setModelClassFactory(modelClassFactory);
        setLowerLayerProtocol(new MinLowerLayerProtocol());
        setSocketFactory(new StandardSocketFactory());
        setProfileStore(ProfileStoreFactory.getProfileStore());
        setCodeStoreRegistry(new DefaultCodeStoreRegistry());
    }
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 = 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

TOP

Related Classes of ca.uhn.hl7v2.llp.MinLowerLayerProtocol

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.