|
Sun Adapter for TCP/IP HL7 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TCPIPEXTClientApplication
This interface represents the extended TCP/IP client application with envelope message interface upon TCP/IP.
Field Summary | |
---|---|
static java.lang.String |
version
|
Method Summary | |
---|---|
void |
closeConnection()
Closes the existing connection physically (whether it is good or bad). |
int |
getMaxDataSize()
Returns the maxDataSize. |
MessageInfoInterface |
getMessageInfo()
Gets the message configuration information. |
java.net.Socket |
getSocket()
Returns the underlying java.net.Socket instance on which the eWay relys. |
java.lang.String |
getState()
Returns the State that is set by user. |
TCPIPClientConfigInfoInterface |
getTCPIPOutboundConfigInfo()
Returns an object which represents the base TCP/IP Outbound configuration information. |
boolean |
isClosed()
Checks to see if the connection is closed. |
byte[] |
receiveBytes()
Reads all available data on the TCP/IP connection. |
byte[] |
receiveEnvelopedMsg()
Receives an EnvelopedMsg through the TCP/IP connection. |
java.lang.String |
receiveString()
Reads all of the available data on TCP/IP connection. |
java.lang.String |
receiveString(java.lang.String encoding)
Reads all available data on the TCP/IP connection. |
void |
sendBytes(byte[] bytes)
Sends a byte array through the TCP/IP connection. |
void |
sendEnvelopedMsg(byte[] msg)
Sends an EnvelopedMsg 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 the State. |
Field Detail |
---|
static final java.lang.String version
Method Detail |
---|
MessageInfoInterface getMessageInfo() throws TCPIPApplicationException, java.io.IOException
TCPIPApplicationException
- on error
java.io.IOException
- on i/o errorbyte[] receiveEnvelopedMsg() throws TCPIPApplicationException, java.io.IOException
This e*Way Can be configured to handle different kinds of envelopes. Each envelope needs to be configured according to its components. Supported Envelope Types: +-----------------------+---------------------------------------------------+ | Length Prefixed | {Data Length} {Data} | +-----------------------+---------------------------------------------------+ | End Marked | {Data} {End Block} | +-----------------------+---------------------------------------------------+ | Begin-End Marked | {Start Block} {Data} {End Block} | +-----------------------+---------------------------------------------------+ | Fixed Length | {Data} | +-----------------------+---------------------------------------------------+ | Per Active Connection | {Data} | +-----------------------+---------------------------------------------------+ | Marked & Fixed | {Start Block} {Data} {Marker} {Fixed Length Data} | +-----------------------+---------------------------------------------------+ | Custom | Customer defines the structure | +-----------------------+---------------------------------------------------+ Summary Of Envelopes And Their Dependencies: +-----------------------+---------------------------------------------------+ | Length Prefixed | Width Of Length | | | Numeric Representation | +-----------------------+---------------------------------------------------+ | End Marked | Store Until Character | +-----------------------+---------------------------------------------------+ | Begin-End Marked | Store Until Character | | | Ignore Until Character | +-----------------------+---------------------------------------------------+ | Fixed Length | Bytes To Read | +-----------------------+---------------------------------------------------+ | Per Active Connection | | +-----------------------+---------------------------------------------------+ | Marked & Fixed | Store Until Character | | | Ignore Until Character | | | Bytes To Read | +-----------------------+---------------------------------------------------+ | Custom | Customer Defined Property | +-----------------------+---------------------------------------------------+ Length Prefixed =============== This envelope has the following structure: {Data Length} {Data} The Length component of this envelope indicates the length of the Data component. The length is represented in one of the allowed numeric representations. The Data component of the envelope is treated as a fixed length Event. The 'Width Of Length' must also be specified for the e*Way to be able to understand the Length field. End Marked ========== This envelope has the following structure: {Data} {End Block} The End Block component of this envelope is the same as the Store Until configurable parameter. Begin-End Marked ================ This envelope has the following structure: {Start Block} {Data} {End Block} The Start Block component of this envelope is the same as the Ignore Until configurable parameter, and the End Block component of this envelope is the same as the Store Until configurable parameter. Fixed Length ============ This envelope has the following structure: {Data} -------------------------------> Fixed Length This envelope is configured via the 'Bytes To Read' configurable parameter. It is assumed that all the Events will be the same length as specified in 'Bytes To Read'. Per Active Connection ===================== This envelope has the following structure: {Data} -------------------------------> Per active connection The Event has no envelopes around it. The connection to the e*Way is dropped by the external application after the Event has been sent in entire. Marked & Fixed ============== This envelope has the following structure: {Start Block} {Data} {Marker} {Fixed Length Data} This envelope is similar to the Begin-End Marked envelope. it is configured via the Ignore Until, Store Until, and Bytes To Read configurable parameters. The Marker component in this envelope is the same as the Store Until Configurable parameter. After reading the marker the e*Way will read the rest of the envelope as specified in the Bytes To Read parameter. Custom ====== This envelope has not pre-defined structure. Customer is responsible for providing the structure and defining the behavior.
For following envelope types, only the message body without envelope will be returned: BeginEndMarked message EndMarked message FixedLength message LengthPrefixed message PerActiveConnection message For following envelope types, the entire message including body and envelope will be returned: MarkedAndFixed message
TCPIPApplicationException
- on error
java.io.IOException
- on i/o errorvoid sendEnvelopedMsg(byte[] msg) throws TCPIPApplicationException, java.io.IOException
This e*Way Can be configured to handle different kinds of envelopes. Each envelope needs to be configured according to its components. Supported Envelope Types: +-----------------------+---------------------------------------------------+ | Length Prefixed | {Data Length} {Data} | +-----------------------+---------------------------------------------------+ | End Marked | {Data} {End Block} | +-----------------------+---------------------------------------------------+ | Begin-End Marked | {Start Block} {Data} {End Block} | +-----------------------+---------------------------------------------------+ | Fixed Length | {Data} | +-----------------------+---------------------------------------------------+ | Per Active Connection | {Data} | +-----------------------+---------------------------------------------------+ | Marked & Fixed | {Start Block} {Data} {Marker} {Fixed Length Data} | +-----------------------+---------------------------------------------------+ | Custom | Customer defines the structure | +-----------------------+---------------------------------------------------+ Summary Of Envelopes And Their Dependencies: +-----------------------+---------------------------------------------------+ | Length Prefixed | Width Of Length | | | Numeric Representation | +-----------------------+---------------------------------------------------+ | End Marked | Store Until Character | +-----------------------+---------------------------------------------------+ | Begin-End Marked | Store Until Character | | | Ignore Until Character | +-----------------------+---------------------------------------------------+ | Fixed Length | Bytes To Read | +-----------------------+---------------------------------------------------+ | Per Active Connection | | +-----------------------+---------------------------------------------------+ | Marked & Fixed | Store Until Character | | | Ignore Until Character | | | Bytes To Read | +-----------------------+---------------------------------------------------+ | Custom | Customer Defined Property | +-----------------------+---------------------------------------------------+ Length Prefixed =============== This envelope has the following structure: {Data Length} {Data} The Length component of this envelope indicates the length of the Data component. The length is represented in one of the allowed numeric representations. The Data component of the envelope is treated as a fixed length Event. The 'Width Of Length' must also be specified for the e*Way to be able to understand the Length field. End Marked ========== This envelope has the following structure: {Data} {End Block} The End Block component of this envelope is the same as the Store Until configurable parameter. Begin-End Marked ================ This envelope has the following structure: {Start Block} {Data} {End Block} The Start Block component of this envelope is the same as the Ignore Until configurable parameter, and the End Block component of this envelope is the same as the Store Until configurable parameter. Fixed Length ============ This envelope has the following structure: {Data} -------------------------------> Fixed Length This envelope is configured via the 'Bytes To Read' configurable parameter. It is assumed that all the Events will be the same length as specified in 'Bytes To Read'. Per Active Connection ===================== This envelope has the following structure: {Data} -------------------------------> Per active connection The Event has no envelopes around it. The connection to the e*Way is dropped by the external application after the Event has been sent in entire. Marked & Fixed ============== This envelope has the following structure: {Start Block} {Data} {Marker} {Fixed Length Data} This envelope is similar to the Begin-End Marked envelope. it is configured via the Ignore Until, Store Until, and Bytes To Read configurable parameters. The Marker component in this envelope is the same as the Store Until Configurable parameter. After reading the marker the e*Way will read the rest of the envelope as specified in the Bytes To Read parameter. Custom ====== This envelope has not pre-defined structure. Customer is responsible for providing the structure and defining the behavior.
msg
- The message to be sent
For following envelope types, this byte array means message body without envelope: BeginEndMarked message EndMarked message FixedLength message LengthPrefixed message PerActiveConnection message For following envelope types, this byte array means the entire message including body and envelope: MarkedAndFixed message
TCPIPApplicationException
- on error
java.io.IOException
- on i/o errorTCPIPClientConfigInfoInterface getTCPIPOutboundConfigInfo()
TCPIPClientConfigInfo
- Object.
boolean isClosed() throws TCPIPApplicationException, java.io.IOException
Boolean
- Represents the status of the connection.
TCPIPApplicationException
- Thrown upon error.
java.io.IOException
- Thrown upon i/o error.void closeConnection() throws TCPIPApplicationException, java.io.IOException
TCPIPApplicationException
- Thrown upon error.
java.io.IOException
- Thrown upon i/o error.java.net.Socket getSocket() throws TCPIPApplicationException, java.io.IOException
Socket
- The java.net.Socket instance.
TCPIPApplicationException
- Thrown upon error.
java.io.IOException
- Thrown upon i/o error.int getMaxDataSize()
int
- The max size of data that can be held.
void setMaxDataSize(int maxDataSize) throws TCPIPApplicationException
maxDataSize
- The maxDataSize to set.
TCPIPApplicationException
- Thrown upon error.java.lang.String getState() throws TCPIPApplicationException
String
- The state value.
TCPIPApplicationException
- Thrown upon error.void setState(java.lang.String stateValue) throws TCPIPApplicationException
stateValue
- The state value to set.
TCPIPApplicationException
- Thrown upon error.java.lang.String receiveString() throws TCPIPApplicationException, java.io.IOException
The following are the end conditions of the read operation:
Once one of the above conditions are in effect, the attempted reading gracefully stops and all data is returned. An empty string "" is returned if no data is received.
String
- Object.
TCPIPApplicationException
- Thrown upon error
java.io.IOException
- Thrown upon i/o errorjava.lang.String receiveString(java.lang.String encoding) throws TCPIPApplicationException, java.io.IOException
The following are the end conditions of the read operation:
Once one of the above conditions are in effect, the attempted reading gracefully stops and all data is returned. An empty string "" is returned if no data is received.
encoding
- The encoding charset name.
String
Object.
TCPIPApplicationException
- Thrown upon error.
java.io.IOException
- Thrown upon i/o error.byte[] receiveBytes() throws TCPIPApplicationException, java.io.IOException
The following are the end conditions of the read operation:
Once one of the above conditions are in effect, the attempted reading gracefully stops and all data is returned. A zero-length byte array is returned if no data is received.
byte[]
- A byte array.
TCPIPApplicationException
- Thrown upon error.
java.io.IOException
- Thrown upon i/o error.void sendString(java.lang.String str) throws TCPIPApplicationException, java.io.IOException
str
- A String to send.
TCPIPApplicationException
- Thrown upon error.
java.io.IOException
- Thrown upon i/o error.void sendString(java.lang.String str, java.lang.String encoding) throws TCPIPApplicationException, java.io.IOException
str
- A String to send.encoding
- The encoding charset name.
TCPIPApplicationException
- Thrown upon error.
java.io.IOException
- Thrown upon i/o error.void sendBytes(byte[] bytes) throws TCPIPApplicationException, java.io.IOException
bytes
- A byte array to send.
TCPIPApplicationException
- Thrown upon error.
java.io.IOException
- Thrown upon 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 |