Package ca.uhn.hl7v2.hoh.encoder

Examples of ca.uhn.hl7v2.hoh.encoder.Hl7OverHttpRequestEncoder


   */
  public void writeMessage(String theRawMessage) throws LLPException, IOException {

    AbstractHl7OverHttpEncoder e;
    if (myProtocol.getRole() == ServerRoleEnum.CLIENT) {
      e = new Hl7OverHttpRequestEncoder();
      if (myProtocol.getAuthorizationClientCallback() != null) {
        e.setUsername(myProtocol.getAuthorizationClientCallback().provideUsername(myProtocol.getUriPath()));
        e.setPassword(myProtocol.getAuthorizationClientCallback().providePassword(myProtocol.getUriPath()));
      }
    } else {
View Full Code Here


  }


  private IReceivable<String> doSendAndReceiveInternal(ISendable theMessageToSend, Socket socket) throws IOException, DecodeException, SignatureVerificationException, EncodeException {
    Hl7OverHttpRequestEncoder enc = new Hl7OverHttpRequestEncoder();
    enc.setUri(myUri);
    enc.setHost(myHost);
    enc.setPort(myPort);
    enc.setCharset(myCharset);
    if (myAuthorizationCallback != null) {
      enc.setUsername(myAuthorizationCallback.provideUsername(myUri));
      enc.setPassword(myAuthorizationCallback.providePassword(myUri));
    }
    enc.setSigner(mySigner);
    enc.setDataProvider(theMessageToSend);

    ourLog.debug("Writing message to OutputStream");
    enc.encodeToOutputStream(myOutputStream);
    myOutputStream.flush();

    ourLog.debug("Reading response from OutputStream");

    RawReceivable response = null;
View Full Code Here

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

        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

    public Type getComponent(int number) throws DataTypeException {

        try {
            return this.data[number];
        } catch (ArrayIndexOutOfBoundsException e) {
            throw new DataTypeException("Element " + number + " doesn't exist (Type " + getClass().getName() + " has only " + this.data.length + " components)");
        }
    }
View Full Code Here

    public Type getComponent(int number) throws DataTypeException {

        try {
            return this.data[number];
        } catch (ArrayIndexOutOfBoundsException e) {
            throw new DataTypeException("Element " + number + " doesn't exist (Type " + getClass().getName() + " has only " + this.data.length + " components)");
        }
    }
View Full Code Here

    public Type getComponent(int number) throws DataTypeException {

        try {
            return this.data[number];
        } catch (ArrayIndexOutOfBoundsException e) {
            throw new DataTypeException("Element " + number + " doesn't exist (Type " + getClass().getName() + " has only " + this.data.length + " components)");
        }
    }
View Full Code Here

    public Type getComponent(int number) throws DataTypeException {

        try {
            return this.data[number];
        } catch (ArrayIndexOutOfBoundsException e) {
            throw new DataTypeException("Element " + number + " doesn't exist (Type " + getClass().getName() + " has only " + this.data.length + " components)");
        }
    }
View Full Code Here

    public Type getComponent(int number) throws DataTypeException {

        try {
            return this.data[number];
        } catch (ArrayIndexOutOfBoundsException e) {
            throw new DataTypeException("Element " + number + " doesn't exist (Type " + getClass().getName() + " has only " + this.data.length + " components)");
        }
    }
View Full Code Here

    public Type getComponent(int number) throws DataTypeException {

        try {
            return this.data[number];
        } catch (ArrayIndexOutOfBoundsException e) {
            throw new DataTypeException("Element " + number + " doesn't exist (Type " + getClass().getName() + " has only " + this.data.length + " components)");
        }
    }
View Full Code Here

TOP

Related Classes of ca.uhn.hl7v2.hoh.encoder.Hl7OverHttpRequestEncoder

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.