ExecutorCall
Date: 2013-05-21

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.gcube.vremanagement.executor.stubs
Class ExecutorCall

    java.lang.Object
      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)

Constructor Summary
`ExecutorCall(java.lang.String taskName, GCUBEScope scope, GCUBESecurityManager... securityManager)` Creates an instance to launch a given task in a scope and, optionally, using a security manager.

Method Summary
`TaskCall` | `launch()` Launches a task and returns a call to it.
`TaskCall` | `launch(java.util.Map<java.lang.String,java.lang.Object> inputs)` Launches a task with inputs and returns a call to it.
`void` | `setEndpoint(java.lang.String hostname, java.lang.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, setQuery, setTaskProperty`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ExecutorCall

    public ExecutorCall(java.lang.String taskName,
                        GCUBEScope scope,
                        GCUBESecurityManager... securityManager)
                 throws java.lang.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:
    `java.lang.Exception` - if the instance could not be created.

Method Detail

### setEndpoint

    public void setEndpoint(java.lang.String hostname,
                            java.lang.String port)
                     throws java.lang.Exception

  Convenience method to set the target endpoint from host name and port.

  Parameters:
    `hostname` - the host name.
    `port` - the port.
  Throws:
    `java.lang.Exception` - if a reference to the endpoint could not be built from its hostname and port.

### launch

    public TaskCall launch()
                    throws java.lang.Exception,
                           GCUBEException

  Launches a task and returns a call to it.

  Returns:
    the task call.
  Throws:
    `java.lang.Exception` - if the call failed due to a local error.
    `GCUBEException` - if call failed due to remote error.

### launch

    public TaskCall launch(java.util.Map<java.lang.String,java.lang.Object> inputs)
                    throws java.lang.Exception,
                           GCUBEException

  Launches a task with inputs and returns a call to it.

  Parameters:
    `inputs` - the inputs.
  Returns:
    the call.
  Throws:
    `java.lang.Exception` - if the call failed due to a local error.
    `GCUBEException` - if call failed due to remote error.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD