gov.lbl.srm.client.wsdl
Class SRMRequest

java.lang.Object
  extended by gov.lbl.srm.client.wsdl.SRMRequest

public class SRMRequest
extends java.lang.Object

The SRMRequest object holds all outstanding request information and status.


Field Summary
 SRMServer _srmServer
           
 
Constructor Summary
SRMRequest()
          constructor
 
Method Summary
 boolean abortFiles(java.lang.String[] surl)
          submits the file abort request to SRM server.
 boolean abortRequest()
          Client makes an abort request on the files or the entire request that a user previously requested.
 boolean addFiles(java.lang.String[] surls, java.lang.String[] copyTargetSurls, long[] fileSize)
          adds SURLs for the request.
 boolean checkStatus()
          checkStatus for all files in this request
 boolean checkStatus(java.lang.String[] surl, java.lang.String[] copyTargetSurl)
          Client makes a status of previously submitted request on files that a user selected, and the status of files gets returned.
 boolean extendFileLifeTime(int fileLifetime)
          Client makes an extension request on the files.
 boolean getAllLevelsRecursive()
          gets the recursive flag set for the LS requests.
 int getCount()
          returns the count number for the LS request.
 java.lang.String[] getFiles()
          returns SURL in the request.
 boolean getFullDetailedList()
          returns the full detailed list flag for the request.
 int getNumberLevels()
          gets the number levels set for the LS requests.
 int getOffSet()
          returns the offset set for the LS request.
 SRMRequestSummary getRequestSummary()
          returns the request summary for the given request id
 java.lang.String getRequestToken()
          returns request token after successful request submission.
 java.lang.String getRequestType()
          gets requesttype for the request
 SRMServer getSRMServer()
          This will return the SRMServer object that SRMRequest object is tied with.
 SRMRequestStatus getStatus()
          Client makes a status of previously submitted request on files that a user selected, and the status of files get returned.
 SRMRequestStatus getStatus(java.lang.String[] surl)
          Client makes a status of previously submitted request on files that a user selected, and the status of files get returned.
 void printResults()
          prints results for this request
 void printResults(SRMRequestStatus subStatus)
          prints the given SRMRequestStatus object.
 void printSummary()
          prints the request summary for this request id.
 boolean putDone(java.lang.String[] siteUrl)
          submits srmPutDone request to SRM serer.
 boolean releaseFiles(java.lang.String[] siteUrl)
          Client makes a release request on the files or on the request that previously requested.
 boolean removeFiles(java.lang.String[] surls)
          removes SURLs for the request before the request submission.
 void setAccessLatency(java.lang.String accessLatency)
          sets the access latency for the request.
 void setAllLevelsRecursive(boolean allLevelsRecursive)
          sets the recursive flag for the LS requests.
 void setAuthID(java.lang.String authId)
          sets the user authorization id for the request
 void setBufferSize(int bufferSize)
          sets the buffersize option for the file transfer
 void setCount(int count)
          sets the count number for the LS request.
 void setDCAU(boolean dcau)
          sets the DCAU option for the file transfer
 void setDeferredStartTime(int deferredStartTime)
          sets the desired deferred start time for the request
 void setFileLifeTime(int fileLifeTime)
          sets the desired file lifetime for the request.
 void setFileStorageType(java.lang.String tokenType)
          sets the file storage type for the request: VOLATILE|DURABLE|PERMANENT
 void setFullDetailedList(boolean fullDetailedList)
          sets the full detailed list flag for the request.
 void setNumberLevels(int numLevels)
          sets the recursive levels for the LS requests.
 void setOffSet(int offset)
          Sets the offset number for the LS request.
 void setOverwrite(boolean overwrite)
          sets the overwrite flag for the request.
 void setParallelism(int parallelism)
          sets the parallelism option for the file transfer
 void setPinLifeTime(int pinLifeTime)
          sets the desired pin lifetime for the request.
 void setProtocolList(java.lang.String protocolsList)
          sets the preferred transfer protocol list for the request
 void setPushMode(boolean pushMode)
          sets the push mode flag for the request.
 void setRequestToken(java.lang.String reqId)
          sets requesttoken for this request, used while reconstructing the request.
 void setRequestType(java.lang.String requestType)
          sets requesttype for the request
 void setRetentionPolicy(java.lang.String retentionPolicy)
          sets the retention policy for the request
 void setSRMServer(SRMServer srmServer)
          This ties up SRMRequest to one SRM server that all request and status will go to.
 void setStorageSystemInfo(java.lang.String storageInfo)
          sets the additional storage system info for the source SURLs in the request.
 void setTargetSpaceToken(java.lang.String spaceToken)
          sets the pre-reserved space token for the request
 void setTargetStorageSystemInfo(java.lang.String storageInfo)
          sets the additional storage system info for the target SURLs in the request.
 void setTargetSURLLifeTime(int fileLifeTime)
          sets the desired target file lifetime for the request.
 void setTotalRequestTime(int totalRequestTime)
          sets the desired total request time for the request.
 void setUserDesc(java.lang.String userDesc)
          sets the user description for this request
 boolean srmLs()
          Client can query a file property to find out the size, online availability, creation time etc.
 boolean srmRm()
          submits the file removal request to SRM server.
 boolean submit()
          Client makes a request on files that a user selected to the SRM server, and submission status and the request token get returned and stored in the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_srmServer

public SRMServer _srmServer
Constructor Detail

SRMRequest

public SRMRequest()
           throws java.lang.Exception
constructor

Throws:
java.lang.Exception
Method Detail

setSRMServer

public void setSRMServer(SRMServer srmServer)
                  throws java.lang.Exception
This ties up SRMRequest to one SRM server that all request and status will go to.

Parameters:
srmServer - where SRMServer object is created and connected successfully to one SRM server
Throws:
java.lang.Exception
See Also:
SRMServer

getSRMServer

public SRMServer getSRMServer()
This will return the SRMServer object that SRMRequest object is tied with.

Returns:
SRMServer
See Also:
SRMServer

setUserDesc

public void setUserDesc(java.lang.String userDesc)
sets the user description for this request

Parameters:
userDesc - user description input parameter
See Also:
String

setAuthID

public void setAuthID(java.lang.String authId)
sets the user authorization id for the request

Parameters:
authId - authorizationId input parameter
See Also:
String

setTargetSpaceToken

public void setTargetSpaceToken(java.lang.String spaceToken)
sets the pre-reserved space token for the request

Parameters:
spaceToken - -- valid space token returned by the SRM server
See Also:
String

setProtocolList

public void setProtocolList(java.lang.String protocolsList)
sets the preferred transfer protocol list for the request

Parameters:
protocolsList - --- preferred protocol list
See Also:
String

setFullDetailedList

public void setFullDetailedList(boolean fullDetailedList)
sets the full detailed list flag for the request. Used only in LS. requests

Parameters:
fullDetailedList - -- true or false is set

getFullDetailedList

public boolean getFullDetailedList()
returns the full detailed list flag for the request. Used only in LS. requests

Returns:
boolean -- true or false is returned

setOffSet

public void setOffSet(int offset)
Sets the offset number for the LS request. Used in case the returned list is too large.

Parameters:
offset - -- valid integer

getOffSet

public int getOffSet()
returns the offset set for the LS request.


setCount

public void setCount(int count)
sets the count number for the LS request. Used in case the returned list result is too large.

Parameters:
count - --- valid integer.

getCount

public int getCount()
returns the count number for the LS request.

Returns:
int

setAllLevelsRecursive

public void setAllLevelsRecursive(boolean allLevelsRecursive)
sets the recursive flag for the LS requests.

Parameters:
allLevelsRecursive - -- true or false is set.

getAllLevelsRecursive

public boolean getAllLevelsRecursive()
gets the recursive flag set for the LS requests.


setNumberLevels

public void setNumberLevels(int numLevels)
sets the recursive levels for the LS requests.

Parameters:
numLevels - --- num levels is set.

getNumberLevels

public int getNumberLevels()
gets the number levels set for the LS requests.

Returns:
int

setStorageSystemInfo

public void setStorageSystemInfo(java.lang.String storageInfo)
sets the additional storage system info for the source SURLs in the request.

Parameters:
storageInfo - -- storage system info

setTargetStorageSystemInfo

public void setTargetStorageSystemInfo(java.lang.String storageInfo)
sets the additional storage system info for the target SURLs in the request. Used only for COPY request between two storages.

Parameters:
storageInfo - -- storage system info

setOverwrite

public void setOverwrite(boolean overwrite)
sets the overwrite flag for the request. It makes the target file to be overwritten when exists already, and used for put or copy requests.

Parameters:
overwrite - --- true or false is set.

setTotalRequestTime

public void setTotalRequestTime(int totalRequestTime)
sets the desired total request time for the request.

Parameters:
totalRequestTime - --- valid integer is set.

setPinLifeTime

public void setPinLifeTime(int pinLifeTime)
sets the desired pin lifetime for the request.

Parameters:
pinLifeTime - --- valid integer is set.

setFileLifeTime

public void setFileLifeTime(int fileLifeTime)
sets the desired file lifetime for the request.

Parameters:
fileLifeTime - --- valid integer is set.

setTargetSURLLifeTime

public void setTargetSURLLifeTime(int fileLifeTime)
sets the desired target file lifetime for the request. Used only for the COPY request.

Parameters:
fileLifeTime - --- valid integer is set.

setDeferredStartTime

public void setDeferredStartTime(int deferredStartTime)
sets the desired deferred start time for the request

Parameters:
deferredStartTime - --- valid integer is set.

setPushMode

public void setPushMode(boolean pushMode)
sets the push mode flag for the request. Used only in COPY request from the SRM server's point of view.

Parameters:
pushMode - --- true or false is set.

setDCAU

public void setDCAU(boolean dcau)
sets the DCAU option for the file transfer

Parameters:
dcau - --- true or false is set.

setParallelism

public void setParallelism(int parallelism)
sets the parallelism option for the file transfer

Parameters:
parallelism - --- true or false is set.

setBufferSize

public void setBufferSize(int bufferSize)
sets the buffersize option for the file transfer

Parameters:
bufferSize - --- valid integer is set.

setFileStorageType

public void setFileStorageType(java.lang.String tokenType)
sets the file storage type for the request: VOLATILE|DURABLE|PERMANENT

Parameters:
tokenType - --- durable, volatile or permanent is set.

setRetentionPolicy

public void setRetentionPolicy(java.lang.String retentionPolicy)
sets the retention policy for the request

Parameters:
retentionPolicy - --- replica or output or custodial is set.

setAccessLatency

public void setAccessLatency(java.lang.String accessLatency)
sets the access latency for the request.

Parameters:
accessLatency - --- nearline or online is set.

setRequestType

public void setRequestType(java.lang.String requestType)
                    throws SRMClientException
sets requesttype for the request

Parameters:
requestType - --- put, get, copy, bringonline or ls is set.
Throws:
SRMClientException

getRequestType

public java.lang.String getRequestType()
gets requesttype for the request

Returns:
String
See Also:
String

setRequestToken

public void setRequestToken(java.lang.String reqId)
                     throws SRMClientException
sets requesttoken for this request, used while reconstructing the request.

Parameters:
reqId - --- valid request token returned by the SRM server.
Throws:
SRMClientException

getRequestToken

public java.lang.String getRequestToken()
returns request token after successful request submission.

Returns:
String -- valid request token for this request.

getFiles

public java.lang.String[] getFiles()
returns SURL in the request.

Returns:
String
See Also:
String

addFiles

public boolean addFiles(java.lang.String[] surls,
                        java.lang.String[] copyTargetSurls,
                        long[] fileSize)
                 throws SRMClientException
adds SURLs for the request.

Parameters:
surls - --- source surls used for get, put, copy and bringonline requests.
copyTargetSurls - -- target surls for the copy requests.
fileSize - ---- fileSizes
Throws:
SRMClientException

removeFiles

public boolean removeFiles(java.lang.String[] surls)
                    throws SRMClientException
removes SURLs for the request before the request submission.

Parameters:
surls - --- surls to be removed from the request.
Returns:
boolean
Throws:
SRMClientException

submit

public boolean submit()
               throws java.lang.Exception
Client makes a request on files that a user selected to the SRM server, and submission status and the request token get returned and stored in the object. submits the prepared request. Depending on the request type, srmPrepareToGet, srmPrepareToPut, srmBringOnline, or srmCopy is used internally. The returned status and request token are stored in the object with a time stamp of the request submission time for the client retrieval.

Returns:
boolean
Throws:
java.lang.Exception

extendFileLifeTime

public boolean extendFileLifeTime(int fileLifetime)
                           throws java.lang.Exception
Client makes an extension request on the files. submits the lifetime extension request to SRM server. When SURLs are set in the SRMRequest, all SURLs in the request will have a new file lifetime. When TURLs exist in SRMRequest, all TURLs wil have a new pin lifetime. It uses srmExtendFileLifeTime inernally to extend lifetime of files.

Parameters:
fileLifetime - --- valid integer.
Returns:
boolean --- returns true or false.
Throws:
java.lang.Exception

abortRequest

public boolean abortRequest()
                     throws java.lang.Exception
Client makes an abort request on the files or the entire request that a user previously requested. Upon the sussessful abort, the occupied space by the file gets released and would be available for more files. submits the abort request to SRM server. It uses srmAbortRequest internally with the stored request token to abort the request. The status of each file is stored afterwards in the object for client retrieval.

Returns:
boolean
Throws:
java.lang.Exception

srmLs

public boolean srmLs()
              throws SRMClientException,
                     java.lang.Exception
Client can query a file property to find out the size, online availability, creation time etc. submits the file browsing request to SRM server. It uses srmLs internally to get files information. When request token is returned, the return status will reflect the status and additional status checking needs to be done through checkStatus().

Returns:
boolean
Throws:
SRMClientException
java.lang.Exception

srmRm

public boolean srmRm()
              throws SRMClientException,
                     java.lang.Exception
submits the file removal request to SRM server. It uses srmRm internally to remove files from the SRM managed space.

Returns:
boolean
Throws:
SRMClientException
java.lang.Exception

putDone

public boolean putDone(java.lang.String[] siteUrl)
                throws java.lang.Exception
submits srmPutDone request to SRM serer. It is for PUT request only, and SURLs are optional. When surls are not provided, all SURLs in the request will be submitted. It uses srmPutDone internally, and the returned status of each file is stored in the object for retrieval.

Parameters:
siteUrl - --- source urls to be requested for putDone
Returns:
boolean
Throws:
java.lang.Exception

abortFiles

public boolean abortFiles(java.lang.String[] surl)
                   throws SRMClientException,
                          java.lang.Exception
submits the file abort request to SRM server. SURLs are optional, and when they are not provided, all SURLs in the request will be submitted for abort. It uses srmAbortFiles internally with the stored request token to abort files in the request. The status of each file is stored afterwards in the object for retrieval.

Parameters:
surl - -- source urls to be called for abort files.
Returns:
boolean
Throws:
SRMClientException
java.lang.Exception

releaseFiles

public boolean releaseFiles(java.lang.String[] siteUrl)
                     throws SRMClientException,
                            java.lang.Exception
Client makes a release request on the files or on the request that previously requested. Upon the successful release, the occupied space by the file gets released and would be available for more files.

Parameters:
siteUrl - --- surls to be released
Returns:
boolean
Throws:
SRMClientException
java.lang.Exception

getStatus

public SRMRequestStatus getStatus()
Client makes a status of previously submitted request on files that a user selected, and the status of files get returned. Status of selective files or all files in the request can be queried. getStatus --- retrieves the request status

Returns:
SRMRequestStatus
See Also:
SRMRequestStatus

getStatus

public SRMRequestStatus getStatus(java.lang.String[] surl)
Client makes a status of previously submitted request on files that a user selected, and the status of files get returned. Status of selective files or all files in the request can be queried. getStatus --- retrieves the request status

Parameters:
surl - --- surl to be retrieved for status
Returns:
SRMRequestStatus
See Also:
SRMRequestStatus

getRequestSummary

public SRMRequestSummary getRequestSummary()
returns the request summary for the given request id

Returns:
SRMRequestSummary
See Also:
SRMRequestSummary

printSummary

public void printSummary()
prints the request summary for this request id.


checkStatus

public boolean checkStatus(java.lang.String[] surl,
                           java.lang.String[] copyTargetSurl)
                    throws SRMClientException,
                           java.lang.Exception
Client makes a status of previously submitted request on files that a user selected, and the status of files gets returned. Status of selective files or all files in the request can be queried. checkStatus -- checks the request status. Depending on the request type, srmStatusOfGetRequest, srmStatusOfPutRequest, srmStatusOfCopyRequest or srmStatusOfBringOnlineRequest will be used internally with its stored request token from the previous submission. The returned status result is stored in the object with a time stamp of the status check time for client retrieval, and should be retrieved with getStatus().

Parameters:
surl - --- source surls for get, put, copy, bringonline requests.
copyTargetSurl - --- target surls for copy requests.
Returns:
boolean
Throws:
SRMClientException
java.lang.Exception

checkStatus

public boolean checkStatus()
                    throws SRMClientException,
                           java.lang.Exception
checkStatus for all files in this request

Throws:
SRMClientException
java.lang.Exception

printResults

public void printResults()
                  throws java.lang.Exception
prints results for this request

Throws:
java.lang.Exception

printResults

public void printResults(SRMRequestStatus subStatus)
                  throws java.lang.Exception
prints the given SRMRequestStatus object.

Parameters:
subStatus -
Throws:
java.lang.Exception
See Also:
SRMRequestStatus