org.gcube.datatransfer.agent.library
Class AgentLibrary
java.lang.Object
org.gcube.datatransfer.agent.library.AgentLibrary
- All Implemented Interfaces:
- AgentService, AgentServiceAsync
public class AgentLibrary
- extends Object
- implements AgentService, AgentServiceAsync
- Author:
- Andrea Manzi(CERN)
Field Summary |
org.gcube.common.core.utils.logging.GCUBEClientLog |
logger
|
Constructor Summary |
AgentLibrary(org.gcube.common.clients.delegates.ProxyDelegate<org.gcube.datatransfer.agent.stubs.datatransferagent.DataTransferAgentPortType> config)
|
Method Summary |
void |
cancelTransfer(String transferId,
boolean forceCancel)
Cancel a scheduled/running transfer |
ArrayList<FileTransferOutcome> |
copyLocalFiles(ArrayList<File> inputFiles,
String destinationFolder,
boolean overwrite,
boolean unzip)
|
|
getTransferOutcomes(String transferId,
Class<T> outcomeType)
|
String |
monitorTransfer(String transferId)
|
String |
startTransfer(ArrayList<URI> inputURIs,
String outputFolder,
TransferOptions options)
|
Future<?> |
startTransfer(ArrayList<URI> inputURIs,
String outputFolder,
TransferOptions options,
org.gcube.common.clients.delegates.Callback callback)
|
String |
startTransfer(DataSource source,
DataStorage storage,
TransferOptions options)
|
Future<?> |
startTransfer(org.gcube.data.trees.patterns.Pattern patternInput,
String inputSourceID,
String outputStorageId,
org.gcube.common.clients.delegates.Callback callback)
|
ArrayList<FileTransferOutcome> |
startTransferSync(ArrayList<URI> inputURIs,
String outputFolder,
TransferOptions options)
|
ArrayList<TreeTransferOutcome> |
startTransferSync(org.gcube.data.trees.patterns.Pattern patternInput,
String inputSourceID,
String outputStorageId)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
public org.gcube.common.core.utils.logging.GCUBEClientLog logger
AgentLibrary
public AgentLibrary(org.gcube.common.clients.delegates.ProxyDelegate<org.gcube.datatransfer.agent.stubs.datatransferagent.DataTransferAgentPortType> config)
startTransferSync
public ArrayList<TreeTransferOutcome> startTransferSync(org.gcube.data.trees.patterns.Pattern patternInput,
String inputSourceID,
String outputStorageId)
-
- Specified by:
startTransferSync
in interface AgentService
- Returns:
- ArrayList
startTransferSync
public ArrayList<FileTransferOutcome> startTransferSync(ArrayList<URI> inputURIs,
String outputFolder,
TransferOptions options)
throws TransferException,
ConfigurationException
-
- Specified by:
startTransferSync
in interface AgentService
- Returns:
-
- Throws:
ConfigurationException
TransferException
startTransfer
public String startTransfer(ArrayList<URI> inputURIs,
String outputFolder,
TransferOptions options)
throws TransferException,
ConfigurationException
- Specified by:
startTransfer
in interface AgentService
- Parameters:
inputURLs
- outputFolder
- type
- overwrite
- storageManagerDetails
-
- Returns:
-
- Throws:
TransferException
ConfigurationException
Exception
cancelTransfer
public void cancelTransfer(String transferId,
boolean forceCancel)
throws CancelTransferException
- Cancel a scheduled/running transfer
- Specified by:
cancelTransfer
in interface AgentService
- Parameters:
transferId
- forceStop
- cancel the transfer even if it's running
- Throws:
Exception
CancelTransferException
copyLocalFiles
public ArrayList<FileTransferOutcome> copyLocalFiles(ArrayList<File> inputFiles,
String destinationFolder,
boolean overwrite,
boolean unzip)
throws TransferException
- Specified by:
copyLocalFiles
in interface AgentService
- Parameters:
inputFiles
- destinationFolder
- overwrite
-
- Returns:
- an Array of
FileTransferOutcome
- Throws:
Exception
TransferException
startTransfer
public Future<?> startTransfer(org.gcube.data.trees.patterns.Pattern patternInput,
String inputSourceID,
String outputStorageId,
org.gcube.common.clients.delegates.Callback callback)
- Specified by:
startTransfer
in interface AgentServiceAsync
- Returns:
startTransfer
public Future<?> startTransfer(ArrayList<URI> inputURIs,
String outputFolder,
TransferOptions options,
org.gcube.common.clients.delegates.Callback callback)
throws ConfigurationException
- Specified by:
startTransfer
in interface AgentServiceAsync
- Returns:
-
- Throws:
ConfigurationException
monitorTransfer
public String monitorTransfer(String transferId)
throws MonitorTransferException
- Specified by:
monitorTransfer
in interface AgentService
- Returns:
-
- Throws:
MonitorTransferException
getTransferOutcomes
public <T extends TransferOutcome> ArrayList<T> getTransferOutcomes(String transferId,
Class<T> outcomeType)
throws GetTransferOutcomesException
- Specified by:
getTransferOutcomes
in interface AgentService
- Returns:
-
- Throws:
GetTransferOutcomesException
startTransfer
public String startTransfer(DataSource source,
DataStorage storage,
TransferOptions options)
throws ConfigurationException,
TransferException
- Specified by:
startTransfer
in interface AgentService
- Returns:
-
- Throws:
ConfigurationException
TransferException
Copyright © 2012. All Rights Reserved.