Server Reference Guide : Java Interface : Java Classes : com.ca.openroad.ASOSession
 
Share this page          
com.ca.openroad.ASOSession
The Java ASOSession class wraps a corresponding instance of the OpenROAD.ASOSession COM class. You should be familiar already with the underlying COM ASOSession methods (see COM (Non-OpenROAD) Client Remote Server Object).
This class has the following characteristics:
All methods are synchronized and final.
All methods throw COMException, except for the release method.
The default constructor takes no arguments and creates an underlying COM ASOSession instance that is not connected.
Clients must explicitly call "release" on every OpenROAD Java object instance they create. Otherwise, the underlying COM resources may not get freed. This is why the example code shows the release calls in the "finally" block, to ensure that they will be executed even in case an exception is thrown.
The following table describes COM ASOSession wrapper methods:
Wrappers
Description
void release(); // does not throw
Releases the underlying COM ASOSession instance. After the release method is called, the Java object instance becomes essentially useless and should be discarded.
void connect(String akaName, String location, String routing);
Wraps the COM ASOSession Connect method. Both location and routing are optional and can be passed as null references or empty strings.
void attachRSO(RemoteServer rso);
Wraps the COM ASOSession AttachRSO method. The RSO parameter must be a Java RemoteServer instance that is already connected.
void defineBPM(String userclassname);
Wraps the COM ASOSession DefineBPM method. Both location and routing are optional and can be passed as null references or empty strings.
void callProc(String procName, ParameterData byValPDO, ParameterData byRefPDO);
Wraps the COM ASOSession CallProc method. Both byValPDO and byRefPDO are optional and can be passed as null references.
String jsonRpcRequest(String request)
Wraps the COM ASO JsonRpcRequest method.
void disconnect();
Wraps the COM ASOSession Disconnect method
int getClientType();
void setClientType(int clientType);
The get and set methods wrap the COM ASOSession i_client_type property.
int getClientUserId();
void setClientUserId(int userId);
The get and set methods wrap the COM ASOSession i_user_id property.
String getClientUserName();
void setClientUserName(String userName);
The get and set methods wrap the COM ASOSession v_user_name property.
String getClientIpAddress();
void setClientIpAddress(String ipAddress);
The get and set methods wrap the COM ASOSession v_ip_address property.
int getOscaErrorNo();
int getOscaErrorType();
String getOscaMsgTxt();
The get method wraps the COM ASOSession readonly OSCA properties i_error_no, i_error_type, and v_msg_txt.
boolean isConnected();
This method wraps the COM ASOSession readonly IsConnected property and converts the integer to boolean.
RemoteServer getRSO();
This method wraps the COM ASOSession readonly RSO property and returns the underlying COM RSO result wrapped in a new Java RemoteServer instance. You must call "release" on the returned RemoteServer instance when you are finished with it.