org.gcube.vremanagement.executor.stubs
Class ExecutorCall

java.lang.Object
  extended by org.gcube.common.core.utils.calls.GCUBECall<org.gcube.common.core.informationsystem.client.queries.WSResourceQuery>
      extended by org.gcube.common.core.utils.calls.WSCall
          extended by org.gcube.vremanagement.executor.stubs.BaseCall
              extended by 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 Class Summary
 
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>
 
Field Summary
 
Fields inherited from class org.gcube.vremanagement.executor.stubs.BaseCall
mappings, properties, taskName
 
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.
 
Method Summary
protected  String getPortTypeName()
          
 TaskCall launch()
          Launches a task and returns a call to it.
 TaskCall launch(Map<String,Object> inputs)
          Launches a task with inputs and returns a call to it.
 void setEndpoint(String hostname, String port)
          Convenience method to set the target endpoint from host name and port.
 
Methods inherited from class org.gcube.vremanagement.executor.stubs.BaseCall
getQuery, getServiceClass, getServiceName, setQuery, setTaskProperty
 
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
 

Constructor Detail

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.
Method Detail

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.