|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.fzj.unicore.wsrflite.xmlbeans.client.BaseWSRFClient
de.fzj.unicore.uas.client.BaseUASClient
de.fzj.unicore.uas.client.FileTransferClient
public abstract class FileTransferClient
Base client class for managing file transfers Concrete subclasses may add methods specific to the actual file transfer protocol
| Nested Class Summary | |
|---|---|
static interface |
FileTransferClient.IChunked
file transfers that use chunks can implement this interface to allow setting the chunksize |
static interface |
FileTransferClient.IMonitorable
file transfers can implement this interface to allow progress monitoring |
| Field Summary | |
|---|---|
protected boolean |
append
Some protocol implementations require knowledge about how to deal with existing remote files. |
| Fields inherited from class de.fzj.unicore.wsrflite.xmlbeans.client.BaseWSRFClient |
|---|
epr, proxyMaker, retryDecider, securityProperties, url |
| Constructor Summary | |
|---|---|
FileTransferClient(org.w3.x2005.x08.addressing.EndpointReferenceType epr)
|
|
FileTransferClient(org.w3.x2005.x08.addressing.EndpointReferenceType epr,
IUASSecurityProperties sec)
|
|
FileTransferClient(java.lang.String url,
org.w3.x2005.x08.addressing.EndpointReferenceType epr)
|
|
FileTransferClient(java.lang.String url,
org.w3.x2005.x08.addressing.EndpointReferenceType epr,
IUASSecurityProperties sec)
Main constructor. |
|
| Method Summary | |
|---|---|
org.w3.x2005.x08.addressing.EndpointReferenceType |
getParentStorage()
get the address of the Storage resource on which the current file resides |
org.unigrids.services.atomic.types.ProtocolType.Enum |
getProtocol()
get the protocol used by this transfer |
org.unigrids.x2006.x04.services.fts.FileTransferPropertiesDocument |
getResourcePropertiesDocument()
get the resource properties document of this file transfer |
abstract long |
getSize()
get the size of the remote (source) file |
java.lang.String |
getSource()
get the source URI of this transfer |
java.lang.String |
getStatus()
get the (human-readable) status of this transfer |
org.unigrids.x2006.x04.services.fts.SummaryType.Enum |
getStatusSummary()
get the file transfer status |
java.lang.String |
getTarget()
get the target URI of this transfer |
long |
getTransferredBytes()
get the number of bytes that have been already transferred |
abstract void |
readAllData(java.io.OutputStream os)
convenience method that reads all data from the remote location and writes it to an output stream |
void |
setAppend(boolean append)
set the "append" flag that is used when importing data to a remote location. |
abstract void |
writeAllData(java.io.InputStream source)
Writes all data from source to the remote locationIn case the remote file exists, it is overwritten. |
| Methods inherited from class de.fzj.unicore.uas.client.BaseUASClient |
|---|
extractReceiver, getSecurityProperties, getServerVersion, setRetryDefaults |
| Methods inherited from class de.fzj.unicore.wsrflite.xmlbeans.client.BaseWSRFClient |
|---|
checkConnection, checkConnection, destroy, getConnectionStatus, getCurrentTime, getEPR, getLT, getMultipleResourceProperties, getResourceProperty, getResourcePropertyDocument, GetResourcePropertyDocument, getRP, getTerminationTime, getUpdateInterval, getUrl, makeProxy, queryResourceProperties, setConnectionTimeout, setConnectionTimeout, setRetryHandler, setTerminationTime, setUpdateInterval |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected boolean append
true data is appended.
The default value is false.
| Constructor Detail |
|---|
public FileTransferClient(java.lang.String url,
org.w3.x2005.x08.addressing.EndpointReferenceType epr,
IUASSecurityProperties sec)
throws java.lang.Exception
StorageClient using reflection
url - - the url of the target file transfer serviceepr - - the EPR of the target file transfer servicesec - - security settingsappend - - (used for imports) whether the transfer will overwrite the remote file
java.lang.Exception
public FileTransferClient(org.w3.x2005.x08.addressing.EndpointReferenceType epr,
IUASSecurityProperties sec)
throws java.lang.Exception
java.lang.Exception
public FileTransferClient(java.lang.String url,
org.w3.x2005.x08.addressing.EndpointReferenceType epr)
throws java.lang.Exception
url - epr -
java.lang.Exception
public FileTransferClient(org.w3.x2005.x08.addressing.EndpointReferenceType epr)
throws java.lang.Exception
java.lang.Exception| Method Detail |
|---|
public abstract void readAllData(java.io.OutputStream os)
throws java.lang.Exception
os - - a local OutputStream to write the data to
java.lang.Exception
public abstract void writeAllData(java.io.InputStream source)
throws java.lang.Exception
source to the remote location
source - - an InputStream supplying local data
java.lang.Exceptionpublic long getTransferredBytes()
-1 if not available
public org.w3.x2005.x08.addressing.EndpointReferenceType getParentStorage()
throws java.lang.Exception
EndpointReferenceType to the parent storage
java.lang.Exception
public org.unigrids.services.atomic.types.ProtocolType.Enum getProtocol()
throws java.lang.Exception
ProtocolType.Enum
java.lang.Exception
public java.lang.String getSource()
throws java.lang.Exception
java.lang.Exception
public java.lang.String getTarget()
throws java.lang.Exception
java.lang.Exception
public java.lang.String getStatus()
throws java.lang.Exception
java.lang.Exception
public org.unigrids.x2006.x04.services.fts.SummaryType.Enum getStatusSummary()
throws java.lang.Exception
java.lang.Exceptionpublic abstract long getSize()
-1
if not available or an error occurs)
public org.unigrids.x2006.x04.services.fts.FileTransferPropertiesDocument getResourcePropertiesDocument()
throws java.lang.Exception
java.lang.Exceptionpublic void setAppend(boolean append)
true, data is appended to the remote file, if it exists.
By default, remote files are overwritten.
append - - set to to true to append data
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||