org.ogf.saga.monitoring
Interface AsyncMonitorable<T>

All Superinterfaces:
Monitorable
All Known Subinterfaces:
Stream, StreamServer

public interface AsyncMonitorable<T>
extends Monitorable

This interface defines the task versions of the Monitorable interface. Needed for streams.


Method Summary
 Task<T,Integer> addCallback(TaskMode mode, String name, Callback cb)
          Creates a task that adds a callback to the specified metric.
 Task<T,Metric> getMetric(TaskMode mode, String name)
          Creates a task that obtains a metric instance, identified by name.
 Task<T,String[]> listMetrics(TaskMode mode)
          Creates a task that lists all metrics associated with the object.
 Task<T,Void> removeCallback(TaskMode mode, String name, int cookie)
          Creates a task that removes the specified callback.
 
Methods inherited from interface org.ogf.saga.monitoring.Monitorable
addCallback, getMetric, listMetrics, removeCallback
 

Method Detail

listMetrics

Task<T,String[]> listMetrics(TaskMode mode)
                             throws NotImplementedException
Creates a task that lists all metrics associated with the object.

Parameters:
mode - the task mode.
Returns:
the task.
Throws:
NotImplementedException - is thrown when the task version of this method is not implemented.

getMetric

Task<T,Metric> getMetric(TaskMode mode,
                         String name)
                         throws NotImplementedException
Creates a task that obtains a metric instance, identified by name.

Parameters:
mode - the task mode.
name - the name of the metric to be returned.
Returns:
the task.
Throws:
NotImplementedException - is thrown when the task version of this method is not implemented.

addCallback

Task<T,Integer> addCallback(TaskMode mode,
                            String name,
                            Callback cb)
                            throws NotImplementedException
Creates a task that adds a callback to the specified metric.

Parameters:
mode - the task mode.
name - identifier the metric to which the callback is to be added.
cb - the callback to be added.
Returns:
a handle to be used for removal of the callback.
Throws:
NotImplementedException - is thrown when the task version of this method is not implemented.

removeCallback

Task<T,Void> removeCallback(TaskMode mode,
                            String name,
                            int cookie)
                            throws NotImplementedException
Creates a task that removes the specified callback.

Parameters:
mode - the task mode.
name - identifier the metric from which the callback is to be removed.
cookie - identifies the callback to be removed.
Returns:
the task.
Throws:
NotImplementedException - is thrown when the task version of this method is not implemented.


Copyright © 2014 Open Grid Forum. All rights reserved.