Sun Adapter for SAG API

com.stc.connector.sagadapter.sagapi
Interface SAGApi.Services.InterActServer

Enclosing interface:
SAGApi.Services

public static interface SAGApi.Services.InterActServer

It is server component for InterAct. It can do InterAct scenarios like receive request, send response, etc. It constructs the responses by use of Configuration. It populates the requests to corresponding Primitives.

Version:
cvs revision: $Revision: 1.4 $ Last Modified: $Date: 2007/10/19 19:48:21 $
Author:
Harry Liu (harry.liu@sun.com)

Method Summary
 java.lang.String checkSnFStatus()
          Checks SnF status for the SnF session which is from the last acquire.
 java.lang.String checkSnFStatus(java.lang.String snfSession)
          Checks SnF status for the specified SnF session.
 SAGMessage getRequest()
          Gets the SAG message.
 java.lang.String getRequestPayload()
          Gets the request payload.
 java.lang.String getResponse()
          Returns the current Response message which will be sent out.
 SAGMessage.SAGEnvelope getResponseEnvelope()
          Returns SAG envelope of the current Response message which will be sent out.
 java.lang.String getResponseLetter()
          Returns letter of the current Response message which will be sent out.
 java.lang.String getResponsePayload()
          Gets the response payload.
 long getToken()
          Returns the token number for current transfer.
 boolean isHandleFileEventRequestReceived()
          Checks whether the request received on receiveRequest() is Sw:HandleFileEventRequest.
 boolean isHandleFileRequestReceived()
          Checks whether the request received on receiveRequest() is Sw:HandleFileRequest.
 boolean isHandleInitRequestReceived()
          Checks whether the request received on receiveRequest() is Sw:HandleInitRequest.
 boolean isHandleRequestReceived()
          Checks whether the request received on receiveRequest() is SwInt:HandleRequest.
 boolean isHandleSnFRequestReceived()
          Checks whether the request received on receiveRequest() is Sw:HandleSnFRequest.
 boolean isHandleTermRequestReceived()
          Checks whether the request received on receiveRequest() is Sw:HandleTermRequest.
 boolean isNoRequestReceived()
          Checks whether no request is received on receiveRequest() - timeout happens.
 void process(long token)
          Analyzes the received request and prepares the response accordingly for the message transfer associated with the specified token.
 void processHandleFileEventRequest(long token)
          Processes the request Sw:HandleFileEventRequest.
 void processHandleFileRequest(long token)
          Processes the request Sw:HandleFileRequest.
 void processHandleInitRequest(long token)
          Processes the request Sw:HandleInitRequest.
 void processHandleRequest(long token)
          Processes the request message SwInt:HandleRequest.
 void processHandleSnFRequest(long token)
          Processes the request Sw:HandleSnFRequest.
 void processHandleTermRequest(long token)
          Processes the request Sw:HandleTermRequest.
 long receiveRequest()
          Receives the request message.
 void sendError(long token, long errorCode, java.lang.String errorData)
          Sends error with the specified token, error code, error data.
 void sendError(long errorCode, java.lang.String errorData)
          Sends error with the specified error code, error data.
 void sendHandleFileEventResponse(long token)
          Sends the response message Sw:HandleFileEventResponse.
 void sendHandleFileResponse(long token)
          Sends the response message Sw:HandleFileResponse.
 void sendHandleInitResponse(long token)
          Sends the response message Sw:HandleInitResponse.
 void sendHandleResponse(long token)
          Sends the response message SwInt:HandleResponse.
 void sendHandleSnFResponse(long token)
          Sends the response message Sw:HandleSnFResponse.
 void sendHandleTermResponse(long token)
          Sends the response message Sw:HandleTermResponse.
 void sendResponse(long token)
          Sends out the current response message with the specified token number.
 void setResponsePayload(java.lang.String responsePayload)
          Sets the response payload.
 void snfAck()
          Acks the previously-handled message in current SnF session.
 void snfAck(java.lang.String acceptStatus)
          Acks the previously-handled message in current SnF session with specified acceptStatus.
 java.lang.String snfAcquire()
          Acquires SnF queue and opens a SnF session.
 void snfRelease()
          Releases SnF queue and closes the current SnF session which corresponds to the last acquire.
 void snfRelease(java.lang.String sessionId)
          Releases SnF queue and closes the specified SnF session.
 

Method Detail

process

void process(long token)
             throws SAGApplicationException
Analyzes the received request and prepares the response accordingly for the message transfer associated with the specified token.

Parameters:
token - Token number
Throws:
SAGApplicationException - upon error.

receiveRequest

long receiveRequest()
                    throws SAGApplicationException
Receives the request message.

Returns:
The token number.
Throws:
SAGApplicationException - upon error.

processHandleRequest

void processHandleRequest(long token)
                          throws SAGApplicationException
Processes the request message SwInt:HandleRequest.

Parameters:
token - The token number along with the transfer.
Throws:
SAGApplicationException - upon error.

sendHandleResponse

void sendHandleResponse(long token)
                        throws SAGApplicationException
Sends the response message SwInt:HandleResponse.

Parameters:
token - The token number along with the transfer.
Throws:
SAGApplicationException - upon error.

processHandleSnFRequest

void processHandleSnFRequest(long token)
                             throws SAGApplicationException
Processes the request Sw:HandleSnFRequest.

Parameters:
token - The token number along with the transfer.
Throws:
SAGApplicationException - upon error.

sendHandleSnFResponse

void sendHandleSnFResponse(long token)
                           throws SAGApplicationException
Sends the response message Sw:HandleSnFResponse.

Parameters:
token - The token number along with the transfer.
Throws:
SAGApplicationException - upon error.

processHandleFileRequest

void processHandleFileRequest(long token)
                              throws SAGApplicationException
Processes the request Sw:HandleFileRequest.

Parameters:
token - The token number along with the transfer.
Throws:
SAGApplicationException - upon error.

sendHandleFileResponse

void sendHandleFileResponse(long token)
                            throws SAGApplicationException
Sends the response message Sw:HandleFileResponse.

Parameters:
token - The token number along with the transfer.
Throws:
SAGApplicationException - upon error.

processHandleFileEventRequest

void processHandleFileEventRequest(long token)
                                   throws SAGApplicationException
Processes the request Sw:HandleFileEventRequest.

Parameters:
token - The token number along with the transfer.
Throws:
SAGApplicationException - upon error.

sendHandleFileEventResponse

void sendHandleFileEventResponse(long token)
                                 throws SAGApplicationException
Sends the response message Sw:HandleFileEventResponse.

Parameters:
token - The token number along with the transfer.
Throws:
SAGApplicationException - upon error.

processHandleInitRequest

void processHandleInitRequest(long token)
                              throws SAGApplicationException
Processes the request Sw:HandleInitRequest.

Parameters:
token - The token number along with the transfer.
Throws:
SAGApplicationException - upon error.

sendHandleInitResponse

void sendHandleInitResponse(long token)
                            throws SAGApplicationException
Sends the response message Sw:HandleInitResponse.

Parameters:
token - The token number along with the transfer.
Throws:
SAGApplicationException - upon error.

processHandleTermRequest

void processHandleTermRequest(long token)
                              throws SAGApplicationException
Processes the request Sw:HandleTermRequest.

Parameters:
token - The token number along with the transfer.
Throws:
SAGApplicationException - upon error.

sendHandleTermResponse

void sendHandleTermResponse(long token)
                            throws SAGApplicationException
Sends the response message Sw:HandleTermResponse.

Parameters:
token - The token number along with the transfer.
Throws:
SAGApplicationException - upon error.

isNoRequestReceived

boolean isNoRequestReceived()
Checks whether no request is received on receiveRequest() - timeout happens.

Returns:
true or false

isHandleTermRequestReceived

boolean isHandleTermRequestReceived()
Checks whether the request received on receiveRequest() is Sw:HandleTermRequest.

Returns:
true or false

isHandleInitRequestReceived

boolean isHandleInitRequestReceived()
Checks whether the request received on receiveRequest() is Sw:HandleInitRequest.

Returns:
true or false

isHandleFileEventRequestReceived

boolean isHandleFileEventRequestReceived()
Checks whether the request received on receiveRequest() is Sw:HandleFileEventRequest.

Returns:
true or false

isHandleSnFRequestReceived

boolean isHandleSnFRequestReceived()
Checks whether the request received on receiveRequest() is Sw:HandleSnFRequest.

Returns:
true or false

isHandleFileRequestReceived

boolean isHandleFileRequestReceived()
Checks whether the request received on receiveRequest() is Sw:HandleFileRequest.

Returns:
true or false

isHandleRequestReceived

boolean isHandleRequestReceived()
Checks whether the request received on receiveRequest() is SwInt:HandleRequest.

Returns:
true or false

snfAcquire

java.lang.String snfAcquire()
                            throws SAGApplicationException
Acquires SnF queue and opens a SnF session.

Parameters:
None.

Returns:
String - Returns the SnF session ID.
Throws:
SAGApplicationException - upon error.

snfRelease

void snfRelease()
                throws SAGApplicationException
Releases SnF queue and closes the current SnF session which corresponds to the last acquire.

Parameters:
None.

Throws:
SAGApplicationException - upon error.

snfRelease

void snfRelease(java.lang.String sessionId)
                throws SAGApplicationException
Releases SnF queue and closes the specified SnF session.

Parameters:
SnF - SessionId to release
Throws:
SAGApplicationException - upon error.

snfAck

void snfAck()
            throws SAGApplicationException
Acks the previously-handled message in current SnF session.

Parameters:
None.

Throws:
SAGApplicationException - upon error.

snfAck

void snfAck(java.lang.String acceptStatus)
            throws SAGApplicationException
Acks the previously-handled message in current SnF session with specified acceptStatus.

Parameters:
acceptStatus - The accept status
Throws:
SAGApplicationException - upon error.

checkSnFStatus

java.lang.String checkSnFStatus(java.lang.String snfSession)
                                throws SAGApplicationException
Checks SnF status for the specified SnF session.

Parameters:
snfSession - SnF session ID.
Returns:
String - Returns the SnF status.
Throws:
SAGApplicationException - upon error.

checkSnFStatus

java.lang.String checkSnFStatus()
                                throws SAGApplicationException
Checks SnF status for the SnF session which is from the last acquire.

Parameters:
None.

Returns:
String - Returns the SnF status.
Throws:
SAGApplicationException - upon error.

sendError

void sendError(long token,
               long errorCode,
               java.lang.String errorData)
               throws SAGApplicationException
Sends error with the specified token, error code, error data.

Parameters:
token - The token number.
errorCode - The error code, eg. 0 - Local Authentication Error; 1 - No Server Business Response.
errorData - The error data.
Throws:
SAGApplicationException - upon error.

sendError

void sendError(long errorCode,
               java.lang.String errorData)
               throws SAGApplicationException
Sends error with the specified error code, error data. The token number is from the working context.

Parameters:
errorCode - The error code, eg. 0 - Local Authentication Error; 1 - No Server Business Response.
errorData - The error data.
Throws:
SAGApplicationException - upon error.

sendResponse

void sendResponse(long token)
                  throws SAGApplicationException
Sends out the current response message with the specified token number.

Parameters:
token - The token number along with the transfer.
Throws:
SAGApplicationException - upon error.

getRequest

SAGMessage getRequest()
Gets the SAG message.

Parameters:
None.

Returns:
void - Returns SAG message.
Throws:
None.

getRequestPayload

java.lang.String getRequestPayload()
Gets the request payload.

Parameters:
None.

Returns:
String - Returns the request payload.
Throws:
None.

getResponse

java.lang.String getResponse()
Returns the current Response message which will be sent out.

Parameters:
None.

Returns:
The Response message

getResponseEnvelope

SAGMessage.SAGEnvelope getResponseEnvelope()
Returns SAG envelope of the current Response message which will be sent out.

Parameters:
None.

Returns:
The SAG envelope of the Response message

getResponseLetter

java.lang.String getResponseLetter()
Returns letter of the current Response message which will be sent out.

Parameters:
None.

Returns:
The letter of the Response message

getResponsePayload

java.lang.String getResponsePayload()
Gets the response payload.

Parameters:
None.

Returns:
String - Returns the response payload.
Throws:
None.

setResponsePayload

void setResponsePayload(java.lang.String responsePayload)
                        throws SAGApplicationException
Sets the response payload.

Parameters:
responsePayload -
Throws:
SAGApplicationException - upon error.

getToken

long getToken()
Returns the token number for current transfer.

Returns:
The token number.

Sun Adapter for SAG API

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