communication
Class SimpleV3SendingServer
java.lang.Object
communication.SimpleV3SendingServer
public class SimpleV3SendingServer
- extends Object
This class instantiates a server class that sends a request to the designated
endpoint and waits for the a response.
- Author:
- Michael Ogata
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleV3SendingServer
public SimpleV3SendingServer(String ipa,
int port,
boolean s)
throws IOException
- Parameters:
ipa
- remote IP adressport
- remote ports
- should this server use SSL or not
- Throws:
IOException
- if a connection to the designated endpoint could not be made
isSecure
public boolean isSecure()
- Returns:
- true if this sever is using SSL, otherwise return false
getPort
public int getPort()
- Returns:
- the number associated with this server's remote socket
sendMessage
public void sendMessage(gov.nist.healthcare.core.message.v3.HL7V3Message m,
String e)
throws IOException,
javax.xml.soap.SOAPException,
SAXException,
ParserConfigurationException
- Parameters:
m
- the intended message payload. This message will be contained in
the body element of the SOAP Messagee
- the Path to this message's desired endpoint
- Throws:
IOException
- if there was a problem writing to the socket or if there was a
problem building the SOAP Message
javax.xml.soap.SOAPException
SAXException
ParserConfigurationException
getResponse
public gov.nist.healthcare.core.message.v3.HL7V3Message getResponse()
throws IOException
- The method binds to the designated socket and waits for a response from
the remote server. When a response is detected this class attempts to
construct an HSV3RHttpResponse Object from the incoming data. If
successful this method then checks the validity of the WSA SOAP Header
- Returns:
- The payload of the incoming HTTP response
- Throws:
IOException
getIpAddress
public String getIpAddress()