|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectca.infoway.messagebuilder.transport.rest.RestTransportLayer
public class RestTransportLayer
Implementation of a transport layer for REST (Representational State Transfer). REST is one of two common interfaces for HL7 messages. HL7 messages are POSTed to an HTTP server.
Makes use of Apache Commons HttpClient for communication.
Constructor Summary | |
---|---|
RestTransportLayer(Client client,
String url)
Constructs a REST transport layer for the given url. |
|
RestTransportLayer(String url)
Constructs a REST transport layer for the given url. |
Method Summary | |
---|---|
protected org.apache.commons.httpclient.methods.PostMethod |
createPostMethod()
|
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 |
---|
public RestTransportLayer(String url)
Constructs a REST transport layer for the given url. Makes use of the default tranport mechanism (HttpClient)
url
- the target url to send messages topublic RestTransportLayer(Client client, String url)
Constructs a REST transport layer for the given url. Makes use of provided client instead of the default HttpClient.
client
- the transport client to useurl
- the target url to send messages toMethod Detail |
---|
public String sendRequestAndGetResponse(CredentialsProvider credentialsProvider, RequestMessage requestMessage)
Sends a request message synchronously and returns a response message as a string.
sendRequestAndGetResponse
in interface TransportLayer
credentialsProvider
- object to obtain Credentials fromrequestMessage
- the message to be sent
protected org.apache.commons.httpclient.methods.PostMethod createPostMethod()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |