|
Sun Adapter for TCP/IP HL7 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.stc.connector.tcpip.model.client.TCPIPClientApplicationImpl
com.stc.connector.tcpip.ext.client.TCPIPEXTClientApplicationImpl
public class TCPIPEXTClientApplicationImpl
This class implements the extended TCPIP client application interface.
| Field Summary | |
|---|---|
static java.lang.String |
version
|
| Fields inherited from class com.stc.connector.tcpip.model.client.TCPIPClientApplicationImpl |
|---|
defaultTimeout, mMonitorData |
| Constructor Summary | |
|---|---|
TCPIPEXTClientApplicationImpl()
Default constructor for WSDL generation. |
|
TCPIPEXTClientApplicationImpl(TCPIPApplicationConnection appConn,
java.lang.String appName,
TCPIPMonitorData aMonitorData)
Constructor for TCPIPEXTClientApplicationImpl. |
|
| Method Summary | |
|---|---|
AbstractMsg |
createBeginMarkerMsg()
Creates a BeginMarkerMsg object based on the configuration information. |
AbstractMsg |
createEndMarkerMsg()
Creates an EndMarkerMsg object based on the configuration information. |
NumberMsg |
createNumberMsg(byte[] number,
int width)
Creates a NumberMsg object which maybe used by the message sender and receiver. |
NumberMsg |
createNumberMsg(int number,
int width)
Creates a NumberMsg object which maybe used by the message sender and receiver. |
MessageInfoInterface |
getMessageInfo()
Gets the message configuration information. |
byte[] |
readCertainLength(int len,
boolean failOnTimeout)
Read until certain length data is got. |
AbstractMsg |
readFixedLengthMsg(int len)
Method readFixedLengthMsg. |
AbstractMsg |
readMsgBetweenMarkers(AbstractMsg beginMarker,
AbstractMsg endMarker)
Method readMsgBetweenMarkers. |
AbstractMsg |
readMsgUntilMarker_old(AbstractMsg marker)
Method readMsgUntilMarker. |
AbstractMsg |
readMsgUntilMarker(AbstractMsg marker)
Method readMsgUntilMarker. |
RepeatingMsg |
readRepeatingMsg(int occurs)
Method readRepeatingMsg. |
AbstractMsg |
receiveAbstractMsg()
receives an AbstractMsg |
BeginEndMarkedMsg |
receiveBeginEndMarkedMsg()
receives a BeginEndMarkedMsg |
EnvelopedMsg |
receiveCustomEnvelopedMsg()
receives a CustomEnvelopedMsg |
EndMarkedMsg |
receiveEndMarkedMsg()
receives an EndMarkedMsg |
byte[] |
receiveEnvelopedMsg()
Receives an EnvelopedMsg through the TCP/IP connection. |
FixedLengthMsg |
receiveFixedLengthMsg()
receives a FixedLengthMsg |
LengthPrefixedMsg |
receiveLengthPrefixedMsg()
receives a LengthPrefixedMsg |
MarkedAndFixedMsg |
receiveMarkedAndFixedMsg()
receives a MarkedAndFixedMsg |
PerActiveConnectionMsg |
receivePerActiveConnectionMsg()
receivesa PerActiveConnectionMsg |
void |
sendAbstractMsg(AbstractMsg msg)
sends an AbstractMsg |
void |
sendBeginEndMarkedMsg(BeginEndMarkedMsg msg)
sends a BeginEndMarkedMsg |
void |
sendCustomEnvelopedMsg(EnvelopedMsg msg)
sends a CustomEnvelopedMsg |
void |
sendEndMarkedMsg(EndMarkedMsg msg)
sends an EndMarkedMsg |
void |
sendEnvelopedMsg(byte[] msg)
Sends an EnvelopedMsg through the TCP/IP connection. |
void |
sendFixedLengthMsg(FixedLengthMsg msg)
sends a FixedLengthMsg |
void |
sendLengthPrefixedMsg(LengthPrefixedMsg msg)
sends a LengthPrefixedMsg |
void |
sendMarkedAndFixedMsg(MarkedAndFixedMsg msg)
sends a MarkedAndFixedMsg |
void |
sendPerActiveConnectionMsg(PerActiveConnectionMsg msg)
sends a PerActiveConnectionMsg |
void |
setMessageInfo(MessageInfo messageInfo)
Sets the messageInfo. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.stc.connector.appconn.tcpip.ext.TCPIPEXTClientApplication |
|---|
closeConnection, getMaxDataSize, getSocket, getState, getTCPIPOutboundConfigInfo, isClosed, receiveBytes, receiveString, receiveString, sendBytes, sendString, sendString, setMaxDataSize, setState |
| Methods inherited from interface com.stc.connector.appconn.tcpip.model.TCPIPClientApplication |
|---|
closeConnection, getMaxDataSize, getSocket, getState, getTCPIPOutboundConfigInfo, isClosed, receiveBytes, receiveString, receiveString, sendBytes, sendString, sendString, setMaxDataSize, setState |
| Field Detail |
|---|
public static final java.lang.String version
| Constructor Detail |
|---|
public TCPIPEXTClientApplicationImpl()
public TCPIPEXTClientApplicationImpl(TCPIPApplicationConnection appConn,
java.lang.String appName,
TCPIPMonitorData aMonitorData)
appConn - TCPIPApplicationConnectionappName - The applicatin name.aMonitorData - The TCPIPMonitorData object| Method Detail |
|---|
public MessageInfoInterface getMessageInfo()
throws TCPIPApplicationException,
java.io.IOException
TCPIPEXTClientApplication
getMessageInfo in interface TCPIPEXTClientApplicationTCPIPApplicationException - on error
java.io.IOException - on i/o errorTCPIPEXTClientApplication.getMessageInfo()public void setMessageInfo(MessageInfo messageInfo)
messageInfo - The messageInfo to set
public AbstractMsg receiveAbstractMsg()
throws TCPIPApplicationException,
java.io.IOException
TCPIPApplicationException
java.io.IOException
public byte[] receiveEnvelopedMsg()
throws TCPIPApplicationException,
java.io.IOException,
TCPIPNoResponseException,
TCPIPIncompleteDataException
TCPIPEXTClientApplication
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.
receiveEnvelopedMsg in interface TCPIPEXTClientApplication
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 error
TCPIPNoResponseException
TCPIPIncompleteDataExceptionTCPIPEXTClientApplication.receiveEnvelopedMsg()
public BeginEndMarkedMsg receiveBeginEndMarkedMsg()
throws TCPIPApplicationException,
java.io.IOException,
TCPIPNoResponseException,
TCPIPIncompleteDataException
TCPIPApplicationException
java.io.IOException
TCPIPNoResponseException
TCPIPIncompleteDataException
public EndMarkedMsg receiveEndMarkedMsg()
throws TCPIPApplicationException,
java.io.IOException,
TCPIPNoResponseException,
TCPIPIncompleteDataException
TCPIPApplicationException
java.io.IOException
TCPIPNoResponseException
TCPIPIncompleteDataException
public FixedLengthMsg receiveFixedLengthMsg()
throws TCPIPApplicationException,
java.io.IOException,
TCPIPNoResponseException,
TCPIPIncompleteDataException
TCPIPApplicationException
java.io.IOException
TCPIPNoResponseException
TCPIPIncompleteDataException
public LengthPrefixedMsg receiveLengthPrefixedMsg()
throws TCPIPApplicationException,
java.io.IOException,
TCPIPNoResponseException,
TCPIPIncompleteDataException
TCPIPApplicationException
java.io.IOException
TCPIPNoResponseException
TCPIPIncompleteDataException
public MarkedAndFixedMsg receiveMarkedAndFixedMsg()
throws TCPIPApplicationException,
java.io.IOException,
TCPIPNoResponseException,
TCPIPIncompleteDataException
TCPIPApplicationException
java.io.IOException
TCPIPNoResponseException
TCPIPIncompleteDataException
public PerActiveConnectionMsg receivePerActiveConnectionMsg()
throws TCPIPApplicationException,
java.io.IOException,
TCPIPNoResponseException,
TCPIPIncompleteDataException
TCPIPApplicationException
java.io.IOException
TCPIPNoResponseException
TCPIPIncompleteDataException
public EnvelopedMsg receiveCustomEnvelopedMsg()
throws TCPIPApplicationException,
java.io.IOException
TCPIPApplicationException
java.io.IOException
public void sendAbstractMsg(AbstractMsg msg)
throws TCPIPApplicationException,
java.io.IOException
TCPIPApplicationException
java.io.IOException
public void sendEnvelopedMsg(byte[] msg)
throws TCPIPApplicationException,
java.io.IOException
TCPIPEXTClientApplication
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.
sendEnvelopedMsg in interface TCPIPEXTClientApplicationmsg - 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 errorTCPIPEXTClientApplication.sendEnvelopedMsg(byte[])
public void sendBeginEndMarkedMsg(BeginEndMarkedMsg msg)
throws TCPIPApplicationException,
java.io.IOException
TCPIPApplicationException
java.io.IOException
public void sendEndMarkedMsg(EndMarkedMsg msg)
throws TCPIPApplicationException,
java.io.IOException
TCPIPApplicationException
java.io.IOException
public void sendFixedLengthMsg(FixedLengthMsg msg)
throws TCPIPApplicationException,
java.io.IOException
TCPIPApplicationException
java.io.IOException
public void sendLengthPrefixedMsg(LengthPrefixedMsg msg)
throws TCPIPApplicationException,
java.io.IOException
TCPIPApplicationException
java.io.IOException
public void sendMarkedAndFixedMsg(MarkedAndFixedMsg msg)
throws TCPIPApplicationException,
java.io.IOException
TCPIPApplicationException
java.io.IOException
public void sendPerActiveConnectionMsg(PerActiveConnectionMsg msg)
throws TCPIPApplicationException,
java.io.IOException
TCPIPApplicationException
java.io.IOException
public void sendCustomEnvelopedMsg(EnvelopedMsg msg)
throws TCPIPApplicationException,
java.io.IOException
TCPIPApplicationException
java.io.IOException
public AbstractMsg readFixedLengthMsg(int len)
throws TCPIPApplicationException,
java.io.IOException,
TCPIPNoResponseException,
TCPIPIncompleteDataException
len - The length
TCPIPApplicationException - on error
java.io.IOException - on i/o error
TCPIPNoResponseException
TCPIPIncompleteDataException
public byte[] readCertainLength(int len,
boolean failOnTimeout)
throws TCPIPApplicationException,
java.io.IOException,
TCPIPNoResponseException,
TCPIPIncompleteDataException
failOnTimeout - true or false
TCPIPApplicationException - on error
java.io.IOException - on i/o error
TCPIPNoResponseException
TCPIPIncompleteDataException
public RepeatingMsg readRepeatingMsg(int occurs)
throws TCPIPApplicationException,
java.io.IOException,
TCPIPNoResponseException,
TCPIPIncompleteDataException
occurs - The counter of repeating
TCPIPApplicationException - on error
java.io.IOException - on i/o error
TCPIPNoResponseException
TCPIPIncompleteDataException
public AbstractMsg readMsgUntilMarker_old(AbstractMsg marker)
throws TCPIPApplicationException,
java.io.IOException,
TCPIPNoResponseException,
TCPIPIncompleteDataException
marker - The marker AbstractMsg
TCPIPApplicationException - on error
java.io.IOException - on i/o error
TCPIPNoResponseException
TCPIPIncompleteDataException
public AbstractMsg readMsgUntilMarker(AbstractMsg marker)
throws TCPIPApplicationException,
java.io.IOException,
TCPIPNoResponseException,
TCPIPIncompleteDataException
marker - The marker AbstractMsg
TCPIPApplicationException - on error
java.io.IOException - on i/o error
TCPIPNoResponseException
TCPIPIncompleteDataException
public AbstractMsg readMsgBetweenMarkers(AbstractMsg beginMarker,
AbstractMsg endMarker)
throws TCPIPApplicationException,
java.io.IOException,
TCPIPNoResponseException,
TCPIPIncompleteDataException
beginMarker - The begin marker (null means no begin marker).endMarker - The end marker
TCPIPApplicationException - on error
java.io.IOException - on i/o error
TCPIPNoResponseException
TCPIPIncompleteDataException
public AbstractMsg createBeginMarkerMsg()
throws TCPIPApplicationException,
java.io.IOException
TCPIPApplicationException - on error
java.io.IOException - on i/o error
public AbstractMsg createEndMarkerMsg()
throws TCPIPApplicationException,
java.io.IOException
TCPIPApplicationException - on error
java.io.IOException - on i/o error
public NumberMsg createNumberMsg(int number,
int width)
throws TCPIPApplicationException,
java.io.IOException
number - The number valuewidth - The width value
TCPIPApplicationException - on error
java.io.IOException - on i/o error
public NumberMsg createNumberMsg(byte[] number,
int width)
throws TCPIPApplicationException,
java.io.IOException
number - The number valuewidth - The width value
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 | ||||||||