org.gcube.datatransfer.agent.library
Class AgentLibrary

java.lang.Object
  extended by org.gcube.datatransfer.agent.library.AgentLibrary

public class AgentLibrary
extends Object

Author:
Andrea Manzi(CERN)

Field Summary
 org.gcube.common.core.utils.logging.GCUBEClientLog logger
           
 
Constructor Summary
AgentLibrary(org.gcube.common.core.scope.GCUBEScope scope, org.gcube.common.core.security.GCUBESecurityManagerImpl... secManager)
          Creates an Agent Library to access an Agent Service on the given scope
AgentLibrary(org.gcube.common.core.scope.GCUBEScope scope, String endpoint, String port, org.gcube.common.core.security.GCUBESecurityManagerImpl... secManager)
          Creates an Agent Library to access the given instance of Agent Service
 
Method Summary
 void cancelTransfer(String transferId, boolean forceCancel)
          Cancel a scheduled/running transfer
 ArrayList<FileTransferOutcome> copyLocalFiles(File[] inputFiles, File destinationFolder, boolean overwrite)
           
 String startTransfer(org.gcube.data.trees.patterns.TreePattern patternInput, String inputSourceID, String outputStorageId, org.gcube.common.core.scope.GCUBEScope scope)
          Start a transfer of Data represented by the given pattern and SourceIDs to the data Storage represented by the given outputStorageId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

public org.gcube.common.core.utils.logging.GCUBEClientLog logger
Constructor Detail

AgentLibrary

public AgentLibrary(org.gcube.common.core.scope.GCUBEScope scope,
                    org.gcube.common.core.security.GCUBESecurityManagerImpl... secManager)
             throws Exception
Creates an Agent Library to access an Agent Service on the given scope

Parameters:
scope - the scope
Throws:
Exception - exception

AgentLibrary

public AgentLibrary(org.gcube.common.core.scope.GCUBEScope scope,
                    String endpoint,
                    String port,
                    org.gcube.common.core.security.GCUBESecurityManagerImpl... secManager)
             throws Exception
Creates an Agent Library to access the given instance of Agent Service

Parameters:
scope - Agent service scope
endpoint - endpoint
port - port
Throws:
Exception - Exception
Method Detail

startTransfer

public String startTransfer(org.gcube.data.trees.patterns.TreePattern patternInput,
                            String inputSourceID,
                            String outputStorageId,
                            org.gcube.common.core.scope.GCUBEScope scope)
                     throws Exception
Start a transfer of Data represented by the given pattern and SourceIDs to the data Storage represented by the given outputStorageId

Parameters:
patternInput -
inputSourceID -
outputSourceId -
scope -
Returns:
the ID of the transfer;
Throws:
Exception

cancelTransfer

public void cancelTransfer(String transferId,
                           boolean forceCancel)
                    throws Exception
Cancel a scheduled/running transfer

Parameters:
transferId -
forceStop - cancel the transfer even if it's running
Throws:
Exception

copyLocalFiles

public ArrayList<FileTransferOutcome> copyLocalFiles(File[] inputFiles,
                                                     File destinationFolder,
                                                     boolean overwrite)
                                              throws Exception
Parameters:
inputFiles -
destinationFolder -
overwrite -
Returns:
an Array of FileTransferOutcome
Throws:
Exception


Copyright © 2012. All Rights Reserved.