org.gcube.vremanagement.executor.stubs
Class ExecutorCall
java.lang.Object
org.gcube.common.core.utils.calls.GCUBECall<org.gcube.common.core.informationsystem.client.queries.WSResourceQuery>
org.gcube.common.core.utils.calls.WSCall
org.gcube.vremanagement.executor.stubs.BaseCall
org.gcube.vremanagement.executor.stubs.ExecutorCall
public class ExecutorCall
- extends BaseCall
A high-level call for launching a task in a given scope.
The call can work with known Executor instances.
Alternatively, it may do its best to find one that hosts the task.
It may be used repeatedly and it will remember the Executor instance previously used.
- Author:
- Fabio Simeoni (University of Strathclyde)
| Nested classes/interfaces inherited from class org.gcube.common.core.utils.calls.WSCall |
org.gcube.common.core.utils.calls.WSCall.WSCallHandler |
| Nested classes/interfaces inherited from class org.gcube.common.core.utils.calls.GCUBECall |
org.gcube.common.core.utils.calls.GCUBECall.ResultHolder<RESULT> |
| Fields inherited from class org.gcube.common.core.utils.calls.GCUBECall |
clients, logger |
|
Constructor Summary |
ExecutorCall(String taskName,
org.gcube.common.core.scope.GCUBEScope scope,
org.gcube.common.core.security.GCUBESecurityManager... securityManager)
Creates an instance to launch a given task in a scope and, optionally, using a security manager. |
| Methods inherited from class org.gcube.common.core.utils.calls.WSCall |
getInitQuery |
| Methods inherited from class org.gcube.common.core.utils.calls.GCUBECall |
findPortType, getEndpointReference, getLogger, getRIQuery, getScopeManager, getSecurityManager, setEndpointReference, setLogger, setScopeManager, setSecurityManager |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExecutorCall
public ExecutorCall(String taskName,
org.gcube.common.core.scope.GCUBEScope scope,
org.gcube.common.core.security.GCUBESecurityManager... securityManager)
throws Exception
- Creates an instance to launch a given task in a scope and, optionally, using a security manager.
- Parameters:
taskName - the name of the task.scope - the scope.securityManager - (optional) the security manager.
- Throws:
Exception - if the instance could not be created.
getPortTypeName
protected String getPortTypeName()
-
- Specified by:
getPortTypeName in class org.gcube.common.core.utils.calls.GCUBECall<org.gcube.common.core.informationsystem.client.queries.WSResourceQuery>
setEndpoint
public void setEndpoint(String hostname,
String port)
throws Exception
- Convenience method to set the target endpoint from host name and port.
- Parameters:
hostname - the host name.port - the port.
- Throws:
Exception - if a reference to the endpoint could not be built from its hostname and port.
launch
public TaskCall launch()
throws Exception,
org.gcube.common.core.faults.GCUBEException
- Launches a task and returns a call to it.
- Returns:
- the task call.
- Throws:
Exception - if the call failed due to a local error.
org.gcube.common.core.faults.GCUBEException - if call failed due to remote error.
launch
public TaskCall launch(Map<String,Object> inputs)
throws Exception,
org.gcube.common.core.faults.GCUBEException
- Launches a task with inputs and returns a call to it.
- Parameters:
inputs - the inputs.
- Returns:
- the call.
- Throws:
Exception - if the call failed due to a local error.
org.gcube.common.core.faults.GCUBEException - if call failed due to remote error.
Copyright © 2013. All Rights Reserved.