|
Sun Adapter for SNA LU62 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SNAInboundApplication
This class represents the inbound SNALU 6.2 application (OTD) interface. The eWay functions are defined in this class as methods, and exposed in the GUI as sub-nodes. For example, the method send() will map to sub-node [OTD].[send], the method recv() will map to sub-node [OTD].[recv]. Some SNA conversation-related codes (LastReturnCode, LastState, LastStatus) are also exposed as sub-nodes. You may need to check these codes after the SNA conversation-related functions are called.
SNAInterface
Field Summary | |
---|---|
static java.lang.String |
version
|
Method Summary | |
---|---|
void |
changeState(java.lang.String state)
Changes conversation state. |
void |
changeState(java.lang.String state,
boolean confirm)
Changes conversation state with confirmation flag, if the flag is true ,
a CPIC cmcfm will be callled afterwards. |
void |
confirm()
Flushes local LU's send buffer and sends a confirmation request to the partner TP and waits for confirmation. |
void |
confirmed()
Replies to a confirmation request from the partner TP. |
SNAConstants |
getConstants()
Gets SNA constants object. |
SNACPICCalls |
getCPICCalls()
Gets SNA CPIC Calls object. |
byte[] |
getDataIn()
Gets the content for incoming payload (buffer), which is represented in the OTD as node DataIn . |
byte[] |
getDataOut()
Gets the content for outgoing payload (buffer), which is represented in the OTD as node DataOut . |
SNAInboundConfiguration |
getInboundConfiguration()
Gets the inbound configuration object. |
int |
getLastConversationState()
Returns the conversation_state value for the last SNA conversation-related function call. |
int |
getLastReturnCode()
Returns the ReturnCode value for the last SNA conversation-related function call. |
int |
getLastStatus()
Returns the status_received value for the last SNA receive-related function call. |
java.lang.String |
getPersistentData()
Retrieves the data from the persistent file. |
java.lang.String |
getState()
Gets the State value. |
void |
recv()
Receives any data that is currently available from the partner TP into incoming payload (buffer) represented as DataIn in the OTD from the partner TP. |
void |
recv(boolean confirm)
Receives any data that is currently available from the partner TP into incoming payload (buffer) represented as DataIn in the OTD from the partner TP with
confirmation flag, if the flag is true , a CPIC cmcfmd
will be callled after the data is received. |
void |
send()
Sends the outgoing payload (buffer) represented in the OTD as node DataOut into the local LU's send buffer for
transmission to the partner TP. |
void |
send(boolean confirm)
Sends the outgoing payload (buffer) represented in the OTD as node DataOut into the local LU's send buffer for
transmission to the partner TP with confirmation flag. |
void |
setDataOut(byte[] data)
Sets the content for outgoing payload (buffer) which is represented in the OTD as node DataOut . |
void |
setPersistentData(java.lang.String data)
Stores the data into the persistent file. |
void |
setState(java.lang.String stateValue)
Sets the State. |
Field Detail |
---|
static final java.lang.String version
Method Detail |
---|
SNAInboundConfiguration getInboundConfiguration()
SNAConstants getConstants()
SNACPICCalls getCPICCalls()
SNAConversationAttributes
, which represents the
conversation context.
For the input/output parameters of each CPIC function, please refer
your SNA CPIC manual for details.
void setState(java.lang.String stateValue) throws SNAApplicationException
stateValue
- The state value to set.
SNAApplicationException
- up on an errorjava.lang.String getState()
java.lang.String getPersistentData() throws SNAApplicationException
A null will be returned if the persistent file doesn't exist (which means no data is persisted yet).
SNAApplicationException
- up on an errorvoid setPersistentData(java.lang.String data) throws SNAApplicationException
data
- The persistent data to set.
SNAApplicationException
- up on an errorvoid setDataOut(byte[] data) throws SNAApplicationException
DataOut
.
Before calling the "send()" method, this payload should be set with SNA data.
data
- The outgoing payload (a byte array) to set
SNAApplicationException
- up on an errorSNAInterface.setDataOut(byte[])
byte[] getDataOut()
DataOut
.
Before calling the "send()" method, this payload should be set with SNA data.
SNAInterface.getDataOut()
byte[] getDataIn()
DataIn
.
After calling the "recv()" method, this payload should contain SNA data.
If no data can be received, this payload will contain null value.
SNAInterface.getDataIn()
void send() throws SNAApplicationException
DataOut
into the local LU's send buffer for
transmission to the partner TP.
Uses the conversation's synchronization level to determine
the confirmation. If synchronization level is CM_CONFIRM,
a CPIC cmcfm will be called after the data is sent.
For the general logic flow of this helper function,
you may need to refer the native interface
com.stc.connector.snalu62.jni.SNAInterface#send(boolean).
SNAApplicationException
- up on an errorSNAInterface.send(boolean)
void send(boolean confirm) throws SNAApplicationException
DataOut
into the local LU's send buffer for
transmission to the partner TP with confirmation flag.
When the flag is true
, a CPIC cmcfm will be called
after the data is sent.
For the general logic flow of this helper function,
you may need to refer the native interface
com.stc.connector.snalu62.jni.SNAInterface#send(boolean).
confirm
- The confirmation flag
SNAApplicationException
- up on an errorSNAInterface.send(boolean)
void recv() throws SNAApplicationException
DataIn
in the OTD from the partner TP.
Uses the conversation's synchronization level to determine
the confirmation. If synchronization level is CM_CONFIRM,
a CPIC cmcfmd will be called after the data is received.
For the general logic flow of this helper function,
you may need to refer the native interface
com.stc.connector.snalu62.jni.SNAInterface#receive(boolean).
SNAApplicationException
- up on an errorSNAInterface.receive(boolean)
void recv(boolean confirm) throws SNAApplicationException
DataIn
in the OTD from the partner TP with
confirmation flag, if the flag is true
, a CPIC cmcfmd
will be callled after the data is received.
For the general logic flow of this helper function,
you may need to refer the native interface
com.stc.connector.snalu62.jni.SNAInterface#receive(boolean).
confirm
- The confirmation flag
SNAApplicationException
- up on an errorSNAInterface.receive(boolean)
void changeState(java.lang.String state) throws SNAApplicationException
state
- The state to be changed into, the valid values are "SEND" and "RECEIVE".
SNAApplicationException
- up on an errorSNAInterface.changeState(String,boolean)
void changeState(java.lang.String state, boolean confirm) throws SNAApplicationException
true
,
a CPIC cmcfm will be callled afterwards.
State "SEND" notifies the partner TP that the local TP wants to send data.
State "RECEIVE" changes the state of the conversation for the local TP from SEND to RECEIVE.
For the general logic flow of this helper function,
you may need to refer the native interface
com.stc.connector.snalu62.jni.SNAInterface#changeState(String,boolean).
state
- The state to be changed into, the valid values are "SEND" and "RECEIVE".confirm
- The confirmation flag
SNAApplicationException
- up on an errorSNAInterface.changeState(String,boolean)
void confirm() throws SNAApplicationException
SNAApplicationException
- up on an errorSNAInterface.confirm()
void confirmed() throws SNAApplicationException
SNAApplicationException
- up on an errorSNAInterface.confirmed()
int getLastReturnCode()
SNAInterface.getReturnCode()
int getLastConversationState()
SNAInterface.getLastState()
int getLastStatus()
SNAInterface.getLastStatus()
|
Sun Adapter for SNA LU62 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |