|
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.hl7.client.HL7AppMessageImpl
public class HL7AppMessageImpl
This class implements the HL7 application message interface and MLLPV2CommonInterface.
| Field Summary | |
|---|---|
static java.lang.String |
version
|
| Constructor Summary | |
|---|---|
HL7AppMessageImpl()
Constructor for HL7AppMessage. |
|
HL7AppMessageImpl(HL7ClientApplication application)
Constructor for HL7AppMessage. |
|
| Method Summary | |
|---|---|
byte[] |
convertHL7MessagetoXML(java.lang.String payLoad)
Convert HL7 raw message to HL7 XML message, if the hl7 eway receives hl7 xml data |
byte[] |
convertXMLtoMessage(java.lang.String hl7XmlMessage)
Convert HL7 XML message to HL7 raw message, if the hl7 eway receives hl7 xml data |
byte[] |
generateAcceptAckMessage()
|
protected java.lang.StringBuffer |
generateAckNakMessage(java.lang.String acknowledgmentCode)
Method generateAckNakMessage. |
byte[] |
generateCannedNakMessage()
|
byte[] |
generateCannedNakMessage(java.lang.String errTextMessage)
|
byte[] |
generateErrorAckMessage()
|
byte[] |
generateRejectAckMessage()
|
java.lang.String |
getACKXMLPayLoad()
The payload holds HL7 ACK XML message. |
HL7ClientApplicationImpl |
getApplication()
Returns the application. |
java.lang.String |
getApplicationName()
Used to get the Application name. |
char |
getBlockType()
The getBlockType method is only used for HLLP (Hybrid Lower Layer Protocol). |
java.lang.String |
getDatasourceJNDIName()
The getDatasourceJNDIName method is used to get the Datasource JNDI name bound to the perticular dataBase. |
ERR |
getERR()
|
byte[] |
getGeneratedAckNakMessage()
Used to get generated ACK and NAK message |
HeuristicsTables |
getHeuristicsTables()
|
ACK |
getHL7ACK()
|
Message |
getHL7Message()
|
MSA |
getMSA()
|
MSH |
getMSH()
|
byte[] |
getPayload()
The payload holds HL7 data. |
int |
getSequenceNumber()
|
SFT |
getSFT()
|
java.lang.String |
getXMLPayLoad()
The payload holds HL7 XML message. |
boolean |
handleXMLMessage()
Condition to check the incoming and outgoing message is xml or not. |
boolean |
isDataBlockType()
The isDataBlockType is only used for HLLP (Hybrid Lower Layer Protocol). |
boolean |
isHL7v3Message()
The isHL7v3Message method is check the received hl7 message is V3 message or not. |
boolean |
isHL7v3QueuedAcknowledgementType()
Used to find the configured Acknowledgment is Queued one or nor for HL7 v3 Message processing. |
boolean |
isNAKBlockType()
The isNAKBlockType is only used for HLLP (Hybrid Lower Layer Protocol). |
boolean |
isServerConnectionType()
The isServerConnectionType method is used to find the server connection type is server or client. |
int |
loadSequenceNumber()
Loads the sequence number from the persistence file. |
void |
receive()
Receives the enveloped data over the TCP/IP connection and de-envelopes/validates it (according to LLP settings). |
void |
send()
Envelopes (according to LLP settings) the HL7 data which is stored in payload, The enveloped HL7 data is then sent out over the TCP/IP connection. |
void |
sendEnvelopedMsg(byte[] llpMessage)
Envelopes (according to LLP settings) the HL7 data which is stored in payload, The enveloped HL7 data is then sent out over the MLLPv2. |
void |
sendMessagePayload()
Envelopes (according to LLP settings) the HL7 data which is stored in payload, The enveloped HL7 data is then sent out over the MLLPv2. |
void |
setACKXMLPayLoad(java.lang.String hl7AckXmlMessage)
The payload holds HL7 ACK XML message. |
void |
setBlockType(char blockType)
The setBlockType method is only used for HLLP (Hybrid Lower Layer Protocol). |
void |
setDataBlockType()
The setDataBlockType is only used for HLLP (Hybrid Lower Layer Protocol). |
void |
setGeneratedAckNakMessage(byte[] bs)
Used to set the ACK or NAK message |
void |
setHeuristicsTables(HeuristicsTables heuristicsTables)
|
void |
setHL7ACK(ACK ack)
The setHL7ACK is used to set the ACK message. |
void |
setHL7Message(Message message)
The setHL7Message is used to set the HL7 Message |
void |
setMessagePayload(byte[] payload)
The payload holds HL7 data. |
void |
setNAKBlockType()
The setNAKBlockType is only used for HLLP (Hybrid Lower Layer Protocol). |
void |
setPayload(byte[] payload)
The payload holds HL7 data. |
void |
setSequenceNumber(int sequenceNumber)
|
void |
setXMLPayLoad(java.lang.String hl7XmlMessage)
The payload holds HL7 XML message. |
void |
storeHL7Ack(java.lang.String messageId,
java.lang.String HL7ACK)
Stores the HL7 Ack message in the MLLPV2's persistence storage. |
void |
storeHL7Nak(java.lang.String messageId,
java.lang.String HL7NAK)
Stores the HL7 NAK message in the MLLPV2's persistence storage. |
void |
storeSequenceNumber()
|
void |
storeSequenceNumber(int sequenceNumber)
Stores the sequence number to the persistence file. |
java.lang.String |
toString()
|
void |
updateMBeanProperty(java.lang.String propertyName,
java.lang.String propertyDisplayValue)
The updateMBeanProperty method is used to update the Mbean properties. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String version
| Constructor Detail |
|---|
public HL7AppMessageImpl()
throws HL7ApplicationException
HL7ApplicationException
public HL7AppMessageImpl(HL7ClientApplication application)
throws HL7ApplicationException
application -
HL7ApplicationException| Method Detail |
|---|
public HL7ClientApplicationImpl getApplication()
public byte[] getPayload()
throws HL7ApplicationException
HL7AppMessage
getPayload in interface HL7AppMessagebyte[] - The payload in byte array.
HL7ApplicationExceptionHL7AppMessage.getPayload()
public void setPayload(byte[] payload)
throws HL7ApplicationException
HL7AppMessage
setPayload in interface HL7AppMessagepayload - The payload to set.
HL7ApplicationExceptionHL7AppMessage.setPayload(byte[])
public boolean isNAKBlockType()
throws HL7ApplicationException
HL7AppMessage
isNAKBlockType in interface HL7AppMessageBoolean
HL7ApplicationExceptionHL7AppMessage.isNAKBlockType()
public void setNAKBlockType()
throws HL7ApplicationException
HL7AppMessage
setNAKBlockType in interface HL7AppMessageHL7ApplicationExceptionHL7AppMessage.setNAKBlockType()
public boolean isDataBlockType()
throws HL7ApplicationException
HL7AppMessage
isDataBlockType in interface HL7AppMessageBoolean
HL7ApplicationExceptionHL7AppMessage.isDataBlockType()
public void setDataBlockType()
throws HL7ApplicationException
HL7AppMessage
setDataBlockType in interface HL7AppMessageHL7ApplicationExceptionHL7AppMessage.setDataBlockType()
public char getBlockType()
throws HL7ApplicationException
HL7AppMessage
getBlockType in interface HL7AppMessagechar - The block type.
HL7ApplicationExceptionHL7AppMessage.getBlockType()
public void setBlockType(char blockType)
throws HL7ApplicationException
HL7AppMessage
setBlockType in interface HL7AppMessageblockType - The type to set.
HL7ApplicationExceptionHL7AppMessage.setBlockType(char)
public int loadSequenceNumber()
throws HL7ApplicationException,
java.io.IOException
HL7AppMessage
loadSequenceNumber in interface HL7AppMessageint - The number stored in file.
HL7ApplicationException
java.io.IOExceptionHL7AppMessage.loadSequenceNumber()
public void storeSequenceNumber()
throws HL7ApplicationException,
java.io.IOException
HL7ApplicationException
java.io.IOExceptioncom.stc.connector.appconn.tcpip.hl7.HL7AppMessage#storeSequenceNumber()
public void storeSequenceNumber(int sequenceNumber)
throws HL7ApplicationException,
java.io.IOException
HL7AppMessage
storeSequenceNumber in interface HL7AppMessagesequenceNumber - The number to store.
HL7ApplicationException
java.io.IOExceptionHL7AppMessage.storeSequenceNumber(int)
public int getSequenceNumber()
throws HL7ApplicationException
HL7ApplicationExceptioncom.stc.connector.appconn.tcpip.hl7.HL7AppMessage#getSequenceNumber()
public void setSequenceNumber(int sequenceNumber)
throws HL7ApplicationException
HL7ApplicationExceptioncom.stc.connector.appconn.tcpip.hl7.HL7AppMessage#setSequenceNumber(int)
public MSH getMSH()
throws HL7ApplicationException
HL7ApplicationExceptioncom.stc.connector.appconn.tcpip.hl7.HL7AppMessage#getMSH()
public SFT getSFT()
throws HL7ApplicationException
HL7ApplicationExceptioncom.stc.connector.appconn.tcpip.hl7.HL7AppMessage#getSFT()
public MSA getMSA()
throws HL7ApplicationException
HL7ApplicationExceptioncom.stc.connector.appconn.tcpip.hl7.HL7AppMessage#getMSA()
public ERR getERR()
throws HL7ApplicationException
HL7ApplicationExceptioncom.stc.connector.appconn.tcpip.hl7.HL7AppMessage#getERR()
public byte[] generateAcceptAckMessage()
throws HL7ApplicationException
HL7ApplicationExceptioncom.stc.connector.appconn.tcpip.hl7.HL7AppMessage#generateAcceptAckMessage()
public byte[] generateErrorAckMessage()
throws HL7ApplicationException
HL7ApplicationExceptioncom.stc.connector.appconn.tcpip.hl7.HL7AppMessage#generateErrorAckMessage()
public byte[] generateRejectAckMessage()
throws HL7ApplicationException
HL7ApplicationExceptioncom.stc.connector.appconn.tcpip.hl7.HL7AppMessage#generateRejectAckMessage()
protected java.lang.StringBuffer generateAckNakMessage(java.lang.String acknowledgmentCode)
throws HL7ApplicationException
acknowledgmentCode -
HL7ApplicationException
public byte[] generateCannedNakMessage()
throws HL7ApplicationException
HL7ApplicationExceptioncom.stc.connector.appconn.tcpip.hl7.HL7AppMessage#generateCannedNakMessage()
public byte[] generateCannedNakMessage(java.lang.String errTextMessage)
throws HL7ApplicationException
HL7ApplicationExceptioncom.stc.connector.appconn.tcpip.hl7.HL7AppMessage#generateCannedNakMessage(String)
public void receive()
throws HL7ApplicationException,
java.io.IOException,
TCPIPNoResponseException,
TCPIPIncompleteDataException
HL7AppMessageNote: If it fails to receive the enveloped data over the TCP/IP connection, java.io.IOException is thrown. There are 3 cases:
If it fails to de-envelope/validate data, com.stc.connector.tcpip.hl7.exception.HL7ApplicationException is thrown.
receive in interface HL7AppMessageHL7ApplicationException
java.io.IOException
TCPIPNoResponseException
TCPIPIncompleteDataExceptionHL7AppMessage.receive()
public void send()
throws HL7ApplicationException,
java.io.IOException
HL7AppMessageBefore this method is called, the outgoing HL7 data should already be stored in payload by the setPayload() method. Note: If it fails to send the enveloped data over the TCP/IP connection, IOException will be thrown. If it fails to envelope data, HL7ApplicationException will be thrown.
send in interface HL7AppMessageHL7ApplicationException
java.io.IOExceptionHL7AppMessage.send()
public HeuristicsTables getHeuristicsTables()
throws HL7ApplicationException
HL7ApplicationExceptioncom.stc.connector.appconn.tcpip.hl7.HL7AppMessage#getHeuristicsTables()
public void setHeuristicsTables(HeuristicsTables heuristicsTables)
throws HL7ApplicationException
heuristicsTables -
HL7ApplicationException
public Message getHL7Message()
throws HL7ApplicationException
HL7ApplicationException
public ACK getHL7ACK()
throws HL7ApplicationException
HL7ApplicationExceptionpublic void setHL7ACK(ACK ack)
ack - public void setHL7Message(Message message)
message - public byte[] getGeneratedAckNakMessage()
public void setGeneratedAckNakMessage(byte[] bs)
bs - public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()
public void storeHL7Ack(java.lang.String messageId,
java.lang.String HL7ACK)
throws HL7ApplicationException
HL7AppMessage
storeHL7Ack in interface HL7AppMessagemessageId - The MSH message control Id of the original HL7 request messageHL7ACK - The complete HL7 ACK message to store
HL7ApplicationExceptioncom.stc.connector.appconn.tcpip.hl7.HL7AppMessage#storeHL7Ack()
public void storeHL7Nak(java.lang.String messageId,
java.lang.String HL7NAK)
throws HL7ApplicationException
HL7AppMessage
storeHL7Nak in interface HL7AppMessagemessageId - The MSH message control Id of the original HL7 request messageHL7NAK - The complete HL7 NAK message to store
HL7ApplicationExceptioncom.stc.connector.appconn.tcpip.hl7.HL7AppMessage#storeHL7Nak()
public byte[] convertXMLtoMessage(java.lang.String hl7XmlMessage)
throws HL7ApplicationException
HL7AppMessage
convertXMLtoMessage in interface HL7AppMessagehl7XmlMessage - The xml message to convert.
byte[] - The payload is byte array.
HL7ApplicationExceptioncom.stc.connector.appconn.tcpip.hl7.HL7AppMessage#convertXMLtoMessage()
public byte[] convertHL7MessagetoXML(java.lang.String payLoad)
throws HL7ApplicationException
HL7AppMessage
convertHL7MessagetoXML in interface HL7AppMessagebyte[] - The xml message in byte array.
HL7ApplicationExceptioncom.stc.connector.appconn.tcpip.hl7.HL7AppMessage#convertHL7MessagetoXML()
public boolean handleXMLMessage()
throws HL7ApplicationException
HL7AppMessage
handleXMLMessage in interface HL7AppMessageboolean -true/false.
HL7ApplicationExceptionHL7AppMessage.handleXMLMessage()
public void setXMLPayLoad(java.lang.String hl7XmlMessage)
throws HL7ApplicationException
HL7AppMessage
setXMLPayLoad in interface HL7AppMessagehl7XmlMessage - The xml message to store.
HL7ApplicationExceptioncom.stc.connector.appconn.tcpip.hl7.HL7AppMessage#setXMLPayLoad()
public java.lang.String getXMLPayLoad()
throws HL7ApplicationException
HL7AppMessage
getXMLPayLoad in interface HL7AppMessageString - The payload in XML payload.
HL7ApplicationExceptionHL7AppMessage.getXMLPayLoad()
public void setACKXMLPayLoad(java.lang.String hl7AckXmlMessage)
throws HL7ApplicationException
HL7AppMessage
setACKXMLPayLoad in interface HL7AppMessageHL7ApplicationExceptioncom.stc.connector.appconn.tcpip.hl7.HL7AppMessage#setACKXMLPayLoad()
public java.lang.String getACKXMLPayLoad()
throws HL7ApplicationException
HL7AppMessage
getACKXMLPayLoad in interface HL7AppMessageString - The payload is xml ack message.
HL7ApplicationExceptionHL7AppMessage.getACKXMLPayLoad()
public void sendEnvelopedMsg(byte[] llpMessage)
throws TCPIPApplicationException,
java.io.IOException
MLLPV2CommonInterfaceBefore this method is called, the outgoing HL7 data should already be stored in payload by the setPayload() method. Note: If it fails to send the enveloped data over the TCP/IP connection, IOException will be thrown. If it fails to envelope data, HL7ApplicationException will be thrown.
sendEnvelopedMsg in interface MLLPV2CommonInterfacellpMessage - --The enveloped HL7 Message
TCPIPApplicationException
java.io.IOExceptionMLLPV2CommonInterface.sendEnvelopedMsg(byte[] llpMessage)public boolean isServerConnectionType()
MLLPV2CommonInterface
isServerConnectionType in interface MLLPV2CommonInterfaceboolean - true or false.MLLPV2CommonInterface.isServerConnectionType()
public void updateMBeanProperty(java.lang.String propertyName,
java.lang.String propertyDisplayValue)
MLLPV2CommonInterface
updateMBeanProperty in interface MLLPV2CommonInterfacepropertyName - --The property name to be updated.propertyDisplayValue - --The property display value.com.stc.connector.hl7.framework.llp.MLLPV2CommonInterface#updateMBeanProperty()
public java.lang.String getDatasourceJNDIName()
throws HL7ApplicationException
MLLPV2CommonInterface
getDatasourceJNDIName in interface MLLPV2CommonInterfaceString - JNDI name.
HL7ApplicationExceptionMLLPV2CommonInterface.getDatasourceJNDIName()public java.lang.String getApplicationName()
MLLPV2CommonInterface
getApplicationName in interface MLLPV2CommonInterfaceString - Application Name.MLLPV2CommonInterface.getApplicationName()
public void sendMessagePayload()
throws HL7ApplicationException,
java.io.IOException
MLLPV2CommonInterfaceBefore this method is called, the outgoing HL7 data should already be stored in payload by the setPayload() method. Note: If it fails to send the enveloped data over the TCP/IP connection, IOException will be thrown. If it fails to envelope data, HL7ApplicationException will be thrown.
sendMessagePayload in interface MLLPV2CommonInterfaceHL7ApplicationException
java.io.IOExceptionMLLPV2CommonInterface.sendMessagePayload()
public void setMessagePayload(byte[] payload)
throws HL7ApplicationException
MLLPV2CommonInterface
setMessagePayload in interface MLLPV2CommonInterfacepayload - The payload to set.
HL7ApplicationExceptioncom.stc.connector.hl7.framework.llp.MLLPV2CommonInterface#setMessagePayload()public boolean isHL7v3Message()
MLLPV2CommonInterface
isHL7v3Message in interface MLLPV2CommonInterfaceboolean - return true or false.MLLPV2CommonInterface.isHL7v3Message()
public boolean isHL7v3QueuedAcknowledgementType()
throws HL7ApplicationException
MLLPV2CommonInterface
isHL7v3QueuedAcknowledgementType in interface MLLPV2CommonInterfaceboolean - return true or false.
HL7ApplicationExceptionMLLPV2CommonInterface.isHL7v3QueuedAcknowledgementType()
|
Sun Adapter for TCP/IP HL7 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||