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)
Method Summary |
void |
cancelTransfer(String transferId,
boolean forceCancel)
Cancel a scheduled/running transfer |
ArrayList<org.gcube.datatransfer.common.outcome.FileTransferOutcome> |
copyLocalFiles(ArrayList<File> inputFiles,
String destinationFolder,
boolean overwrite,
boolean unzip)
|
String |
createTreeSource(String sourceID,
String address,
int port)
|
ArrayList<org.gcube.datatransfer.common.objs.LocalSource> |
getLocalSources(String path)
|
<T extends org.gcube.datatransfer.common.outcome.TransferOutcome>
ArrayList<T> |
|
getTransferOutcomes(String transferId,
Class<T> outcomeType)
/** |
ArrayList<String> |
getTreeSources(String reader_or_writer_TYPE)
|
String |
monitorTransfer(String transferId)
|
org.gcube.datatransfer.common.agent.Types.MonitorTransferReportMessage |
monitorTransferWithProgress(String transferId)
|
String |
removeGenericResource(String sourceID)
|
String |
startTransfer(ArrayList<URI> inputURIs,
ArrayList<URI> outputURIs,
org.gcube.datatransfer.common.options.TransferOptions options)
|
String |
startTransfer(ArrayList<URI> inputURIs,
String outputFolder,
org.gcube.datatransfer.common.options.TransferOptions options)
|
Future<?> |
startTransfer(ArrayList<URI> inputURIs,
String outputFolder,
org.gcube.datatransfer.common.options.TransferOptions options,
org.gcube.common.clients.delegates.Callback callback)
|
String |
startTransfer(DataSource source,
DataStorage storage,
org.gcube.datatransfer.common.options.TransferOptions options)
|
String |
startTransfer(org.gcube.data.trees.patterns.Pattern patternInput,
String inputSourceID,
String outputStorageId)
|
Future<?> |
startTransfer(org.gcube.data.trees.patterns.Pattern patternInput,
String inputSourceID,
String outputStorageId,
org.gcube.common.clients.delegates.Callback callback)
|
ArrayList<org.gcube.datatransfer.common.outcome.FileTransferOutcome> |
startTransferSync(ArrayList<URI> inputURIs,
String outputFolder,
org.gcube.datatransfer.common.options.TransferOptions options)
|
ArrayList<org.gcube.datatransfer.common.outcome.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 |
AgentLibrary
public AgentLibrary(org.gcube.common.clients.delegates.ProxyDelegate<AgentServiceJAXWSStubs> config)
startTransferSync
public ArrayList<org.gcube.datatransfer.common.outcome.TreeTransferOutcome> startTransferSync(org.gcube.data.trees.patterns.Pattern patternInput,
String inputSourceID,
String outputStorageId)
-
- Specified by:
startTransferSync
in interface AgentService
- Returns:
- ArrayList
startTransfer
public String startTransfer(org.gcube.data.trees.patterns.Pattern patternInput,
String inputSourceID,
String outputStorageId)
throws TransferException
- Throws:
TransferException
startTransferSync
public ArrayList<org.gcube.datatransfer.common.outcome.FileTransferOutcome> startTransferSync(ArrayList<URI> inputURIs,
String outputFolder,
org.gcube.datatransfer.common.options.TransferOptions options)
throws TransferException,
ConfigurationException
-
- Specified by:
startTransferSync
in interface AgentService
- Returns:
-
- Throws:
ConfigurationException
TransferException
startTransfer
public String startTransfer(ArrayList<URI> inputURIs,
String outputFolder,
org.gcube.datatransfer.common.options.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<org.gcube.datatransfer.common.outcome.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
getLocalSources
public ArrayList<org.gcube.datatransfer.common.objs.LocalSource> getLocalSources(String path)
createTreeSource
public String createTreeSource(String sourceID,
String address,
int port)
removeGenericResource
public String removeGenericResource(String sourceID)
getTreeSources
public ArrayList<String> getTreeSources(String reader_or_writer_TYPE)
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,
org.gcube.datatransfer.common.options.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 org.gcube.datatransfer.common.outcome.TransferOutcome> ArrayList<T> getTransferOutcomes(String transferId,
Class<T> outcomeType)
throws GetTransferOutcomesException
- Description copied from interface:
AgentService
- /**
- Specified by:
getTransferOutcomes
in interface AgentService
- Returns:
-
- Throws:
GetTransferOutcomesException
startTransfer
public String startTransfer(DataSource source,
DataStorage storage,
org.gcube.datatransfer.common.options.TransferOptions options)
throws ConfigurationException,
TransferException
- Specified by:
startTransfer
in interface AgentService
- Returns:
-
- Throws:
ConfigurationException
TransferException
startTransfer
public String startTransfer(ArrayList<URI> inputURIs,
ArrayList<URI> outputURIs,
org.gcube.datatransfer.common.options.TransferOptions options)
throws ConfigurationException,
TransferException
- Specified by:
startTransfer
in interface AgentService
- Returns:
-
- Throws:
ConfigurationException
TransferException
monitorTransferWithProgress
public org.gcube.datatransfer.common.agent.Types.MonitorTransferReportMessage monitorTransferWithProgress(String transferId)
throws MonitorTransferException
- Specified by:
monitorTransferWithProgress
in interface AgentService
- Returns:
-
- Throws:
MonitorTransferException
Copyright © 2014. All Rights Reserved.