Sun Adapter for SAG API

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

Enclosing interface:
SAGApi.Services

public static interface SAGApi.Services.FileActClient

It is client component for FileAct. It can do FileAct scenarios like get file, put file, etc. It constructs the requests by use of Configuration. It populates the responses 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
 void abortFile(java.lang.String transferKey)
          Aborts the file transfer which is against the last get/put/fetch.
 void abortFile(java.lang.String transferRef, java.lang.String transferKey)
          Aborts the file transfer with the specified transfer reference.
 void ackFile(boolean accepted)
          Acks the previously-received file.
 java.lang.String checkFileStatus()
          Checks the state for the file transfer which is against the last get/put/fetch.
 java.lang.String checkFileStatus(java.lang.String transferRef)
          Checks the state for the file transfer with the specified transfer reference.
 java.lang.String checkFinalFileStatus()
          Checks the final state for the file transfer which is against the last get/put/fetch.
 java.lang.String checkFinalFileStatus(java.lang.String transferRef)
          Checks the final state for the file transfer with the specified transfer reference.
 java.lang.String checkFinalFileStatus(java.lang.String transferRef, long interval, int count)
          Checks the final state for the file transfer with the specified transfer reference.
 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 computeFileDigest(java.lang.String physicalFileFullName)
          Computes File Digest locally using TransferEP from configuration if it exists.
 java.lang.String computeFileDigest(java.lang.String physicalFileFullName, java.lang.String transferEP)
          Computes File Digest locally using specified TransferEP.
 java.lang.String get()
          Gets file up on the e*Way configuration settings.
 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 the letter of the current Request message which will be sent out.
 SAGMessage getResponse()
          Returns the current Response from the previous exchange.
 long getToken()
          Returns the token number for current transfer.
 boolean isRemoteFileHandlerAlive()
          Checks whether Remote File Handler process is alive.
 java.lang.String listFileStatus()
          It allows for several selection criteria.
 java.lang.String put()
          Puts file up on the e*Way configuration settings.
 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 snfFetch()
          Fetches the file from SnF central server in current 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 in specified SnF session.
 void snfRelease()
          Releases SnF queue and closes the SnF session which corresponds to the last acquire.
 void snfRelease(java.lang.String sessionId)
          Releases SnF queue and closes the specified SnF session.
 java.lang.String startRemoteFileHandler()
          Starts Remote File Handler process with e*Way interlly assigned Transfer EndPoint.
 void startRemoteFileHandler(java.lang.String transferEP)
          Starts Remote File Handler process with the specified Transfer EndPoint.
 void stopRemoteFileHandler()
          Stops the Remote File Handler process which is started from this e*Way instance.
 java.lang.String subscribeFileEvent()
          Subscribes file transfer event with e*Way assigned event endpoint.
 void subscribeFileEvent(java.lang.String eventEP)
          Subscribes file transfer event with the specified event endpoint.
 

Method Detail

put

java.lang.String put()
                     throws SAGApplicationException
Puts file up on the e*Way configuration settings.

Returns:
String - Returns Sw:TransferRef.
Throws:
SAGApplicationException - upon error.

get

java.lang.String get()
                     throws SAGApplicationException
Gets file up on the e*Way configuration settings.

Returns:
String - Returns Sw:TransferRef.
Throws:
SAGApplicationException - upon error.

ackFile

void ackFile(boolean accepted)
             throws SAGApplicationException
Acks the previously-received file. It can be called only after GetFile request.

Parameters:
accepted - true or false
Throws:
SAGApplicationException - upon error.

snfAcquire

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

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

snfRelease

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

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.
Throws:
SAGApplicationException - upon error.

snfPull

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

Parameters:
SnF - SessionId
Returns:
String - Returns the SnF reference.
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 SnF reference.
Throws:
SAGApplicationException - upon error.

snfFetch

java.lang.String snfFetch()
                          throws SAGApplicationException
Fetches the file from SnF central server in current SnF session.

Parameters:
None.

Returns:
String - Returns the transfer reference.
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.

checkFileStatus

java.lang.String checkFileStatus(java.lang.String transferRef)
                                 throws SAGApplicationException
Checks the state for the file transfer with the specified transfer reference. Returns one of following states:
 In progress:
      INITIATED
      ACCEPTED
      ONGOING
 Final state:
      COMPLETED 
      DUPLICATED 
      UNKNOWN
      ABORTED
      FAILED
      REJECTED
 

Parameters:
transferRef - File transfer reference.
Returns:
String - Returns the file transfer status.
Throws:
SAGApplicationException - upon error.

checkFileStatus

java.lang.String checkFileStatus()
                                 throws SAGApplicationException
Checks the state for the file transfer which is against the last get/put/fetch. Returns one of following states:
 In progress:
      INITIATED
      ACCEPTED
      ONGOING
 Final state:
      COMPLETED 
      DUPLICATED 
      UNKNOWN
      ABORTED
      FAILED
      REJECTED
 

Parameters:
None.

Returns:
String - Returns the file transfer status.
Throws:
SAGApplicationException - upon error.

checkFinalFileStatus

java.lang.String checkFinalFileStatus(java.lang.String transferRef,
                                      long interval,
                                      int count)
                                      throws SAGApplicationException
Checks the final state for the file transfer with the specified transfer reference. It keeps checking the file transfer status based on interval/count until a final state is returned or maximum count is reached.
 The final state is one of following:
 - COMPLETED
 - DUPLICATED
 - UNKNOWN
 - ABORTED
 - FAILED
 - REJECTED
 

Parameters:
transferRef - File transfer reference
interval - Check interval
count - Check maximum count
Returns:
String - Returns the file transfer status.
Throws:
SAGApplicationException - upon error.

checkFinalFileStatus

java.lang.String checkFinalFileStatus(java.lang.String transferRef)
                                      throws SAGApplicationException
Checks the final state for the file transfer with the specified transfer reference. It keeps checking the file transfer status until a final state is returned.
 The final state is one of following:
 - COMPLETED
 - DUPLICATED
 - UNKNOWN
 - ABORTED
 - FAILED
 - REJECTED
 

Parameters:
transferRef - File transfer reference
Returns:
String - Returns the file transfer status.
Throws:
SAGApplicationException - upon error.

checkFinalFileStatus

java.lang.String checkFinalFileStatus()
                                      throws SAGApplicationException
Checks the final state for the file transfer which is against the last get/put/fetch. It keeps checking the file transfer status until a final state is returned.
 The final state is one of following:
 - COMPLETED
 - DUPLICATED
 - UNKNOWN
 - ABORTED
 - FAILED
 - REJECTED
 

Parameters:
None.

Returns:
String - Returns the file transfer status.
Throws:
SAGApplicationException - upon error.

listFileStatus

java.lang.String listFileStatus()
                                throws SAGApplicationException
It allows for several selection criteria. When present, the selection criteria Sw:Partition, Sw:TransferStatus, Sw:StoredTransferRef and Sw:MsgId are linked together with the AND relation.

Parameters:
None.

Returns:
String - Returns Sw:EndOfList. TRUE or FALSE to indicate whether the end of the list has been reached.
Throws:
SAGApplicationException - upon error.

abortFile

void abortFile(java.lang.String transferRef,
               java.lang.String transferKey)
               throws SAGApplicationException
Aborts the file transfer with the specified transfer reference.

Parameters:
transferRef - File transfer reference.
transferKey - File transfer key.
Throws:
SAGApplicationException - upon error.

abortFile

void abortFile(java.lang.String transferKey)
               throws SAGApplicationException
Aborts the file transfer which is against the last get/put/fetch.

Parameters:
transferKey - File transfer key.
Throws:
SAGApplicationException - upon error.

computeFileDigest

java.lang.String computeFileDigest(java.lang.String physicalFileFullName)
                                   throws SAGApplicationException
Computes File Digest locally using TransferEP from configuration if it exists.

Parameters:
physicalFileFullName - The file to be computed
Returns:
String - Returns the File Digest.
Throws:
SAGApplicationException - upon error.
See Also:
com.stc.connector.sagadapter.sagapi.SAGApi.Services.FileActClient#computeFileDigest()

computeFileDigest

java.lang.String computeFileDigest(java.lang.String physicalFileFullName,
                                   java.lang.String transferEP)
                                   throws SAGApplicationException
Computes File Digest locally using specified TransferEP.

Parameters:
physicalFileFullName - The file to be computed
transferEP - The file transfer endpoint.
Returns:
String - Returns the File Digest.
Throws:
SAGApplicationException - upon error.
See Also:
com.stc.connector.sagadapter.sagapi.SAGApi.Services.FileActClient#computeFileDigest()

isRemoteFileHandlerAlive

boolean isRemoteFileHandlerAlive()
Checks whether Remote File Handler process is alive.

Returns:
true or false

startRemoteFileHandler

java.lang.String startRemoteFileHandler()
                                        throws SAGApplicationException
Starts Remote File Handler process with e*Way interlly assigned Transfer EndPoint.

Returns:
The Transfer EndPoint used for this Remote File Handler
Throws:
SAGApplicationException - upon error.

startRemoteFileHandler

void startRemoteFileHandler(java.lang.String transferEP)
                            throws SAGApplicationException
Starts Remote File Handler process with the specified Transfer EndPoint. param transferEP The Transfer EndPoint used for this Remote File Handler

Throws:
SAGApplicationException - upon error.

stopRemoteFileHandler

void stopRemoteFileHandler()
                           throws SAGApplicationException
Stops the Remote File Handler process which is started from this e*Way instance.

Throws:
SAGApplicationException - upon error.

subscribeFileEvent

java.lang.String subscribeFileEvent()
                                    throws SAGApplicationException
Subscribes file transfer event with e*Way assigned event endpoint.

Returns:
The event endpoint
Throws:
SAGApplicationException - upon error.

subscribeFileEvent

void subscribeFileEvent(java.lang.String eventEP)
                        throws SAGApplicationException
Subscribes file transfer event with the specified event endpoint.

Parameters:
eventEP - The event endpoint
Throws:
SAGApplicationException - upon error.

getRequest

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

Parameters:
None.

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 the letter of the current Request message which will be sent out.

Parameters:
None.

Returns:
The letter of the Request message

getResponse

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

Parameters:
None.

Returns:
SAGMessage - Returns the response message.

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.