org.ogf.saga.monitoring
Interface Steerable

All Known Subinterfaces:
AsyncSteerable<T>, JobSelf

public interface Steerable

The Steerable interface is implemented by SAGA objects that can be steered (have writable metrics and/or allow to add new metrics).


Method Summary
 boolean addMetric(Metric metric)
          Adds a metric instance to the application instance.
 void fireMetric(String name)
          Pushes a new metric value to the backend.
 void removeMetric(String name)
          Removes a metric instance.
 

Method Detail

addMetric

boolean addMetric(Metric metric)
                  throws NotImplementedException,
                         AuthenticationFailedException,
                         AuthorizationFailedException,
                         PermissionDeniedException,
                         AlreadyExistsException,
                         TimeoutException,
                         NoSuccessException,
                         IncorrectStateException
Adds a metric instance to the application instance.

Parameters:
metric - the metric instance to be added.
Returns:
success or failure.
Throws:
NotImplementedException - is thrown if the implementation does not provide an implementation of this method.
PermissionDeniedException - is thrown when the method failed because the identity used did not have sufficient permissions to perform the operation successfully.
AuthorizationFailedException - is thrown when none of the available contexts of the used session could be used for successful authorization. This error indicates that the resource could not be accessed at all, and not that an operation was not available due to restricted permissions.
AuthenticationFailedException - is thrown when operation failed because none of the available session contexts could successfully be used for authentication.
TimeoutException - is thrown when a remote operation did not complete successfully because the network communication or the remote service timed out.
AlreadyExistsException - is thrown when a metric with the same name already is already known for this object.
IncorrectStateException - is thrown if the object does not support the addition of new metrics.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

removeMetric

void removeMetric(String name)
                  throws NotImplementedException,
                         AuthenticationFailedException,
                         AuthorizationFailedException,
                         PermissionDeniedException,
                         DoesNotExistException,
                         TimeoutException,
                         NoSuccessException,
                         IncorrectStateException
Removes a metric instance.

Parameters:
name - the name of the metric to be removed.
Throws:
NotImplementedException - is thrown if the implementation does not provide an implementation of this method.
PermissionDeniedException - is thrown when the method failed because the identity used did not have sufficient permissions to perform the operation successfully.
AuthorizationFailedException - is thrown when none of the available contexts of the used session could be used for successful authorization. This error indicates that the resource could not be accessed at all, and not that an operation was not available due to restricted permissions.
AuthenticationFailedException - is thrown when operation failed because none of the available session contexts could successfully be used for authentication.
TimeoutException - is thrown when a remote operation did not complete successfully because the network communication or the remote service timed out.
DoesNotExistException - is thrown when a metric with the this name is not known to this object.
IncorrectStateException - is thrown if the object does not support the removal of metrics.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

fireMetric

void fireMetric(String name)
                throws NotImplementedException,
                       AuthenticationFailedException,
                       AuthorizationFailedException,
                       PermissionDeniedException,
                       IncorrectStateException,
                       DoesNotExistException,
                       TimeoutException,
                       NoSuccessException
Pushes a new metric value to the backend.

Parameters:
name - the name of the metric to be fired.
Throws:
NotImplementedException - is thrown if the implementation does not provide an implementation of this method.
PermissionDeniedException - is thrown when the method failed because the identity used did not have sufficient permissions to perform the operation successfully.
AuthorizationFailedException - is thrown when none of the available contexts of the used session could be used for successful authorization. This error indicates that the resource could not be accessed at all, and not that an operation was not available due to restricted permissions.
AuthenticationFailedException - is thrown when operation failed because none of the available session contexts could successfully be used for authentication.
TimeoutException - is thrown when a remote operation did not complete successfully because the network communication or the remote service timed out.
DoesNotExistException - is thrown when a metric with the this name is not known to this object.
IncorrectStateException - is thrown when an attempt is made to fire a "Final" or "ReadOnly" metric.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.


Copyright © 2014 Open Grid Forum. All rights reserved.