ca.infoway.messagebuilder.transport.mohawk
Class MohawkTransportLayer

Package class diagram package MohawkTransportLayer
java.lang.Object
  extended by ca.infoway.messagebuilder.transport.mohawk.MohawkTransportLayer
All Implemented Interfaces:
TransportLayer

public class MohawkTransportLayer
extends Object
implements TransportLayer

Implementation of a transport layer for sending messages to Mohawk HIAL via SOAP. SOAP is one of two common interfaces for HL7 messages.

Makes use of Apache Commons HttpClient for communication.

Author:
Intelliware Development

Constructor Summary
MohawkTransportLayer()
          Constructs a Mohawk transport layer using a well-known url.
MohawkTransportLayer(Client client, String url)
          Constructs a Mohawk transport layer for the given url.
MohawkTransportLayer(String url)
          Constructs a Mohawk transport layer for the given url.
 
Method Summary
 String sendRequestAndGetResponse(CredentialsProvider credentialsProvider, RequestMessage requestMessage)
          Sends a request message synchronously and returns a response message as a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MohawkTransportLayer

public MohawkTransportLayer()

Constructs a Mohawk transport layer using a well-known url. Makes use of the default tranport mechanism (HttpClient)


MohawkTransportLayer

public MohawkTransportLayer(String url)

Constructs a Mohawk transport layer for the given url. Makes use of the default tranport mechanism (HttpClient)

Parameters:
url - the target url to send messages to

MohawkTransportLayer

public MohawkTransportLayer(Client client,
                            String url)

Constructs a Mohawk transport layer for the given url. Makes use of provided client instead of the default HttpClient.

Parameters:
client - the transport client to use
url - the target url to send messages to
Method Detail

sendRequestAndGetResponse

public String sendRequestAndGetResponse(CredentialsProvider credentialsProvider,
                                        RequestMessage requestMessage)
                                 throws TransportLayerException
Sends a request message synchronously and returns a response message as a string.

Specified by:
sendRequestAndGetResponse in interface TransportLayer
Parameters:
credentialsProvider - object to obtain Credentials from
requestMessage - the message to be sent
Returns:
the response message as a string
Throws:
TransportLayerException - if any problems occurred


Copyright © 2013. All Rights Reserved.