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.jni
Class SNAInterface

    java.lang.Object
      com.stc.connector.snalu62.jni.SNAInterface

    public class SNAInterface

extends java.lang.Object

Field Summary
`static java.lang.String` | `version`

Constructor Summary
`SNAInterface()` Default constructor.

Method Summary
`boolean` | `acceptConversation()` It is a native function call.
`boolean` | `changeState(java.lang.String state, boolean confirm)` It is a native function call.
`boolean` | `cmaccp()` It is a native function call.
`boolean` | `cmallc()` It is a native function call.
`boolean` | `cmcanc()` It is a native function call (Cancel_Conversation).
`boolean` | `cmcfm()` It is a native function call (Confirm).
`boolean` | `cmcfmd()` It is a native function call (Confirmed).
`boolean` | `cmdeal()` It is a native function call (Deallocate).
`boolean` | `cmecs()` It is a native function call (Extract_Conversation_State).
`boolean` | `cmecsu()` It is a native function call (Extract_Conversation_Security_User_ID).
`boolean` | `cmect()` It is a native function call (Extract_Conversation_Type).
`boolean` | `cmemn()` It is a native function call (Extract_Mode_Name).
`boolean` | `cmepln()` It is a native function call (Extract_Partner_LU_Name).
`boolean` | `cmesl()` It is a native function call (Extract_Sync_Level).
`boolean` | `cmetpn()` It is a native function call (Extract_TP_Name).
`boolean` | `cmflus()` It is a native function call (Flush).
`boolean` | `cminit()` It is a native function call (Initialize_Conversation).
`boolean` | `cmptr()` It is a native function call (Prepare_To_Receive).
`boolean` | `cmrcv()` It is a native function call (Receive).
`boolean` | `cmrts()` It is a native function call (Request_To_Send).
`boolean` | `cmscsp()` It is a native function call (Set_Conversation_Security_Password).
`boolean` | `cmscst()` It is a native function call (Set_Conversation_Security_Type).
`boolean` | `cmscsu()` It is a native function call (Set_Conversation_Security_User_ID).
`boolean` | `cmsct()` It is a native function call (Set_Conversation_Type).
`boolean` | `cmsdt()` It is a native function call (Set_Deallocate_Type).
`boolean` | `cmsed()` It is a native function call (Set_Error_Direction).
`boolean` | `cmsend()` It is a native function call (Send_Data).
`boolean` | `cmserr()` It is a native function call (Send_Error).
`boolean` | `cmsf()` It is a native function call (Set_Fill).
`boolean` | `cmsld()` It is a native function call (Set_Log_Data).
`boolean` | `cmsltp()` It is a native function call (Specify_Local_TP_Name).
`boolean` | `cmsmn()` It is a native function call (Set_Mode_Name).
`boolean` | `cmspln()` It is a native function call (Set_Partner_LU_Name).
`boolean` | `cmspm()` It is a native function call (Set_Processing_Mode).
`boolean` | `cmsptr()` It is a native function call (Set_Prepare_To_Receive_Type).
`boolean` | `cmsrc()` It is a native function call (Set_Return_Control ).
`boolean` | `cmsrt()` It is a native function call (Set_Receive_Type).
`boolean` | `cmssl()` It is a native function call (Set_Sync_Level ).
`boolean` | `cmsst()` It is a native function call (Set_Send_Type).
`boolean` | `cmstpn()` It is a native function call (Set_TP_Name).
`boolean` | `cmtrts()` It is a native function call (Test_Request_To_Send_Received).
`boolean` | `cmwait()` It is a native function call (Wait_For_Conversation).
`boolean` | `confirm()` It is a native function call.
`boolean` | `confirmed()` It is a native function call.
`boolean` | `connect(boolean confirm)` It is a native function call.
`boolean` | `disconnect()` It is a native function call.
`byte[]` | `getConversationID()` Gets SNA Conversation ID which gets set by the JNI code when a conversation is established.
`int` | `getConvReturnCode()` Gets the SNA conversation return code set by the JNI code as a result of the last CPIC function call (cmwait) which generated a conversation return code.
`int` | `getConvType()` Gets the SNA conversation type which is used for setting the SNA conversation type by the JNI code or for retrieving the conversation type by the JNI code when the conversation type is retrieved.
`byte[]` | `getDataIn()` Gets data which gets set by the JNI code when data is received from the partner in the SNA conversation.
`byte[]` | `getDataOut()` Gets data which is passed to the JNI code for sending data to the partner in the SNA conversation.
`int` | `getDataReceivedType()` Gets the SNA data receive type set by the JNI code as a result of the last CPIC function call which generated a data receive type.
`int` | `getDeallocTypeJ()` Gets the SNA dealloc type which is used for setting the SNA dealloc type by the JNI code.
`int` | `getErrorDirection()` Gets the SNA error direction used by the JNI code for setting the SNA error direction.
`int` | `getFillType()` Gets the SNA fill type which is used for setting the SNA fill type by the JNI code.
`boolean` | `getHaveConversation()` Gets if a conversation is established with the SNA partner, this flag will be set to true otherwise it is set to false by the JNI code.
`java.lang.String` | `getHostName()`
`boolean` | `getIsInbound()` Deprecated.
`int` | `getLastError()` Deprecated.
`int` | `getLastState()` Gets the SNA state set by the JNI code.
`int` | `getLastStatus()` Gets the SNA status code set by the JNI code as a result of the last CPIC function call which generated an SNA status code.
`java.lang.String` | `getLocalLUName()` Gets the Local Logical Unit Name of the SNA partner which is accepting conversations from the initiating SNA partner.
`java.lang.String` | `getLocalTPName()` Gets the Local TP (Transaction Program) Name
`byte[]` | `getLogData()` Gets the SNA log data which is used by the JNI code for sending the log data.
`java.lang.String` | `getModeName()` Get the SNA mode name which is used for setting the SNA mode name by the JNI code or for retrieving the mode name by the JNI code when the mode name is retrieved.
`int` | `getPacketSize()` Gets the size of the data packets used by the JNI code when receiving data from the partner in the SNA conversation.
`java.lang.String` | `getPartnerLUName()` Gets the partner LU (Logical Unit) name.
`int` | `getPrepareToReceiveType()` Gets the SNA prepare to receive type which is used for setting the SNA prepare to receive type by the JNI code.
`int` | `getProcessingMode()` Gets the SNA processing mode which is used for setting the SNA processing mode by the JNI code.
`int` | `getReceiveType()` Gets the SNA receive type which is used for setting the SNA receive type by the JNI code.
`int` | `getReq2SendReceived()` Gets the SNA request to send received code set by the JNI code as a result of the last CPIC function call which generated a request to send received code.
`int` | `getReturnCode()` Gets return code which gets set by the JNI code and is the return code returned by the last major CPIC function call.
`int` | `getReturnControl()` Gets the SNA return control which is used for setting the SNA return control by the JNI code.
`int` | `getSecurityType()` Gets the SNA conversation security type which is used for setting the SNA conversation security type by the JNI code or for retrieving the security type by the JNI code when the conversation security type is retrieved.
`java.lang.String` | `getSecurityUserID()` Gets the SNA conversation security ID which is used for setting the SNA conversation security ID by the JNI code or for retrieving the security ID by the JNI code when the conversation security ID is retrieved.
`int` | `getSendType()` Gets the SNA send type which is used for setting the SNA send type by the JNI code.
`int` | `getStatusReceived()` Gets the SNA status received set by the JNI code as a result of the last CPIC function call which generated a status received.
`java.lang.String` | `getSymDestName()` Gets the Symbolic Destination Name of the SNA partner to which the initiating SNA partner will establish an SNA conversation.
`int` | `getSyncLevel()` Gets the SNA synch level which is used for setting the SNA synch level by the JNI code or for retrieving the mode name by the JNI code when the synch level is retrieved.
`int` | `getTimeout()` Gets timeout in milliseconds used by the JNI code when waiting to accept a conversation or when receiving data through eWay's helper function recv().
`static void` | `initCPIC()` It is a native function call.
`boolean` | `isConnected()` It is a native function call.
`boolean` | `receive(boolean confirm)` It is a native function call.
`boolean` | `send(boolean confirm)` It is a native function call.
`void` | `setConversationID(byte[] conversationId)` Sets SNA Conversation ID which gets set by the JNI code when a conversation is established.
`void` | `setConvReturnCode(int convReturnCode)` Sets the SNA conversation return code set by the JNI code as a result of the last CPIC function call (cmwait) which generated a conversation return code.
`void` | `setConvType(int convType)` Sets the SNA conversation type which is used for setting the SNA conversation type by the JNI code or for retrieving the conversation type by the JNI code when the conversation type is retrieved.
`void` | `setDataIn(byte[] data)` Sets data which gets set by the JNI code when data is received from the partner in the SNA conversation.
`void` | `setDataOut(byte[] data)` Sets data which is passed to the JNI code for sending data to the partner in the SNA conversation.
`void` | `setDataReceivedType(int dataReceivedType)` Sets the SNA data receive type set by the JNI code as a result of the last CPIC function call which generated a data receive type.
`boolean` | `setDeallocType(int dealloctype)` It is a native function call.
`void` | `setDeallocTypeJ(int deallocType)` Sets the SNA dealloc type which is used for setting the SNA dealloc type by the JNI code.
`void` | `setErrorDirection(int errorDirection)` Sets the SNA error direction used by the JNI code for setting the SNA error direction.
`void` | `setFillType(int fillType)` Sets the SNA fill type which is used for setting the SNA fill type by the JNI code.
`void` | `setHaveConversation(boolean haveConversation)` Sets if a conversation is established with the SNA partner, this flag will be set to true otherwise it is set to false by the JNI code.
`void` | `setHostName(java.lang.String hostName)`
`void` | `setIsInbound(boolean isInbound)` Deprecated.
`void` | `setLastError(int lastError)` Deprecated.
`void` | `setLastState(int lastState)` Sets the SNA state set by the JNI code.
`void` | `setLastStatus(int lastStatus)` Sets the SNA status code set by the JNI code as a result of the last CPIC function call which generated an SNA status code.
`void` | `setLocalLUName(java.lang.String localLUName)` Sets the Local Logical Unit Name of the SNA partner which is accepting conversations from the initiating SNA partner.
`void` | `setLocalTPName(java.lang.String localTPName)` Sets the Local TP (Transaction Program) Name
`void` | `setLogData(byte[] logData)` Sets the SNA log data which is used by the JNI code for sending the log data.
`void` | `setModeName(java.lang.String modeName)` Sets the SNA mode name which is used for setting the SNA mode name by the JNI code or for retrieving the mode name by the JNI code when the mode name is retrieved.
`void` | `setPacketSize(int packetSize)` Sets the size of the data packets used by the JNI code when receiving data from the partner in the SNA conversation.
`void` | `setPartnerLUName(java.lang.String partnerLUName)` Sets the partner LU (Logical Unit) name.
`void` | `setPrepareToReceiveType(int prepareToReceiveType)` Sets the SNA prepare to receive type which is used for setting the SNA prepare to receive type by the JNI code.
`void` | `setProcessingMode(int processingMode)` Sets the SNA processing mode which is used for setting the SNA processing mode by the JNI code.
`void` | `setReceiveType(int receiveType)` Sets the SNA receive type which is used for setting the SNA receive type by the JNI code.
`void` | `setReq2SendReceived(int req2SendReceivedType)` Sets the SNA request to send received code set by the JNI code as a result of the last CPIC function call which generated a request to send received code.
`void` | `setReturnCode(int returnCode)` Sets return code which gets set by the JNI code and is the return code returned by the last major CPIC function call.
`void` | `setReturnControl(int returnControl)` Sets the SNA return control which is used for setting the SNA return control by the JNI code.
`void` | `setSecurityPassword(java.lang.String securityPassword)` Sets the SNA conversation security password which is used for setting the conversation security password by the JNI code.
`void` | `setSecurityType(int securityType)` Sets the SNA conversation security type which is used for setting the SNA conversation security type by the JNI code or for retrieving the security type by the JNI code when the conversation security type is retrieved.
`void` | `setSecurityUserID(java.lang.String securityUserID)` Sets the SNA conversation security ID which is used for setting the SNA conversation security ID by the JNI code or for retrieving the security ID by the JNI code when the conversation security ID is retrieved.
`void` | `setSendType(int sendType)` Sets the SNA send type which is used for setting the SNA send type by the JNI code.
`void` | `setStatusReceived(int statusReceived)` Sets the SNA status received set by the JNI code as a result of the last CPIC function call which generated a status received.
`void` | `setSymDestName(java.lang.String symDestName)` Sets the Symbolic Destination Name of the SNA partner to which the initiating SNA partner will establish an SNA conversation.
`void` | `setSyncLevel(int syncLevel)` Sets the SNA synch level which is used for setting the SNA synch level by the JNI code or for retrieving the mode name by the JNI code when the synch level is retrieved.
`void` | `setTimeout(int timeout)` Sets timeout in milliseconds used by the JNI code when waiting to accept a conversation or when receiving data through eWay's helper function.
`boolean` | `waitForConversation()` It is a native function call.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### version

    public static final java.lang.String version

See Also:
  Constant Field Values

Constructor Detail

### SNAInterface

    public SNAInterface()

  Default constructor. Initializes attributes which are used by the Java code and the native code.

Method Detail

### connect

    public boolean connect(boolean confirm)

  It is a native function call. Initializes an SNA conversation with a responding SNA partner LU.

  CPIC functions called:

          cminit
          cmspm
          cmssl
          cmallc
          cmflus

  General Logic Flow (no account for error conditions):

           call cminit() to initialize the conversation
           call cmspm() to set blocking mode to CM_BLOCKING
           if confirm == true
              then
                 call cmssl() to set synch level to CM_CONFIRM
           call cmallc() to allocate conversation with partner LU
           call cmflus() to cmflus conversation

  Upon returning, the following attributes will be set:

           _ConversationID
           _ReturnCode

  Upon returning, the following attributes may be set:

           _SNALastState

  Parameters:
    `confirm` - boolean Determines whether the established conversation is in confirm mode or non confirm mode.
  Returns:
    boolean true if no error had occurred false otherwise.

### disconnect

    public boolean disconnect()

  It is a native function call. Deallocates an SNA conversation from an SNA partner LU.

  CPIC functions called:

          cmcanc
          cmdeal
          cmrltp (NOTE: Unix platforms only)

  General Logic Flow (no account for error conditions):

          if previous CPIC function call resulted in CM_OPERATION_INCOMPLETE
             then
                call cmcanc()
          call cmdeal() to deallocate the conversation
          On Unix platforms, the logic then follows:
          call cmrltp() to recover the Local TP Name

  Upon returning, the following attributes will be set:

          _ReturnCode

  Upon returning, the following attributes may be set:

          _SNALastState

  Returns:
    boolean true if no error had occurred false otherwise.

### acceptConversation

    public boolean acceptConversation()

  It is a native function call. Accepts an SNA conversation with an initiating SNA partner LU.

  CPIC functions called:

          cmsltp
          cmaccp (NOTE: Windows platform only)
          cminic (NOTE: Unix platforms only)
          cmspm  (NOTE: Unix platforms only)
          cmacci (NOTE: Unix platforms only)

  General Logic Flow (no account for error conditions):

           call cmsltp() to set the local TP name
          On Windows platforms, the logic then follows:
           call cmaccp() to accept a conversation
          On Unix platforms, the logic then follows:
           call cminic() to intialize
           call cmspm() to set the processing mode to CM_BLOCKING
           call cmacci() to accept a conversation
           since the cmacci is blocking mode, this call will block

  Upon returning, the following attributes will be set:

           _HaveConversation
           _ConversationID
           _ReturnCode

  Upon returning, the following attributes may be set:

           _SNALastState

  Returns:
    boolean true if no error had occurred false otherwise.

### waitForConversation

    public boolean waitForConversation()

  It is a native function call. Waits for an incoming conversation request from an SNA partner LU.

  CPIC functions called:

          cmwait
          cmacci (NOTE: Unix platforms only)

  General Logic Flow (no account for error conditions):

          On Windows platforms, the logic follows:
           call cmwait() to wait for an incoming conversation request
          On Unix platforms, the logic follows:
           if _HaveConversation == true
              then
                 call cmwait() to wait for an incoming conversation request
           else
              call cmacci() to accept a conversation

  Upon returning, the following attributes will be set:

           _HaveConversation
           _ReturnCode

  Upon returning, the following attributes may be set:

           _SNALastState

  Returns:
    boolean true if no error had occurred false otherwise.

### isConnected

    public boolean isConnected()

  It is a native function call. Determines whether the intializing SNA partner LU has established a conversation with a responding SNA partner LU.

  CPIC functions called:

          cmecs

  General Logic Flow (no account for error conditions):

           call cmecs() to get the state of the conversation

  Upon returning, the following attributes will be set:

           _ReturnCode

  Upon returning, the following attributes may be set:

           _SNALastState

  Returns:
    boolean true if conversation is established, false otherwise

### changeState

    public boolean changeState(java.lang.String state,
                               boolean confirm)

  It is a native function call. Changes the state of the SNA conversation from SEND to RECEIVE or vice versa.

  CPIC functions called:

          cmrts
          cmflus
          cmrcv
          cmcfmd
          cmptr

  General Logic Flow (no account for error conditions):

           if state is SEND
              then
                 call cmrts() to change from receive to send
                 call cmflus() to force change state to send
                 while return code != CM_CONFIRM_SEND_RECEIVED and return code != CM_SEND_RECEIVED
                    then call cmrcv()
                 if confrim == true
                    then
                       call cmcfmd() to confirmed (acknowledge) the CM_CONFIRM_SEND_RECEIVED
           else if state is RECEIVE
              then
                 call cmptr() to change from send to receive
                 call cmflus() to force change state to receive

  Upon returning, the following attributes will be set:

           _ReturnCode

  Upon returning, the following attributes may be set:

           _SNALastState

  Parameters:
    `state` - String The state to change to - valid values are `SEND` or `RECEIVE`
    `confirm` - boolean Determines whether to acknowledge the partner LU when executing a state change.
  Returns:
    boolean true if state was change successfully, false otherwise

### confirm

    public boolean confirm()

  It is a native function call. Sends the contents of the local LU's send buffer and a confirmation request to the partner program and waits for confirmation.

  CPIC functions called:

          cmcfm
          cmecs

  General Logic Flow (no account for error conditions):

           call cmcfm() to request a confirmation from a receiving SNA partner LU
           if the return code != CM_OK and return code != CM_OPERATION_INCOMPLETE
              then
                 initialize loop control variable cTries to 0
                 while cTries less than 30
                    do
                       call cmecs() to get the state and return code
                       if return code == CM_PROGRAM_STATE_CHECK
                          then
                             increment cTries by 1
                             wait 200 ms (in JNI code select is called with NULL file descriptors with 200 ms for timeout)
                       else
                          break from while loop

  Upon returning, the following attributes will be set:

           _ReturnCode

  Upon returning, the following attributes may be set:

           _SNALastState

  Returns:
    boolean true if confirm request was sent successfully, false otherwise

### confirmed

    public boolean confirmed()

  It is a native function call. Replies to a confirmation request from the partner program.

  CPIC functions called:

          cmcfmd

  General Logic Flow (no account for error conditions):

           call cmcfmd() to acknowledge the confirmation request from the sending SNA partner LU

  Upon returning, the following attributes will be set:

           _ReturnCode

  Upon returning, the following attributes may be set:

           _SNALastState

  Returns:
    boolean true if confirm request was sent successfully, false otherwise

### send

    public boolean send(boolean confirm)

  It is a native function call. Puts data in the local LU's send buffer for transmission to the partner program and sends it to the partner LU.

  CPIC functions called:

          cmsend
          cmflus
          cmcfm

  General Logic Flow (no account for error conditions):

           call cmsend() to send the data (_DataOut) to the SNA partner LU
           call cmflus() to force sending of the data
           if confirm == true
              then
                 call cmcfm() to send a confirmation request from the receiving SNA partner LU

  Before executing this method, the following attributes needs to be set:

           _DataOut

  Upon returning, the following attributes will be set:

           _ReturnCode

  Upon returning, the following attributes may be set:

           _SNALastState

  Parameters:
    `confirm` - boolean Determines whether or not to send a confirmation request
  Returns:
    boolean true if the data was sent successfully, false otherwise

### receive

    public boolean receive(boolean confirm)

  It is a native function call. Receives data from a sending SNA partner LU.

  CPIC functions called:

          cmsrt
          cmrcv
          cmwait
          cmacci
          cmecs
          cmcfmd

  General Logic Flow (no account for error conditions):

           start timer for timeout
           call cmsrt() to set the receive type to CM_RECEIVE_IMMEDIATE
           while true
              do
                 call cmrcv() to receive _PacketSize packet of data
                 if return code == CM_OPERATION_INCOMPLETE
                    then
                       On Windows platforms, the logic then follows:
                       call cmwait() to wait for a conversation from an SNA partner LU
                       On Unix platforms, the logic follows:
                       if _HaveConversation == true
                          then
                             call cmwait() to wait for an incoming conversation request
                          else
                             call cmacci() to accept a conversation
                 else if return code != CM_OK and return code != CM_DEALLOCATED_NORMAL
                    then
                       if return code == CM_UNSUCCESSFUL
                          then
                             wait for 10 ms (in JNI code sleep is called with 10 ms)
                             go back to the top of the while loop and continue
                       else
                          exit while loop
                 else if status received == CM_CONFIRM_DEALLOC_RECEIVED and confirm == true
                    then
                       call cmcfmd() to acknowledge the confirmation request from the sending SNA partner LU
                       exit while loop
                 else if status received == CM_DEALLOCATED_NORMAL or return code == CM_DEALLOCATED_NORMAL
                    then
                       copy data packet as complete data received

                 if received length > 0
                    then
                       append data packet to data already received
                 if data received == CM_COMPLETE_DATA_RECEIVED || data received == CM_NO_DATA_RECEIVED
                    then
                       if status received == CM_CONFIRM_RECEIVED || status received == CM_CONFIRM_SEND_RECEIVED
                          then
                             if confirm == true
                                then call cmecs() to get the state and return code
                                if return code == CM_OK
                                   then
                                      call cmcfmd() to acknowledge the confirmation request from the sending SNA partner LU
                                      if return code == CM_OPERATION_INCOMPLETE
                                         then
                                            call cmwait() to wait for cmcfmd to complete
                 if data received == CM_COMPLETE_DATA_RECEIVED or received length > 0
                    then
                       exit while loop - completely received data from sending SNA partner LU
                 calculate time
                 if timeout (delta time > _Timeout)
                    then
                       exit while loop
           #end while loop

  Before executing this method, the following attributes needs to be set:

           _PacketSize
           _Timeout

  Upon returning, the following attributes will be set:

           _DataIn
           _ReturnCode

  Upon returning, the following attributes may be set:

           _SNALastState

  Parameters:
    `confirm` - boolean Determines whether or not to acknowledge a confirmation request
  Returns:
    boolean true if the data was received successfully, false otherwise

### setDeallocType

    public boolean setDeallocType(int dealloctype)

  It is a native function call. Sets the deallocation type for the SNA conversation.

  CPIC functions called:

          cmsdt

  General Logic Flow (no account for error conditions):

           call cmsdt() to set the deallocation type for the SNA conversation

  Upon returning, the following attributes will be set:

           _ReturnCode

  Upon returning, the following attributes may be set:

           _SNALastState

  Parameters:
    `dealloctype` - int The deallocation type to set for the conversation
  Returns:
    boolean true if deallocation type was set successfully, false otherwise

### initCPIC

    public static void initCPIC()

  It is a native function call. Initializes thirdparty CPIC library.

### cmaccp

    public boolean cmaccp()

  It is a native function call. Accept an SNA conversation.

  Upon returning, the following attributes will be set:

           _ConversationID
           _ReturnCode

  Returns:
    boolean true if no error had occurred, false otherwise

### cmallc

    public boolean cmallc()

  It is a native function call. Allocates an SNA conversation.

  Upon returning, the following attributes will be set:

           _ReturnCode

  Returns:
    boolean true if no error had occurred, false otherwise

### cmcanc

    public boolean cmcanc()

  It is a native function call (Cancel_Conversation).

  Returns:
    boolean true if no error had occurred, false otherwise

### cmcfm

    public boolean cmcfm()

  It is a native function call (Confirm).

  Returns:
    boolean true if no error had occurred, false otherwise

### cmcfmd

    public boolean cmcfmd()

  It is a native function call (Confirmed).

  Returns:
    boolean true if no error had occurred, false otherwise

### cmdeal

    public boolean cmdeal()

  It is a native function call (Deallocate).

  Returns:
    boolean true if no error had occurred, false otherwise

### cmecs

    public boolean cmecs()

  It is a native function call (Extract_Conversation_State).

  Returns:
    boolean true if no error had occurred, false otherwise

### cmect

    public boolean cmect()

  It is a native function call (Extract_Conversation_Type).

  Returns:
    boolean true if no error had occurred, false otherwise

### cmemn

    public boolean cmemn()

  It is a native function call (Extract_Mode_Name).

  Returns:
    boolean true if no error had occurred, false otherwise

### cmepln

    public boolean cmepln()

  It is a native function call (Extract_Partner_LU_Name).

  Returns:
    boolean true if no error had occurred, false otherwise

### cmesl

    public boolean cmesl()

  It is a native function call (Extract_Sync_Level).

  Returns:
    boolean true if no error had occurred, false otherwise

### cmetpn

    public boolean cmetpn()

  It is a native function call (Extract_TP_Name).

  Returns:
    boolean true if no error had occurred, false otherwise

### cmflus

    public boolean cmflus()

  It is a native function call (Flush).

  Returns:
    boolean true if no error had occurred, false otherwise

### cminit

    public boolean cminit()

  It is a native function call (Initialize_Conversation).

  Returns:
    boolean true if no error had occurred, false otherwise

### cmptr

    public boolean cmptr()

  It is a native function call (Prepare_To_Receive).

  Returns:
    boolean true if no error had occurred, false otherwise

### cmrcv

    public boolean cmrcv()

  It is a native function call (Receive).

  Returns:
    boolean true if no error had occurred, false otherwise

### cmrts

    public boolean cmrts()

  It is a native function call (Request_To_Send).

  Returns:
    boolean true if no error had occurred, false otherwise

### cmsend

    public boolean cmsend()

  It is a native function call (Send_Data).

  Returns:
    boolean true if no error had occurred, false otherwise

### cmserr

    public boolean cmserr()

  It is a native function call (Send_Error).

  Returns:
    boolean true if no error had occurred, false otherwise

### cmsct

    public boolean cmsct()

  It is a native function call (Set_Conversation_Type).

  Returns:
    boolean true if no error had occurred, false otherwise

### cmsdt

    public boolean cmsdt()

  It is a native function call (Set_Deallocate_Type).

  Returns:
    boolean true if no error had occurred, false otherwise

### cmsed

    public boolean cmsed()

  It is a native function call (Set_Error_Direction).

  Returns:
    boolean true if no error had occurred, false otherwise

### cmsf

    public boolean cmsf()

  It is a native function call (Set_Fill).

  Returns:
    boolean true if no error had occurred, false otherwise

### cmsld

    public boolean cmsld()

  It is a native function call (Set_Log_Data).

  Returns:
    boolean true if no error had occurred, false otherwise

### cmsltp

    public boolean cmsltp()

  It is a native function call (Specify_Local_TP_Name).

  Returns:
    boolean true if no error had occurred, false otherwise

### cmspm

    public boolean cmspm()

  It is a native function call (Set_Processing_Mode).

  Returns:
    boolean true if no error had occurred, false otherwise

### cmsmn

    public boolean cmsmn()

  It is a native function call (Set_Mode_Name).

  Returns:
    boolean true if no error had occurred, false otherwise

### cmspln

    public boolean cmspln()

  It is a native function call (Set_Partner_LU_Name).

  Returns:
    boolean true if no error had occurred, false otherwise

### cmsptr

    public boolean cmsptr()

  It is a native function call (Set_Prepare_To_Receive_Type).

  Returns:
    boolean true if no error had occurred, false otherwise

### cmsrt

    public boolean cmsrt()

  It is a native function call (Set_Receive_Type).

  Returns:
    boolean true if no error had occurred, false otherwise

### cmsrc

    public boolean cmsrc()

  It is a native function call (Set_Return_Control ).

  Returns:
    boolean true if no error had occurred, false otherwise

### cmsst

    public boolean cmsst()

  It is a native function call (Set_Send_Type).

  Returns:
    boolean true if no error had occurred, false otherwise

### cmssl

    public boolean cmssl()

  It is a native function call (Set_Sync_Level ).

  Returns:
    boolean true if no error had occurred, false otherwise

### cmstpn

    public boolean cmstpn()

  It is a native function call (Set_TP_Name).

  Returns:
    boolean true if no error had occurred, false otherwise

### cmtrts

    public boolean cmtrts()

  It is a native function call (Test_Request_To_Send_Received).

  Returns:
    boolean true if no error had occurred, false otherwise

### cmwait

    public boolean cmwait()

  It is a native function call (Wait_For_Conversation).

  Returns:
    boolean true if no error had occurred, false otherwise

### cmecsu

    public boolean cmecsu()

  It is a native function call (Extract_Conversation_Security_User_ID).

  Returns:
    boolean true if no error had occurred, false otherwise

### cmscsu

    public boolean cmscsu()

  It is a native function call (Set_Conversation_Security_User_ID).

  Returns:
    boolean true if no error had occurred, false otherwise

### cmscsp

    public boolean cmscsp()

  It is a native function call (Set_Conversation_Security_Password).

  Returns:
    boolean true if no error had occurred, false otherwise

### cmscst

    public boolean cmscst()

  It is a native function call (Set_Conversation_Security_Type).

  Returns:
    boolean true if no error had occurred, false otherwise

### setConversationID

    public void setConversationID(byte[] conversationId)

  Sets SNA Conversation ID which gets set by the JNI code when a conversation is established.

  Parameters:
    `conversationId` - The ConversationID to be set

### getConversationID

    public byte[] getConversationID()

  Gets SNA Conversation ID which gets set by the JNI code when a conversation is established.

  Returns:
    ConversationID as a byte array

### setDataIn

    public void setDataIn(byte[] data)

  Sets data which gets set by the JNI code when data is received from the partner in the SNA conversation.

  Parameters:
    `data` - The DataIn to be set

### getDataIn

    public byte[] getDataIn()

  Gets data which gets set by the JNI code when data is received from the partner in the SNA conversation.

  Returns:
    DataIn as a byte array

### setDataOut

    public void setDataOut(byte[] data)

  Sets data which is passed to the JNI code for sending data to the partner in the SNA conversation.

  Parameters:
    `data` - The DataOut to be set

### getDataOut

    public byte[] getDataOut()

  Gets data which is passed to the JNI code for sending data to the partner in the SNA conversation.

  Returns:
    DataOut as a byte array

### setReturnCode

    public void setReturnCode(int returnCode)

  Sets return code which gets set by the JNI code and is the return code returned by the last major CPIC function call.

  Parameters:
    `returnCode` - The ReturnCode to be set

### getReturnCode

    public int getReturnCode()

  Gets return code which gets set by the JNI code and is the return code returned by the last major CPIC function call.

  Returns:
    ReturnCode as an int

### setPacketSize

    public void setPacketSize(int packetSize)

  Sets the size of the data packets used by the JNI code when receiving data from the partner in the SNA conversation.

  Parameters:
    `packetSize` - The PacketSize to be set

### getPacketSize

    public int getPacketSize()

  Gets the size of the data packets used by the JNI code when receiving data from the partner in the SNA conversation.

  Returns:
    PacketSize as an int

### setTimeout

    public void setTimeout(int timeout)

  Sets timeout in milliseconds used by the JNI code when waiting to accept a conversation or when receiving data through eWay's helper function.

  Parameters:
    `timeout` - The Timeout to be set

### getTimeout

    public int getTimeout()

  Gets timeout in milliseconds used by the JNI code when waiting to accept a conversation or when receiving data through eWay's helper function recv().

  Returns:
    Timeout as an int

### setIsInbound

    public void setIsInbound(boolean isInbound)

  Deprecated.

  Sets IsInbound.

  Parameters:
    `isInbound` - The IsInbound to be set

### getIsInbound

    public boolean getIsInbound()

  Deprecated.

  Gets IsInbound.

  Returns:
    IsInbound as boolean

### setHaveConversation

    public void setHaveConversation(boolean haveConversation)

  Sets if a conversation is established with the SNA partner, this flag will be set to true otherwise it is set to false by the JNI code. Subsequently, it will be used by the JNI code to ensure that the conversation is established prior to invoking any CPIC calls.

  Parameters:
    `haveConversation` - The HaveConversation to be set

### getHaveConversation

    public boolean getHaveConversation()

  Gets if a conversation is established with the SNA partner, this flag will be set to true otherwise it is set to false by the JNI code. Subsequently, it will be used by the JNI code to ensure that the conversation is established prior to invoking any CPIC calls.

  Returns:
    HaveConversation as boolean

### setSymDestName

    public void setSymDestName(java.lang.String symDestName)

  Sets the Symbolic Destination Name of the SNA partner to which the initiating SNA partner will establish an SNA conversation.

  Parameters:
    `symDestName` - The SymDestName to be set

### getSymDestName

    public java.lang.String getSymDestName()

  Gets the Symbolic Destination Name of the SNA partner to which the initiating SNA partner will establish an SNA conversation.

  Returns:
    SymDestName as a String

### setLocalTPName

    public void setLocalTPName(java.lang.String localTPName)

  Sets the Local TP (Transaction Program) Name

  Parameters:
    `localTPName` - The LocalTPName to be set

### getLocalTPName

    public java.lang.String getLocalTPName()

  Gets the Local TP (Transaction Program) Name

  Returns:
    LocalTPName as a String

### setLocalLUName

    public void setLocalLUName(java.lang.String localLUName)

  Sets the Local Logical Unit Name of the SNA partner which is accepting conversations from the initiating SNA partner.

  Parameters:
    `localLUName` - The LocalLUName to be set

### getLocalLUName

    public java.lang.String getLocalLUName()

  Gets the Local Logical Unit Name of the SNA partner which is accepting conversations from the initiating SNA partner.

  Returns:
    LocalLUName as a String

### setHostName

    public void setHostName(java.lang.String hostName)

### getHostName

    public java.lang.String getHostName()

### setLastError

    public void setLastError(int lastError)

  Deprecated.

  Sets the SNA return code set by the JNI code as a result of an error occurring from the last CPIC function call. This only gets set when an error had occurred.

  Parameters:
    `lastError` - The LastError to be set

### getLastError

    public int getLastError()

  Deprecated.

  Gets the SNA return code set by the JNI code as a result of an error occurring from the last CPIC function call. This only gets set when an error had occurred.

  Returns:
    LastError as an int

### setLastStatus

    public void setLastStatus(int lastStatus)

  Sets the SNA status code set by the JNI code as a result of the last CPIC function call which generated an SNA status code. Check the documentation for the last CPIC function that got called to determine whether a status code is returned

  Parameters:
    `lastStatus` - The LastStatus to be set

### getLastStatus

    public int getLastStatus()

  Gets the SNA status code set by the JNI code as a result of the last CPIC function call which generated an SNA status code. Check the documentation for the last CPIC function that got called to determine whether a status code is returned

  Returns:
    LastStatus as an int

### setLastState

    public void setLastState(int lastState)

  Sets the SNA state set by the JNI code. This is the state of the conversation in which the SNA partner is in.

  Parameters:
    `lastState` - The LastState to be set

### getLastState

    public int getLastState()

  Gets the SNA state set by the JNI code. This is the state of the conversation in which the SNA partner is in.

  Returns:
    LastState as an int

### getModeName

    public java.lang.String getModeName()

  Get the SNA mode name which is used for setting the SNA mode name by the JNI code or for retrieving the mode name by the JNI code when the mode name is retrieved.

  Returns:
    ModeName as a String

### setModeName

    public void setModeName(java.lang.String modeName)

  Sets the SNA mode name which is used for setting the SNA mode name by the JNI code or for retrieving the mode name by the JNI code when the mode name is retrieved.

  Parameters:
    `modeName` - The ModeName to be set

### getLogData

    public byte[] getLogData()

  Gets the SNA log data which is used by the JNI code for sending the log data.

  Returns:
    LogData as a byte array

### setLogData

    public void setLogData(byte[] logData)

  Sets the SNA log data which is used by the JNI code for sending the log data.

  Parameters:
    `logData` - The LogData to be set

### getSendType

    public int getSendType()

  Gets the SNA send type which is used for setting the SNA send type by the JNI code.

  Returns:
    SendType as an int

### setSendType

    public void setSendType(int sendType)

  Sets the SNA send type which is used for setting the SNA send type by the JNI code.

  Parameters:
    `sendType` - The SendType to be set

### getReceiveType

    public int getReceiveType()

  Gets the SNA receive type which is used for setting the SNA receive type by the JNI code.

  Returns:
    ReceiveType as an int

### setReceiveType

    public void setReceiveType(int receiveType)

  Sets the SNA receive type which is used for setting the SNA receive type by the JNI code.

  Parameters:
    `receiveType` - The ReceiveType to be set

### getReturnControl

    public int getReturnControl()

  Gets the SNA return control which is used for setting the SNA return control by the JNI code.

  Returns:
    ReturnControl as an int

### setReturnControl

    public void setReturnControl(int returnControl)

  Sets the SNA return control which is used for setting the SNA return control by the JNI code.

  Parameters:
    `returnControl` - The ReturnControl to be set

### getPrepareToReceiveType

    public int getPrepareToReceiveType()

  Gets the SNA prepare to receive type which is used for setting the SNA prepare to receive type by the JNI code.

  Returns:
    PrepareToReceiveType as an int

### setPrepareToReceiveType

    public void setPrepareToReceiveType(int prepareToReceiveType)

  Sets the SNA prepare to receive type which is used for setting the SNA prepare to receive type by the JNI code.

  Parameters:
    `prepareToReceiveType` - The PrepareToReceiveType to be set

### getProcessingMode

    public int getProcessingMode()

  Gets the SNA processing mode which is used for setting the SNA processing mode by the JNI code.

  Returns:
    ProcessingMode as an int

### setProcessingMode

    public void setProcessingMode(int processingMode)

  Sets the SNA processing mode which is used for setting the SNA processing mode by the JNI code.

  Parameters:
    `processingMode` - ProcessingMode as an int

### getFillType

    public int getFillType()

  Gets the SNA fill type which is used for setting the SNA fill type by the JNI code.

  Returns:
    FillType as an int

### setFillType

    public void setFillType(int fillType)

  Sets the SNA fill type which is used for setting the SNA fill type by the JNI code.

  Parameters:
    `fillType` - The FillType to be set

### getSyncLevel

    public int getSyncLevel()

  Gets the SNA synch level which is used for setting the SNA synch level by the JNI code or for retrieving the mode name by the JNI code when the synch level is retrieved.

  Returns:
    SyncLevel as an int

### setSyncLevel

    public void setSyncLevel(int syncLevel)

  Sets the SNA synch level which is used for setting the SNA synch level by the JNI code or for retrieving the mode name by the JNI code when the synch level is retrieved.

  Parameters:
    `syncLevel` - The SyncLevel to be set

### getErrorDirection

    public int getErrorDirection()

  Gets the SNA error direction used by the JNI code for setting the SNA error direction.

  Returns:
    ErrorDirection as an int

### setErrorDirection

    public void setErrorDirection(int errorDirection)

  Sets the SNA error direction used by the JNI code for setting the SNA error direction.

  Parameters:
    `errorDirection` - The ErrorDirection to be set

### getConvType

    public int getConvType()

  Gets the SNA conversation type which is used for setting the SNA conversation type by the JNI code or for retrieving the conversation type by the JNI code when the conversation type is retrieved.

  Returns:
    ConvType as an int

### setConvType

    public void setConvType(int convType)

  Sets the SNA conversation type which is used for setting the SNA conversation type by the JNI code or for retrieving the conversation type by the JNI code when the conversation type is retrieved.

  Parameters:
    `convType` - The ConvType to be set

### getPartnerLUName

    public java.lang.String getPartnerLUName()

  Gets the partner LU (Logical Unit) name.

  Returns:
    PartnerLUName as a String

### setPartnerLUName

    public void setPartnerLUName(java.lang.String partnerLUName)

  Sets the partner LU (Logical Unit) name.

  Parameters:
    `partnerLUName` - The PartnerLUName to be set

### getConvReturnCode

    public int getConvReturnCode()

  Gets the SNA conversation return code set by the JNI code as a result of the last CPIC function call (cmwait) which generated a conversation return code. Check the CPIC documentation for the last CPIC function that got called to determine whether a conversation return code is returned.

  Returns:
    ConvReturnCode as an int

### setConvReturnCode

    public void setConvReturnCode(int convReturnCode)

  Sets the SNA conversation return code set by the JNI code as a result of the last CPIC function call (cmwait) which generated a conversation return code. Check the CPIC documentation for the last CPIC function that got called to determine whether a conversation return code is returned.

  Parameters:
    `convReturnCode` - The ConvReturnCode to be set

### getDeallocTypeJ

    public int getDeallocTypeJ()

  Gets the SNA dealloc type which is used for setting the SNA dealloc type by the JNI code.

  Returns:
    DeallocTypeJ as an int

### setDeallocTypeJ

    public void setDeallocTypeJ(int deallocType)

  Sets the SNA dealloc type which is used for setting the SNA dealloc type by the JNI code.

  Parameters:
    `deallocType` - The DeallocTypeJ to be set

### getReq2SendReceived

    public int getReq2SendReceived()

  Gets the SNA request to send received code set by the JNI code as a result of the last CPIC function call which generated a request to send received code. Check the CPIC documentation for the last CPIC function that got called to determine whether a request to send received code is returned.

  Returns:
    Req2SendReceived as an int

### setReq2SendReceived

    public void setReq2SendReceived(int req2SendReceivedType)

  Sets the SNA request to send received code set by the JNI code as a result of the last CPIC function call which generated a request to send received code. Check the CPIC documentation for the last CPIC function that got called to determine whether a request to send received code is returned.

  Parameters:
    `req2SendReceivedType` - The Req2SendReceived to be set

### getDataReceivedType

    public int getDataReceivedType()

  Gets the SNA data receive type set by the JNI code as a result of the last CPIC function call which generated a data receive type. Check the CPIC documentation for the last CPIC function that got called to determine whether a data received type is returned.

  Returns:
    DataReceivedType as an int

### setDataReceivedType

    public void setDataReceivedType(int dataReceivedType)

  Sets the SNA data receive type set by the JNI code as a result of the last CPIC function call which generated a data receive type. Check the CPIC documentation for the last CPIC function that got called to determine whether a data received type is returned.

  Parameters:
    `dataReceivedType` - The DataReceivedType to be set

### getStatusReceived

    public int getStatusReceived()

  Gets the SNA status received set by the JNI code as a result of the last CPIC function call which generated a status received. Check the CPIC documentation for the last CPIC function that got called to determine whether a status received is returned.

  Returns:
    StatusReceived as an int

### setStatusReceived

    public void setStatusReceived(int statusReceived)

  Sets the SNA status received set by the JNI code as a result of the last CPIC function call which generated a status received. Check the CPIC documentation for the last CPIC function that got called to determine whether a status received is returned.

  Parameters:
    `statusReceived` - The StatusReceived to be set

### getSecurityUserID

    public java.lang.String getSecurityUserID()

  Gets the SNA conversation security ID which is used for setting the SNA conversation security ID by the JNI code or for retrieving the security ID by the JNI code when the conversation security ID is retrieved.

  Returns:
    SecurityUserID as a String

### getSecurityType

    public int getSecurityType()

  Gets the SNA conversation security type which is used for setting the SNA conversation security type by the JNI code or for retrieving the security type by the JNI code when the conversation security type is retrieved.

  Returns:
    SecurityType as a String

### setSecurityUserID

    public void setSecurityUserID(java.lang.String securityUserID)

  Sets the SNA conversation security ID which is used for setting the SNA conversation security ID by the JNI code or for retrieving the security ID by the JNI code when the conversation security ID is retrieved.

  Parameters:
    `securityUserID` - The SecurityUserID to be set

### setSecurityPassword

    public void setSecurityPassword(java.lang.String securityPassword)

  Sets the SNA conversation security password which is used for setting the conversation security password by the JNI code.

  Parameters:
    `securityPassword` - The SecurityPassword to be set

### setSecurityType

    public void setSecurityType(int securityType)

  Sets the SNA conversation security type which is used for setting the SNA conversation security type by the JNI code or for retrieving the security type by the JNI code when the conversation security type is retrieved.

  Parameters:
    `securityType` - The SecurityType to be set

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.