Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Sun Adapter for SNA LU62 API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.stc.connector.snalu62.outbound
Interface SNAOutboundApplication

    public interface SNAOutboundApplication

This class represents the outbound SNALU 6.2 application (OTD) interface. The eWay functions are defined in this class as methods, and exposed in 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.

Version:
  cvs revision: $Revision: 1.5 $ Last Modified: $Date: 2007/12/12 00:11:33 $
Author:
  Harry Liu (harryliu@seebeyond.com)
See Also:
  `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.
`void` | `endConversation()` Ends the conversation manually.
`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`.
`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.
`SNAOutboundConfiguration` | `getOutboundConfiguration()` Gets the outbound configuration object.
`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.
`void` | `startConversation()` Starts the conversation manually.

Field Detail

### version

    static final java.lang.String version

See Also:
  Constant Field Values

Method Detail

### getOutboundConfiguration

    SNAOutboundConfiguration getOutboundConfiguration()

  Gets the outbound configuration object.

  Returns:
    SNAInboundConfiguration object

### getConstants

    SNAConstants getConstants()

  Gets SNA constants object. We expose the SNA constants for users' convenience.

  Returns:
    SNAConstants object

### getCPICCalls

    SNACPICCalls getCPICCalls()

  Gets SNA CPIC Calls object. All CPIC functions are grouped under this node. Note: The CPIC functions use the same name as their corresponding CPIC calls but they do not have parameters in their signatures, the parameters used by the CPIC calls are stored in an instance of type `SNAConversationAttributes` which represents the conversation context. For the input/output parameters of each CPIC function, please refer your SNA CPIC manual for details.

  Returns:
    SNACPICCalls object

### setState

    void setState(java.lang.String stateValue)
                  throws SNAApplicationException

  Sets the State. The state is a String variable exposed to users. Users can use it on their desires. The scope of this variable is controlled by the configuration parameter "Scope Of State" (see the configuration gui for details). Initially the state variable has value null.

  Parameters:
    `stateValue` - The state value to set.
  Throws:
    `SNAApplicationException` - up on an error

### getState

    java.lang.String getState()

  Gets the State value. The state is a String variable exposed to users. Users can use it on their desires. The scope of this variable is controlled by the configuration parameter "Scope Of State" (see the configuration gui for details). Initially the state variable has value null.

  Returns:
    The state value.

### getPersistentData

    java.lang.String getPersistentData()
                                       throws SNAApplicationException

  Retrieves the data from the persistent file. The persistent data is stored in a local file whose location is controlled by the configuration parameter "Persistent Storage Location" (see the configuration gui for details). Users can use it on their desires.

  A null will be returned if the persistent file doesn't exist (which means no data is persisted yet).

  Returns:
    The persistent data as a String.
  Throws:
    `SNAApplicationException` - up on an error

### setPersistentData

    void setPersistentData(java.lang.String data)
                           throws SNAApplicationException

  Stores the data into the persistent file. The persistent data is stored in a local file whose location is controlled by the configuration parameter "Persistent Storage Location" (see the configuration gui for details). Users can use it on their desires.

  Parameters:
    `data` - The persistent data to be set.
  Throws:
    `SNAApplicationException` - up on an error

### setDataOut

    void setDataOut(byte[] data)
                    throws SNAApplicationException

  Sets the content for outgoing payload (buffer), which is represented in the OTD as node `DataOut`. Before calling the "send()" method, this payload should be set with SNA data.

  Parameters:
    `data` - The outgoing payload (a byte array) to set
  Throws:
    `SNAApplicationException` - up on an error
  See Also:
    `SNAInterface.setDataOut(byte[])`

### getDataOut

    byte[] getDataOut()

  Gets the content for outgoing payload (buffer), which is represented in the OTD as node `DataOut`. Before calling the "send()" method, this payload should be set with SNA data.

  Returns:
    The outgoing payload (a byte array)
  See Also:
    `SNAInterface.getDataOut()`

### getDataIn

    byte[] getDataIn()

  Gets the content for incoming payload (buffer), which is represented in the OTD as node `DataIn`. After calling the "recv()" method, this payload should contain SNA data. If no data can be received, this payload will contain null value.

  Returns:
    The incoming payload (a byte array)
  See Also:
    `SNAInterface.getDataIn()`

### send

    void send()
              throws SNAApplicationException

  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. 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).

  Throws:
    `SNAApplicationException` - up on an error
  See Also:
    `SNAInterface.send(boolean)`

### send

    void send(boolean confirm)
              throws SNAApplicationException

  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. 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).

  Parameters:
    `confirm` - The confirmation flag
  Throws:
    `SNAApplicationException` - up on an error
  See Also:
    `SNAInterface.send(boolean)`

### recv

    void recv()
              throws SNAApplicationException

  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. 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).

  Throws:
    `SNAApplicationException` - up on an error
  See Also:
    `SNAInterface.receive(boolean)`

### recv

    void recv(boolean confirm)
              throws SNAApplicationException

  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. 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).

  Parameters:
    `confirm` - The confirmation flag
  Throws:
    `SNAApplicationException` - up on an error
  See Also:
    `SNAInterface.receive(boolean)`

### changeState

    void changeState(java.lang.String state)
                     throws SNAApplicationException

  Changes conversation state. 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).

  Parameters:
    `state` - The state to be changed into, the valid values are "SEND" and "RECEIVE".
  Throws:
    `SNAApplicationException` - up on an error
  See Also:
    `SNAInterface.changeState(String,boolean)`

### changeState

    void changeState(java.lang.String state,
                     boolean confirm)
                     throws SNAApplicationException

  Changes conversation state with confirmation flag, if the flag is `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).

  Parameters:
    `state` - The state to be changed into, the valid values are "SEND" and "RECEIVE".
    `confirm` - The confirmation flag
  Throws:
    `SNAApplicationException` - up on an error
  See Also:
    `SNAInterface.changeState(String,boolean)`

### confirm

    void confirm()
                 throws SNAApplicationException

  Flushes local LU's send buffer and sends a confirmation request to the partner TP and waits for confirmation. The program can call this method only if the conversation's synchronization level is CM_CONFIRM. For the general logic flow of this helper function, you may need to refer the native interface com.stc.connector.snalu62.jni.SNAInterface#confirm().

  Throws:
    `SNAApplicationException` - up on an error
  See Also:
    `SNAInterface.confirm()`

### confirmed

    void confirmed()
                   throws SNAApplicationException

  Replies to a confirmation request from the partner TP. It informs the partner TP that the local TP has not detected an error in the received data. Because the program issuing the confirmation request waits for a confirmation, this call synchronizes the processing of the two programs. For the general logic flow of this helper function, you may need to refer the native interface com.stc.connector.snalu62.jni.SNAInterface#confirmed().

  Throws:
    `SNAApplicationException` - up on an error
  See Also:
    `SNAInterface.confirmed()`

### startConversation

    void startConversation()
                           throws SNAApplicationException

  Starts the conversation manually. It is allowed/expected for "Manual" connection mode only.

  Throws:
    `SNAApplicationException` - up on an error

### endConversation

    void endConversation()
                         throws SNAApplicationException

  Ends the conversation manually. It is allowed/expected for "Manual" connection mode only.

  Throws:
    `SNAApplicationException` - up on an error

### getLastReturnCode

    int getLastReturnCode()

  Returns the ReturnCode value for the last SNA conversation-related function call.

  Returns:
    The ReturnCode int value.
  See Also:
    `SNAInterface.getReturnCode()`

### getLastConversationState

    int getLastConversationState()

  Returns the conversation_state value for the last SNA conversation-related function call.

  Returns:
    The conversation_state int value.
  See Also:
    `SNAInterface.getLastState()`

### getLastStatus

    int getLastStatus()

  Returns the status_received value for the last SNA receive-related function call. Normally, it is tied to CPIC cmrcv() or helper recv() method call.

  Returns:
    The status_received int value.
  See Also:
    `SNAInterface.getLastStatus()`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Sun Adapter for SNA LU62 API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008 Sun Microsystems, Inc. All rights reserved.