Sun Adapter for SNA LU62 API

com.stc.connector.snalu62.api
Class SNACPICCalls

java.lang.Object
  extended by com.stc.connector.snalu62.api.SNACPICCalls

public class SNACPICCalls
extends java.lang.Object

This class exposes a set of wrapper methods for each CPIC call. This enables the eWay collaboration to call the CPIC function conveniently.

For the input/output parameters of each CPIC function, please refer to your SNA CPIC manual for details.

Note: the wrappers use the same name as their corresponding CPIC calls. However, they do not have parameters in their signatures, the parameters used by the CPIC calls are stored in an instance of type SNAConversationAttributes, which is the context of the input/output parameters for the CPIC calls. You should specify the input parameters or get the output parameters through this context.

Example 1: for CPIC function Set_Send_Type, the steps might be like:

(1). Specify SendType value through node [OTD].[CPICCalls].[ConversationAttributes].[SendType].

(2). Call function [OTD].[CPICCalls].[cmsst].

(3). Check return code through node [OTD].[CPICCalls].[ConversationAttributes].[ReturnCode] or node [OTD].[LastReturnCode].

Example 2: for CPIC function Extract_Sync_Level, the steps might be like:

(1). Call function [OTD].[CPICCalls].[cmssl].

(2). Check return code through node [OTD].[CPICCalls].[ConversationAttributes].[ReturnCode] or node [OTD].[LastReturnCode].

(3). Get SyncLevel value through node [OTD].[CPICCalls].[ConversationAttributes].[SyncLevel].

Version:
cvs revision: $Revision: 1.5 $ Last Modified: $Date: 2007/12/12 00:11:32 $
Author:
Harry Liu (harryliu@seebeyond.com)
See Also:
SNAInterface

Field Summary
static java.lang.String version
           
 
Constructor Summary
SNACPICCalls(SNAApi snaApi)
          Constructor of SNACPICCalls.
 
Method Summary
 void cmaccp()
          The Accept_Conversation (cmaccp) call accepts an incoming conversation.
 void cmallc()
          A program uses the Allocate (cmallc) call to establish a basic or mapped conversation (depending on the conversation_type characteristic) with its partner program.
 void cmcanc()
          A program uses Cancel_Conversation (cmcanc) to end a conversation immediately.
 void cmcfm()
          The Confirm (cmcfm) call is used by a local program to send a confirmation request to the remote program and then wait for a reply.
 void cmcfmd()
          A program uses the Confirmed (cmcfmd) call to send a confirmation reply to the remote program.
 void cmdeal()
          A program uses the Deallocate (cmdeal) call to end a conversation.
 void cmecs()
          A program uses the Extract_Conversation_State (cmecs) call to extract the conversation state for a given conversation.
 void cmecsu()
          The Extract_Conversation_Security_User_ID (cmecsu) call returns the user identifier being used in a specified conversation.
 void cmect()
          A program uses the Extract_Conversation_Type (cmect) call to extract the conversation_type characteristic's value for a given conversation.
 void cmemn()
          A program uses the Extract_Mode_Name (cmemn) call to extract the mode_name characteristic's value for a given conversation.
 void cmepln()
          A program uses the Extract_Partner_LU_Name (cmepln) call to extract the partner_LU_name characteristic's value for a given conversation.
 void cmesl()
          A program uses the Extract_Sync_Level (cmesl) call to extract the sync_level characteristic's value for a given conversation.
 void cmetpn()
          A program uses the Extract_TP_Name (cmetpn) call to extract the TP_name characteristic's value for a given conversation.
 void cmflus()
          A program uses the Flush (cmflus) call to empty the local system's send buffer for a given conversation.
 void cminit()
          A program uses the Initialize_Conversation (cminit) call to initialize values for various conversation characteristics before the conversation is allocated (with a call to Allocate).
 void cmptr()
          Programs use the Prepare_To_Receive (cmptr) call to transfer control of the conversation to the remote program without waiting for the remote program to send data; that is, waiting for a Receive to complete.
 void cmrcv()
          A program uses the Receive (cmrcv) call to receive information from a given conversation.
 void cmrts()
          The local program uses the Request_To_Send (cmrts) call to notify the remote program that the local program would like to enter Send state for a given conversation.
 void cmscsp()
          Set_Conversation_Security_Password (cmscsp) is used by a program to set the security_password and security_password_length characteristics for a conversation.
 void cmscst()
          Set_Conversation_Security_Type (cmscst) is used by a program to set the conversation_security_type characteristic for a conversation.
 void cmscsu()
          Set_Conversation_Security_User_ID (cmscsu) is used by a program to set the security_user_ID and security_user_ID_length characteristics for a conversation.
 void cmsct()
          Set_Conversation_Type (cmsct) is used by a program to set the conversation_type characteristic for a given conversation.
 void cmsdt()
          Set_Deallocate_Type (cmsdt) is used by a program to set the deallocate_type characteristic for a given conversation.
 void cmsed()
          Set_Error_Direction (cmsed) is used by a program to set the error_direction characteristic for a given conversation.
 void cmsend()
          A program uses the Send_Data (cmsend) call to send data to the remote program.
 void cmserr()
          Send_Error (cmserr) is used by a program to inform the remote program that the local program detected an error during a conversation.
 void cmsf()
          Set_Fill (cmsf) is used by a program to set the fill characteristic for a given conversation.
 void cmsld()
          Set_Log_Data (cmsld) is used by a program to set the log_data and log_data_length characteristics for a given conversation.
 void cmsltp()
          A program uses the Specify_Local_TP_Name (cmsltp) call to associate a name with itself, thus notifying CPI Communications that it can accept conversations destined for the name.
 void cmsmn()
          Set_Mode_Name (cmsmn) is used by a program to set the mode_name and mode_name_length characteristics for a conversation.
 void cmspln()
          Set_Partner_LU_Name (cmspln) is used by a program to set the partner_LU_name and partner_LU_name_length characteristics for a conversation.
 void cmspm()
          A program uses the Set_Processing_Mode (cmspm) call to set the processing_mode characteristic of a conversation.
 void cmsptr()
          Set_Prepare_To_Receive_Type (cmsptr) is used by a program to set the prepare_to_receive_type characteristic for a conversation.
 void cmsrc()
          Set_Return_Control (cmsrc) is used to set the return_control characteristic for a given conversation.
 void cmsrt()
          Set_Receive_Type (cmsrt) is used by a program to set the receive_type characteristic for a conversation.
 void cmssl()
          Set_Sync_Level (cmssl) is used by a program to set the sync_level characteristic for a given conversation.
 void cmsst()
          Set_Send_Type (cmsst) is used by a program to set the send_type characteristic for a conversation.
 void cmstpn()
          Set_TP_Name (cmstpn) is used by a program that initiates a conversation, using the Initialize_Conversation call, to set the TP_name and TP_name_length characteristics for a given conversation.
 void cmtrts()
          Test_Request_To_Send_Received (cmtrts) is used by a program to determine whether a request-to-send or allocate-confirmed notification has been received from the remote program for the specified conversation.
 void cmwait()
          A program must use the Wait_For_Conversation (cmwait) call to wait for the completion of an outstanding operation on a conversation using conversation-level non-blocking.
 SNAConversationAttributes getConversationAttributes()
          Gets conversation attributes object.
 
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

SNACPICCalls

public SNACPICCalls(SNAApi snaApi)
Constructor of SNACPICCalls.

Parameters:
snaApi - SNAApi object
Method Detail

getConversationAttributes

public SNAConversationAttributes getConversationAttributes()
Gets conversation attributes object.

Returns:
SNAConversationAttributes object

cmaccp

public final void cmaccp()
                  throws SNAApplicationException
The Accept_Conversation (cmaccp) call accepts an incoming conversation. Like Initialize_Conversation, this call initializes values for various conversation characteristics. The difference between the two calls is that the program that will later allocate the conversation issues the Initialize_Conversation call, and the partner program that will accept the conversation after it is allocated issues the Accept_Conversation call.

Throws:
SNAApplicationException - up on an JNI error
See Also:
SNAInterface.cmaccp()

cmallc

public final void cmallc()
                  throws SNAApplicationException
A program uses the Allocate (cmallc) call to establish a basic or mapped conversation (depending on the conversation_type characteristic) with its partner program. The partner program is specified in the TP_name characteristic.

Throws:
SNAApplicationException - up on an JNI error
See Also:
SNAInterface.cmallc()

cmcanc

public final void cmcanc()
                  throws SNAApplicationException
A program uses Cancel_Conversation (cmcanc) to end a conversation immediately. Cancel_Conversation can be issued at any time, regardless of whether a previous operation is still in progress on the conversation.

Throws:
SNAApplicationException - up on an JNI error
See Also:
SNAInterface.cmcanc()

cmcfm

public final void cmcfm()
                 throws SNAApplicationException
The Confirm (cmcfm) call is used by a local program to send a confirmation request to the remote program and then wait for a reply. The remote program replies with a Confirmed (CMCFMD) call. The local and remote programs use the Confirm and Confirmed calls to synchronize their processing of data.

Throws:
SNAApplicationException - up on an JNI error
See Also:
SNAInterface.cmcfm()

cmcfmd

public final void cmcfmd()
                  throws SNAApplicationException
A program uses the Confirmed (cmcfmd) call to send a confirmation reply to the remote program. The local and remote programs can use the Confirmed and Confirm calls to synchronize their processing.

Throws:
SNAApplicationException - up on an JNI error
See Also:
SNAInterface.cmcfmd()

cmdeal

public final void cmdeal()
                  throws SNAApplicationException
A program uses the Deallocate (cmdeal) call to end a conversation. The conversation_ID is no longer assigned when the conversation is deallocated as part of this call.

Throws:
SNAApplicationException - up on an JNI error
See Also:
SNAInterface.cmdeal()

cmecs

public final void cmecs()
                 throws SNAApplicationException
A program uses the Extract_Conversation_State (cmecs) call to extract the conversation state for a given conversation. The value is returned in the conversation_state parameter.

Throws:
SNAApplicationException - up on an JNI error
See Also:
SNAInterface.cmecs()

cmect

public final void cmect()
                 throws SNAApplicationException
A program uses the Extract_Conversation_Type (cmect) call to extract the conversation_type characteristic's value for a given conversation. The value is returned in the conversation_type parameter.

Throws:
SNAApplicationException - up on an JNI error
See Also:
SNAInterface.cmect()

cmemn

public final void cmemn()
                 throws SNAApplicationException
A program uses the Extract_Mode_Name (cmemn) call to extract the mode_name characteristic's value for a given conversation. The value is returned to the program in the mode_name parameter.

Throws:
SNAApplicationException - up on an JNI error
See Also:
SNAInterface.cmemn()

cmepln

public final void cmepln()
                  throws SNAApplicationException
A program uses the Extract_Partner_LU_Name (cmepln) call to extract the partner_LU_name characteristic's value for a given conversation. The value is returned in the partner_LU_name parameter.

Throws:
SNAApplicationException - up on an JNI error
See Also:
SNAInterface.cmepln()

cmesl

public final void cmesl()
                 throws SNAApplicationException
A program uses the Extract_Sync_Level (cmesl) call to extract the sync_level characteristic's value for a given conversation. The value is returned to the program in the sync_level parameter.

Throws:
SNAApplicationException - up on an JNI error
See Also:
SNAInterface.cmesl()

cmetpn

public final void cmetpn()
                  throws SNAApplicationException
A program uses the Extract_TP_Name (cmetpn) call to extract the TP_name characteristic's value for a given conversation. The value is returned to the program in the TP_name parameter.

Throws:
SNAApplicationException - up on an JNI error
See Also:
SNAInterface.cmetpn()

cmflus

public final void cmflus()
                  throws SNAApplicationException
A program uses the Flush (cmflus) call to empty the local system's send buffer for a given conversation. When notified by CPI Communications that a Flush has been issued, the system sends any information it has buffered to the remote system. The information that can be buffered comes from the Allocate, Send_Data, or Send_Error call. Refer to the descriptions of these calls for more details of when and how buffering occurs.

Throws:
SNAApplicationException - up on an JNI error
See Also:
SNAInterface.cmflus()

cminit

public final void cminit()
                  throws SNAApplicationException
A program uses the Initialize_Conversation (cminit) call to initialize values for various conversation characteristics before the conversation is allocated (with a call to Allocate). The remote partner program uses the Accept_Conversation call or the Initalize_Incoming and Accept_Incoming calls to initialize values for the conversation characteristics on its end of the conversation.

Throws:
SNAApplicationException - up on an JNI error
See Also:
SNAInterface.cminit()

cmptr

public final void cmptr()
                 throws SNAApplicationException
Programs use the Prepare_To_Receive (cmptr) call to transfer control of the conversation to the remote program without waiting for the remote program to send data; that is, waiting for a Receive to complete. This allows the local program to continue processing until it actually needs data from the remote program.

Throws:
SNAApplicationException - up on an JNI error
See Also:
SNAInterface.cmptr()

cmrcv

public final void cmrcv()
                 throws SNAApplicationException
A program uses the Receive (cmrcv) call to receive information from a given conversation. The information received can be a data record (on a mapped conversation), data (on a basic conversation), conversation status, or a request for confirmation or for resource recovery services.

Throws:
SNAApplicationException - up on an JNI error
See Also:
SNAInterface.cmrcv()

cmrts

public final void cmrts()
                 throws SNAApplicationException
The local program uses the Request_To_Send (cmrts) call to notify the remote program that the local program would like to enter Send state for a given conversation.

Throws:
SNAApplicationException - up on an JNI error
See Also:
SNAInterface.cmrts()

cmsend

public final void cmsend()
                  throws SNAApplicationException
A program uses the Send_Data (cmsend) call to send data to the remote program. When issued during a mapped conversation, this call sends one data record to the remote program. The data record consists entirely of data and is not examined by the system for possible logical records.

Throws:
SNAApplicationException - up on an JNI error
See Also:
SNAInterface.cmsend()

cmserr

public final void cmserr()
                  throws SNAApplicationException
Send_Error (cmserr) is used by a program to inform the remote program that the local program detected an error during a conversation. If the conversation is in Send, Send-Receive, or Send-Only state, Send_Error forces the system to flush its send buffer.

Throws:
SNAApplicationException - up on an JNI error
See Also:
SNAInterface.cmserr()

cmsct

public final void cmsct()
                 throws SNAApplicationException
Set_Conversation_Type (cmsct) is used by a program to set the conversation_type characteristic for a given conversation. It overrides the value that was assigned when the Initialize_Conversation or Initialize_For_Incoming call was issued.

Throws:
SNAApplicationException - up on an JNI error
See Also:
SNAInterface.cmsct()

cmsdt

public final void cmsdt()
                 throws SNAApplicationException
Set_Deallocate_Type (cmsdt) is used by a program to set the deallocate_type characteristic for a given conversation. Set_Deallocate_Type overrides the value that was assigned when the Initialize_Conversation, Accept_Conversation, or Initialize_For_Incoming call was issued.

Throws:
SNAApplicationException - up on an JNI error
See Also:
SNAInterface.cmsdt()

cmsed

public final void cmsed()
                 throws SNAApplicationException
Set_Error_Direction (cmsed) is used by a program to set the error_direction characteristic for a given conversation. Set_Error_Direction overrides the value that was assigned when the Initialize_Conversation, the Accept_Conversation, or the Initialize_For_Incoming call was issued.

Throws:
SNAApplicationException - up on an JNI error
See Also:
SNAInterface.cmsed()

cmsf

public final void cmsf()
                throws SNAApplicationException
Set_Fill (cmsf) is used by a program to set the fill characteristic for a given conversation. Set_Fill overrides the value that was assigned when the Initialize_Conversation, Accept_Conversation, or Initialize_For_Incoming call was issued.

Throws:
SNAApplicationException - up on an JNI error
See Also:
SNAInterface.cmsf()

cmsld

public final void cmsld()
                 throws SNAApplicationException
Set_Log_Data (cmsld) is used by a program to set the log_data and log_data_length characteristics for a given conversation. Set_Log_Data overrides the values that were assigned when the Initialize_Conversation, Accept_Conversation, or Initialize_For_Incoming call was issued.

Throws:
SNAApplicationException - up on an JNI error
See Also:
SNAInterface.cmsld()

cmsltp

public final void cmsltp()
                  throws SNAApplicationException
A program uses the Specify_Local_TP_Name (cmsltp) call to associate a name with itself, thus notifying CPI Communications that it can accept conversations destined for the name. A program may have many local names simultaneously. It can extract the TP_name for a particular conversation using the Extract_TP_Name call.

Throws:
SNAApplicationException - up on an JNI error
See Also:
SNAInterface.cmsltp()

cmspm

public final void cmspm()
                 throws SNAApplicationException
A program uses the Set_Processing_Mode (cmspm) call to set the processing_mode characteristic of a conversation. The processing_mode characteristic indicates whether CPI Communications calls on the specified conversation are to be processed in blocking or conversation-level non-blocking mode. Set_Processing_Mode overrides the default value of CM_BLOCKING that was assigned when the Initialize_Conversation, Initialize_For_Incoming, or Accept_Conversation call was issued. The processing mode of a conversation cannot be changed prior to the completion of all previous call operations on that conversation.

Throws:
SNAApplicationException - up on an JNI error
See Also:
SNAInterface.cmspm()

cmsmn

public final void cmsmn()
                 throws SNAApplicationException
Set_Mode_Name (cmsmn) is used by a program to set the mode_name and mode_name_length characteristics for a conversation. Set_Mode_Name overrides the current values that were originally acquired from the side information using the sym_dest_name.

Throws:
SNAApplicationException - up on an JNI error
See Also:
SNAInterface.cmsmn()

cmspln

public final void cmspln()
                  throws SNAApplicationException
Set_Partner_LU_Name (cmspln) is used by a program to set the partner_LU_name and partner_LU_name_length characteristics for a conversation. Set_Partner_LU_Name overrides the current values that were originally acquired from the side information using the sym_dest_name.

Throws:
SNAApplicationException - up on an JNI error
See Also:
SNAInterface.cmspln()

cmsptr

public final void cmsptr()
                  throws SNAApplicationException
Set_Prepare_To_Receive_Type (cmsptr) is used by a program to set the prepare_to_receive_type characteristic for a conversation. This call overrides the value that was assigned when the Initialize_Conversation, Accept_Conversation, or Initialize_For_Incoming call was issued.

Throws:
SNAApplicationException - up on an JNI error
See Also:
SNAInterface.cmsptr()

cmsrt

public final void cmsrt()
                 throws SNAApplicationException
Set_Receive_Type (cmsrt) is used by a program to set the receive_type characteristic for a conversation. Set_Receive_Type overrides the value that was assigned when the Initialize_Conversation, Accept_Conversation, or Initialize_For_Incoming call was issued.

Throws:
SNAApplicationException - up on an JNI error
See Also:
SNAInterface.cmsrt()

cmsrc

public final void cmsrc()
                 throws SNAApplicationException
Set_Return_Control (cmsrc) is used to set the return_control characteristic for a given conversation. Set_Return_Control overrides the value that was assigned when the Initialize_Conversation call was issued.

Throws:
SNAApplicationException - up on an JNI error
See Also:
SNAInterface.cmsrc()

cmsst

public final void cmsst()
                 throws SNAApplicationException
Set_Send_Type (cmsst) is used by a program to set the send_type characteristic for a conversation. Set_Send_Type overrides the value that was assigned when the Initialize_Conversation, Accept_Conversation, or Initialize_For_Incoming call was issued.

Throws:
SNAApplicationException - up on an JNI error
See Also:
SNAInterface.cmsst()

cmssl

public final void cmssl()
                 throws SNAApplicationException
Set_Sync_Level (cmssl) is used by a program to set the sync_level characteristic for a given conversation. The sync_level characteristic is used to specify the level of synchronization processing between the two programs. It determines whether the programs support no synchronization, confirmation-level synchronization (using the Confirm and Confirmed CPI Communications calls), or sync-point-level synchronization (using the calls of a resource recovery interface). Set_Sync_Level overrides the value that was assigned when the Initialize_Conversation call was issued.

Throws:
SNAApplicationException - up on an JNI error
See Also:
SNAInterface.cmssl()

cmstpn

public final void cmstpn()
                  throws SNAApplicationException
Set_TP_Name (cmstpn) is used by a program that initiates a conversation, using the Initialize_Conversation call, to set the TP_name and TP_name_length characteristics for a given conversation. Set_TP_Name overrides the current values that were originally acquired from the side information using the sym_dest_name.

Throws:
SNAApplicationException - up on an JNI error
See Also:
SNAInterface.cmstpn()

cmtrts

public final void cmtrts()
                  throws SNAApplicationException
Test_Request_To_Send_Received (cmtrts) is used by a program to determine whether a request-to-send or allocate-confirmed notification has been received from the remote program for the specified conversation.

Throws:
SNAApplicationException - up on an JNI error
See Also:
SNAInterface.cmtrts()

cmwait

public final void cmwait()
                  throws SNAApplicationException
A program must use the Wait_For_Conversation (cmwait) call to wait for the completion of an outstanding operation on a conversation using conversation-level non-blocking. An outstanding operation is indicated when the CM_OPERATION_INCOMPLETE return_code value is returned on an Accept_Incoming, Allocate, Confirm, Confirmed, Deallocate, Flush, Prepare_To_Receive, Receive, Receive_Expedited_Data, Request_To_Send, Send_Data, Send_Error, or Send_Expedited_Data call. This can occur when the processing_mode conversation characteristic is set to CM_NON_BLOCKING and the requested operation cannot complete immediately.

Throws:
SNAApplicationException - up on an JNI error
See Also:
SNAInterface.cmwait()

cmecsu

public final void cmecsu()
                  throws SNAApplicationException
The Extract_Conversation_Security_User_ID (cmecsu) call returns the user identifier being used in a specified conversation.

Throws:
SNAApplicationException - up on an JNI error
See Also:
SNAInterface.cmecsu()

cmscsu

public final void cmscsu()
                  throws SNAApplicationException
Set_Conversation_Security_User_ID (cmscsu) is used by a program to set the security_user_ID and security_user_ID_length characteristics for a conversation. Set_Conversation_Security_User_ID overrides the current values, which were originally acquired from the side information using sym_dest_name.

Throws:
SNAApplicationException - up on an JNI error
See Also:
SNAInterface.cmscsu()

cmscsp

public final void cmscsp()
                  throws SNAApplicationException
Set_Conversation_Security_Password (cmscsp) is used by a program to set the security_password and security_password_length characteristics for a conversation. Set_Conversation_Security_Password overrides the current values, which were originally acquired from the side information using sym_dest_name.

Throws:
SNAApplicationException - up on an JNI error
See Also:
SNAInterface.cmscsp()

cmscst

public final void cmscst()
                  throws SNAApplicationException
Set_Conversation_Security_Type (cmscst) is used by a program to set the conversation_security_type characteristic for a conversation. Set_Conversation_Security_Type overrides the current value, which was originally acquired from the side information using sym_dest_name.

Throws:
SNAApplicationException - up on an JNI error
See Also:
SNAInterface.cmscst()

Sun Adapter for SNA LU62 API

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