|
Sun Adapter for TCP/IP HL7 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TCPIPClientApplication
This interface represents the outbound TCP/IP application interface.
Field Summary | |
---|---|
static java.lang.String |
version
|
Method Summary | |
---|---|
void |
closeConnection()
Closes the existing connection physically (no matter it is good or bad). |
int |
getMaxDataSize()
Returns the maxDataSize. |
java.net.Socket |
getSocket()
Returns the underlying java.net.Socket instance which the e*Way relys on. |
java.lang.String |
getState()
Returns the State which is set by user. |
TCPIPClientConfigInfoInterface |
getTCPIPOutboundConfigInfo()
Returns an object which represents the base TCP/IP Outbound configuration information. |
boolean |
isClosed()
Checks whether the connection is closed. |
byte[] |
receiveBytes()
Reads all data which is available on TCP/IP connection. |
java.lang.String |
receiveString()
Reads all data which is available on TCP/IP connection. |
java.lang.String |
receiveString(java.lang.String encoding)
Reads all data which is available on TCP/IP connection. |
void |
sendBytes(byte[] bytes)
Sends a byte array through the TCP/IP connection. |
void |
sendString(java.lang.String str)
Sends a String with JVM default encoding through the TCP/IP connection. |
void |
sendString(java.lang.String str,
java.lang.String encoding)
Sends a String with the specified encoding through the TCP/IP connection. |
void |
setMaxDataSize(int maxDataSize)
Sets the maxDataSize. |
void |
setState(java.lang.String stateValue)
Sets State. |
Field Detail |
---|
static final java.lang.String version
Method Detail |
---|
TCPIPClientConfigInfoInterface getTCPIPOutboundConfigInfo()
boolean isClosed() throws TCPIPApplicationException, java.io.IOException
TCPIPApplicationException
- on error
java.io.IOException
- on i/o errorvoid closeConnection() throws TCPIPApplicationException, java.io.IOException
TCPIPApplicationException
- on error
java.io.IOException
- on i/o errorjava.net.Socket getSocket() throws TCPIPApplicationException, java.io.IOException
TCPIPApplicationException
- on error
java.io.IOException
- on i/o errorint getMaxDataSize()
void setMaxDataSize(int maxDataSize) throws TCPIPApplicationException
maxDataSize
- The maxDataSize to set
TCPIPApplicationException
- on errorjava.lang.String getState() throws TCPIPApplicationException
TCPIPApplicationException
- on errorvoid setState(java.lang.String stateValue) throws TCPIPApplicationException
stateValue
- The state value to set
TCPIPApplicationException
- on errorjava.lang.String receiveString() throws TCPIPApplicationException, java.io.IOException
Followings are the end conditions of the read operation: - No more data in the socket stream (end of file) - Timeout occurs (note: here timeout is treated as an indication instead of error)Once one of the above conditions stands, the reading attempt will gracefully stop and all data will be returned. An empty string "" will be returned if no any data is received.
TCPIPApplicationException
- on error
java.io.IOException
- on i/o errorjava.lang.String receiveString(java.lang.String encoding) throws TCPIPApplicationException, java.io.IOException
Followings are the end conditions of the read operation: - No more data in the socket stream (end of file) - Timeout occurs (note: here timeout is treated as an indication instead of error)Once one of the above conditions stands, the reading attempt will gracefully stop and all data will be returned. An empty string "" will be returned if no any data is received.
encoding
- The encoding charset name.
TCPIPApplicationException
- on error
java.io.IOException
- on i/o errorbyte[] receiveBytes() throws TCPIPApplicationException, java.io.IOException
Followings are the end conditions of the read operation: - No more data in the socket stream (end of file) - Timeout occurs (note: here timeout is treated as an indication instead of error)Once one of the above conditions stands, the reading attempt will gracefully stop and all data will be returned. A zero-length byte array will be returned if no any data is received.
TCPIPApplicationException
- on error
java.io.IOException
- on i/o errorvoid sendString(java.lang.String str) throws TCPIPApplicationException, java.io.IOException
str
- A String to send
TCPIPApplicationException
- on error
java.io.IOException
- on i/o errorvoid sendString(java.lang.String str, java.lang.String encoding) throws TCPIPApplicationException, java.io.IOException
str
- A String to sendencoding
- The encoding charset name.
TCPIPApplicationException
- on error
java.io.IOException
- on i/o errorvoid sendBytes(byte[] bytes) throws TCPIPApplicationException, java.io.IOException
bytes
- A byte array to send
TCPIPApplicationException
- on error
java.io.IOException
- on i/o error
|
Sun Adapter for TCP/IP HL7 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |