Sun Adapter for SAG API

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

Enclosing interface:
SAGApi.Services

public static interface SAGApi.Services.InterActClient

It is client component for InterAct. It can do InterAct scenarios like send request (SwInt:ExchangeRequest), get response (SwInt:ExchangeResponse), etc. It constructs the requests by use of Configuration. It populates the responses to the 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.
 java.lang.String getRequest()
          Returns the current Request message which will be sent out.
 SAGMessage.SAGEnvelope getRequestEnvelope()
          Returns SAG envelope of the current Request message which will be sent out.
 java.lang.String getRequestLetter()
          Returns letter of the current Request message which will be sent out.
 java.lang.String getRequestPayload()
          Returns the current RequestPayload which will be sent out.
 SAGMessage getResponse()
          Returns the current Response from the previous exchange.
 java.lang.String getResponsePayload()
          Returns the current ResponsePayload from the previous exchange.
 long getToken()
          Returns the token number for current transfer.
 void receiveResponse(long token)
          Receives Response with ResponsePayload
 void sendAndReceive()
          Sends request with RequestPayload and receives response with ResponsePayload synchronously taking the configured timeout value.
 long sendRequest()
          Sends Request with RequestPayload
 void setRequestPayload(java.lang.String requestPayload)
          Sets the RequestPayload which will be sent out.
 void snfAck()
          Acks the previously-pulled message in current SnF session.
 void snfAck(java.lang.String acceptStatus)
          Acks the previously-pulled message with specified acceptStatus in current SnF session.
 java.lang.String snfAcquire()
          Acquires SnF queue and opens a SnF session.
 java.lang.String snfPull()
          Pulls the next message from queue in current SnF session.
 java.lang.String snfPull(java.lang.String sessionId)
          Pulls the next message from queue with the specified 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

sendRequest

long sendRequest()
                 throws SAGApplicationException
Sends Request with RequestPayload

Parameters:
None.

Returns:
long - Returns the token.
Throws:
SAGApplicationException - upon error.

receiveResponse

void receiveResponse(long token)
                     throws SAGApplicationException
Receives Response with ResponsePayload

Parameters:
token -
Throws:
SAGApplicationException - upon error.

sendAndReceive

void sendAndReceive()
                    throws SAGApplicationException
Sends request with RequestPayload and receives response with ResponsePayload synchronously taking the configured timeout value.

Parameters:
None.

Throws:
SAGApplicationException - upon error.

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-pulled message in current SnF session.

Parameters:
None.

Throws:
SAGApplicationException - upon error.

snfAck

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

Parameters:
acceptStatus - The accept status ("Accepted", "Duplicated", "Rejected")
Throws:
SAGApplicationException - upon error.

snfPull

java.lang.String snfPull(java.lang.String sessionId)
                         throws SAGApplicationException
Pulls the next message from queue with the specified SnF session.

Parameters:
SnF - SessionId
Returns:
String - Returns the SnFRef; null is returned if queue is empty.
Throws:
SAGApplicationException - upon error.

snfPull

java.lang.String snfPull()
                         throws SAGApplicationException
Pulls the next message from queue in current SnF session.

Parameters:
None.

Returns:
String - Returns the SnFRef; null is returned if queue is empty.
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.

getRequest

java.lang.String getRequest()
Returns the current Request message which will be sent out.

Returns:
Request message

getRequestEnvelope

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

Parameters:
None.

Returns:
The SAG envelope of the Request message

getRequestLetter

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

Parameters:
None.

Returns:
The letter of the Request message

getRequestPayload

java.lang.String getRequestPayload()
Returns the current RequestPayload which will be sent out.

Parameters:
None.

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

getResponse

SAGMessage getResponse()
Returns the current Response from the previous exchange.

Parameters:
None.

Returns:
SAGMessage - Returns the response message.
Throws:
None.

getResponsePayload

java.lang.String getResponsePayload()
Returns the current ResponsePayload from the previous exchange.

Parameters:
None.

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

setRequestPayload

void setRequestPayload(java.lang.String requestPayload)
                       throws SAGApplicationException
Sets the RequestPayload which will be sent out.

Parameters:
requestPayload - The payload to be set.
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.