org.gcube.vremanagement.executor.stubs
Class TaskProxy

java.lang.Object
  extended by org.gcube.vremanagement.executor.stubs.TaskProxy

public class TaskProxy
extends java.lang.Object

A local call for a remote running task. The call can synchronise its state with the remote task, subscribe monitors to its key changes, and stop its execution.

Author:
Fabio Simeoni (University of Strathclyde)

Constructor Summary
TaskProxy(org.apache.axis.message.addressing.EndpointReferenceType epr)
          Creates an instance from the endpoint of the remote task.
 
Method Summary
 java.lang.String getError()
          Returns the error of the task, if any.
 java.util.Map<java.lang.String,java.lang.Object> getInput()
          Returns the input of the task, if any.
 java.lang.String getLog()
          Returns the log of the task.
 java.util.Map<java.lang.String,java.lang.Object> getOutput()
          Returns the output produced by the task, if any.
 java.util.Calendar getStartTime()
          Returns the start time of the task.
 java.lang.String getState()
          Returns the state of the task.
 TaskDescription getType()
          Returns the type of the task.
 void synchronize()
          Synchronises the proxy with the remote task.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TaskProxy

public TaskProxy(org.apache.axis.message.addressing.EndpointReferenceType epr)
          throws java.lang.Exception
Creates an instance from the endpoint of the remote task.

Parameters:
epr - the endpoint.
Throws:
java.lang.Exception
Method Detail

getState

public java.lang.String getState()
Returns the state of the task.

Returns:
the state.

getLog

public java.lang.String getLog()
Returns the log of the task.

Returns:
the log.

getError

public java.lang.String getError()
Returns the error of the task, if any.

Returns:
the error, or null if the task produced none.

getStartTime

public java.util.Calendar getStartTime()
Returns the start time of the task.

Returns:
the start time.

getOutput

public java.util.Map<java.lang.String,java.lang.Object> getOutput()
Returns the output produced by the task, if any.

Returns:
the output, or null if the task produced none yet.

getInput

public java.util.Map<java.lang.String,java.lang.Object> getInput()
Returns the input of the task, if any.

Returns:
the input, or null if the task had none.

getType

public TaskDescription getType()
Returns the type of the task.

Returns:
the type.

synchronize

public void synchronize()
                 throws java.lang.Exception
Synchronises the proxy with the remote task.

Throws:
java.lang.Exception - if the proxy could not be synchronised.

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object