org.gcube.vremanagement.executor.stubs
Class TaskMonitor

java.lang.Object
  extended by org.gcube.vremanagement.executor.stubs.TaskMonitor
All Implemented Interfaces:
org.globus.wsrf.NotifyCallback

public abstract class TaskMonitor
extends Object
implements org.globus.wsrf.NotifyCallback

A monitor of tasks in execution.

Author:
Fabio Simeoni (University of Strathclyde)

Nested Class Summary
static class TaskMonitor.TaskTopic
          Topics relative to task execution.
 
Constructor Summary
TaskMonitor(TaskMonitor.TaskTopic... topics)
          Creates a monitor for one more TaskTopics.
 
Method Summary
 void deliver(List topicPath, org.apache.axis.message.addressing.EndpointReferenceType producer, Object message)
          
 List<TaskMonitor.TaskTopic> getTopics()
          Returns the monitor's topics.
protected  void onOutputChange(TaskProxy proxy)
          Callback on output change.
protected  void onStateChange(TaskProxy proxy)
          Callback on state change.
protected  void subscribe(org.apache.axis.message.addressing.EndpointReferenceType epr)
          Subscribes monitor with remote task.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TaskMonitor

public TaskMonitor(TaskMonitor.TaskTopic... topics)
Creates a monitor for one more TaskTopics.

Parameters:
topics - (optional) the topics (all by default).
Method Detail

getTopics

public List<TaskMonitor.TaskTopic> getTopics()
Returns the monitor's topics.

Returns:
the topics.

subscribe

protected void subscribe(org.apache.axis.message.addressing.EndpointReferenceType epr)
                  throws Exception
Subscribes monitor with remote task.

Throws:
Exception - if the monitor could not be subscribed.

deliver

public void deliver(List topicPath,
                    org.apache.axis.message.addressing.EndpointReferenceType producer,
                    Object message)

Specified by:
deliver in interface org.globus.wsrf.NotifyCallback

onStateChange

protected void onStateChange(TaskProxy proxy)
                      throws Exception
Callback on state change.

Parameters:
proxy - a TaskProxy.
Throws:
Exception

onOutputChange

protected void onOutputChange(TaskProxy proxy)
                       throws Exception
Callback on output change.

Parameters:
proxy - a TaskProxy.
Throws:
Exception


Copyright © 2013. All Rights Reserved.