Package ca.uhn.hl7v2.hoh.raw.api

Examples of ca.uhn.hl7v2.hoh.raw.api.RawReceivable.addMetadata()


        d.readHeadersAndContentsFromInputStreamAndDecode(myInputStream);

        response = new RawReceivable(d.getMessage());
        InetSocketAddress remoteSocketAddress = (InetSocketAddress) socket.getRemoteSocketAddress();
        String hostAddress = remoteSocketAddress.getAddress() != null ? remoteSocketAddress.getAddress().getHostAddress() : null;
        response.addMetadata(MessageMetadataKeys.REMOTE_HOST_ADDRESS.name(), hostAddress);

        if (d.isConnectionCloseHeaderPresent()) {
          ourLog.debug("Found Connection=close header, closing socket");
          closeSocket(socket);
        }
View Full Code Here


    Charset charset = decoder.getCharset();
    ourLog.debug("Message charset is {}", charset.displayName());

    RawReceivable rawMessage = new RawReceivable(decoder.getMessage());
    rawMessage.addMetadata(MessageMetadataKeys.REMOTE_HOST_ADDRESS.name(), theReq.getRemoteAddr());

    IResponseSendable<String> response;
    try {
      response = myMessageHandler.messageReceived(rawMessage);
    } catch (MessageProcessingException e) {
View Full Code Here

        d.readHeadersAndContentsFromInputStreamAndDecode(myInputStream);

        response = new RawReceivable(d.getMessage());
        InetSocketAddress remoteSocketAddress = (InetSocketAddress) socket.getRemoteSocketAddress();
        String hostAddress = remoteSocketAddress.getAddress() != null ? remoteSocketAddress.getAddress().getHostAddress() : null;
        response.addMetadata(MessageMetadataKeys.REMOTE_HOST_ADDRESS.name(), hostAddress);

      } catch (NoMessageReceivedException ex) {
        ourLog.debug("No message received yet");
      } catch (IOException e) {
        throw new DecodeException("Failed to read response from remote host", e);
View Full Code Here

    Charset charset = decoder.getCharset();
    ourLog.debug("Message charset is {}", charset.displayName());

    RawReceivable rawMessage = new RawReceivable(decoder.getMessage());
    rawMessage.addMetadata(MessageMetadataKeys.REMOTE_HOST_ADDRESS.name(), theReq.getRemoteAddr());

    IResponseSendable<String> response;
    try {
      response = myMessageHandler.messageReceived(rawMessage);
    } catch (MessageProcessingException e) {
View Full Code Here

        d.readHeadersAndContentsFromInputStreamAndDecode(myInputStream);

        response = new RawReceivable(d.getMessage());
        InetSocketAddress remoteSocketAddress = (InetSocketAddress) socket.getRemoteSocketAddress();
        String hostAddress = remoteSocketAddress.getAddress() != null ? remoteSocketAddress.getAddress().getHostAddress() : null;
        response.addMetadata(MessageMetadataKeys.REMOTE_HOST_ADDRESS.name(), hostAddress);

      } catch (NoMessageReceivedException ex) {
        ourLog.debug("No message received yet");
      } catch (IOException e) {
        throw new DecodeException("Failed to read response from remote host", e);
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.