|
Sun Adapter for SAG API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.stc.connector.sagadapter.jni.sag.Handle
public class Handle
Wrapper class for the SAG C++ Handle class. It is derived from sagapp.hpp. When an application sends a request message, it plays the role of a client. When it receives a request message, it plays the role of a server. An application can play both roles. A client application uses one or more (client) handles. A server application uses one or more (server) handles. An application that is client and server can use the same handles for both traffics. If a client application sends a request message through one handle, it will receive the corresponding response message through the same handle. If a server application receives a request message through one handle, it must send back the response message through the same handle. It not, the message is rejected.
| Method Summary | |
|---|---|
void |
call(Message request,
Message response)
This method will send the input request Message object and return the resulting response message stored in the input response Message object. |
void |
connect()
This function establishes the connection. |
void |
connect(java.lang.String args)
This function establishes the connection. |
void |
disconnect()
This function disconnects the connection but keeps the handle object. |
void |
free()
Method free. |
long |
getAnyResponse(long timeout,
Message response)
This method will attempt to retrieve the first available response Message object from SAG. |
long |
getAnyResponse(Message response)
This method will attempt to retrieve the first available response Message object from SAG. |
long |
getRequest(long timeout,
Message request)
Method getRequest. |
long |
getRequest(Message request)
This method will return the request message and token if successful. |
void |
getResponse(long timeout,
long token,
Message response)
This method will attempt to retrieve the response Message object associated with the input reconciliation token. |
void |
getResponse(long token,
Message response)
This method will attempt to retrieve the response Message object assicated with the input reconciliation token. |
void |
putError(long token,
long errorCode,
java.lang.String errorData)
This method uses the reconciliation token return by "getRequest" and sends the corresponding error signal. |
long |
putRequest(Message message)
This method will send a request message to SAG. |
void |
putResponse(long token,
Message response)
This method uses the reconciliation token return by "getRequest" and sends the corresponding response message. |
void |
subscribe(java.lang.String address)
|
void |
subscribe(java.lang.String address,
java.lang.String arguments)
|
void |
unsubscribe(java.lang.String address)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public void free()
public void connect()
throws ExcStatus
ExcStatus - on error
public void connect(java.lang.String args)
throws ExcStatus
args - Argument passing for future use. Must be an empty string with SAG 6.0.0.
ExcStatus - on error
public void disconnect()
throws ExcStatus
ExcStatus - on error
public long putRequest(Message message)
throws ExcStatus
message - The request message to be sent
ExcStatus - on error
public long getAnyResponse(Message response)
throws ExcStatus
response - Response message that is received
ExcStatus - on error
public long getAnyResponse(long timeout,
Message response)
throws ExcStatus
timeout - The maximum time to wait for a responseresponse - The resulting response object. The user must create and pass in their own
Message object to call this method.
ExcStatus - on error
public void getResponse(long token,
Message response)
throws ExcStatus
token - The token returned from a previous call to putRequestresponse - The resulting response object. The user must create and pass in their own
Message object to call this method.
ExcStatus - on error
public void getResponse(long timeout,
long token,
Message response)
throws ExcStatus
timeout - The maximum time to wait for a responsetoken - The token value returned from a previous call to putRequestresponse - The resulting response object. The user must create and pass in their own
Message object to call this method.
ExcStatus - on error
public void call(Message request,
Message response)
throws ExcStatus
request - Request messageresponse - The resulting response value of executing the request. User must create and
pass in there own Message object
ExcStatus - on error
public void subscribe(java.lang.String address)
throws ExcStatus
ExcStatus
public void subscribe(java.lang.String address,
java.lang.String arguments)
throws ExcStatus
ExcStatus
public void unsubscribe(java.lang.String address)
throws ExcStatus
ExcStatus
public long getRequest(Message request)
throws ExcStatus
request - Request message that is received
ExcStatus
public long getRequest(long timeout,
Message request)
throws ExcStatus
timeout - longrequest - Message
ExcStatus - on error
public void putResponse(long token,
Message response)
throws ExcStatus
token - Reconciliation token returned by "getRequest"response - Response message to send back
ExcStatus - on error
public void putError(long token,
long errorCode,
java.lang.String errorData)
throws ExcStatus
token - Reconciliation token returned by "getRequest"errorCode - Error code (0: Local authentication; 1: No server business response)errorData - Error data that can be given back.
ExcStatus - on error
|
Sun Adapter for SAG API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||