org.ogf.saga.monitoring
Interface Metric

All Superinterfaces:
Attributes, Cloneable, SagaObject

public interface Metric
extends SagaObject, Attributes

Metrics represent monitorable entities.


Field Summary
static String DESCRIPTION
          Attribute name: description of the metric (ReadOnly).
static String MODE
          Attribute name: access mode of the metric (ReadOnly).
static String NAME
          Attribute name: name of the metric (ReadOnly).
static String TYPE
          Attribute name: value type of the metric (ReadOnly).
static String UNIT
          Attribute name: unit of the metric (ReadOnly).
static String VALUE
          Attribute name: value of the metric (See MODE).
 
Fields inherited from interface org.ogf.saga.SagaObject
NO_WAIT, WAIT_FOREVER
 
Fields inherited from interface org.ogf.saga.attributes.Attributes
BOOL, ENUM, FALSE, FLOAT, INT, STRING, TIME, TRIGGER, TRUE
 
Method Summary
 int addCallback(Callback cb)
          Adds the specified callback to the metric.
 void fire()
          Pushes a new metric value to the backend.
 void removeCallback(int cookie)
          Removes a callback from the metric.
 
Methods inherited from interface org.ogf.saga.SagaObject
clone, getId, getSession
 
Methods inherited from interface org.ogf.saga.attributes.Attributes
existsAttribute, findAttributes, getAttribute, getVectorAttribute, isReadOnlyAttribute, isRemovableAttribute, isVectorAttribute, isWritableAttribute, listAttributes, removeAttribute, setAttribute, setVectorAttribute
 

Field Detail

NAME

static final String NAME
Attribute name: name of the metric (ReadOnly).

See Also:
Constant Field Values

DESCRIPTION

static final String DESCRIPTION
Attribute name: description of the metric (ReadOnly).

See Also:
Constant Field Values

MODE

static final String MODE
Attribute name: access mode of the metric (ReadOnly). Possible values: "ReadOnly", "ReadWrite", or "Final". This determines what can be done with the VALUE attribute.

See Also:
Constant Field Values

UNIT

static final String UNIT
Attribute name: unit of the metric (ReadOnly).

See Also:
Constant Field Values

TYPE

static final String TYPE
Attribute name: value type of the metric (ReadOnly). Possible values: "String", "Int", "Enum", "Float", "Bool", "Time", "Trigger".

See Also:
Constant Field Values

VALUE

static final String VALUE
Attribute name: value of the metric (See MODE).

See Also:
Constant Field Values
Method Detail

addCallback

int addCallback(Callback cb)
                throws NotImplementedException,
                       AuthenticationFailedException,
                       AuthorizationFailedException,
                       PermissionDeniedException,
                       IncorrectStateException,
                       TimeoutException,
                       NoSuccessException
Adds the specified callback to the metric.

Parameters:
cb - the callback to add.
Returns:
the cookie that identifies the callback in the metric.
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.
IncorrectStateException - is thrown if the metric is "Final".
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

removeCallback

void removeCallback(int cookie)
                    throws NotImplementedException,
                           BadParameterException,
                           AuthenticationFailedException,
                           AuthorizationFailedException,
                           PermissionDeniedException,
                           TimeoutException,
                           NoSuccessException
Removes a callback from the metric.

Parameters:
cookie - the cookie that identifies the metric.
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.
BadParameterException - is thrown when the specified cookie does not refer to an installed callback.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

fire

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

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.
IncorrectStateException - is thrown when the metric is "Final".
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.