org.ogf.saga.monitoring
Class MonitoringFactory

java.lang.Object
  extended by org.ogf.saga.monitoring.MonitoringFactory

public abstract class MonitoringFactory
extends Object

Factory for objects in the monitoring package.


Constructor Summary
MonitoringFactory()
           
 
Method Summary
static Metric createMetric(String name, String desc, String mode, String unit, String type, String value)
          Constructs a Metric object with the specified parameters.
static Metric createMetric(String sagaFactoryClassname, String name, String desc, String mode, String unit, String type, String value)
          Constructs a Metric object with the specified parameters.
protected abstract  Metric doCreateMetric(String name, String desc, String mode, String unit, String type, String value)
          Constructs a Metric object with the specified parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MonitoringFactory

public MonitoringFactory()
Method Detail

doCreateMetric

protected abstract Metric doCreateMetric(String name,
                                         String desc,
                                         String mode,
                                         String unit,
                                         String type,
                                         String value)
                                  throws NotImplementedException,
                                         BadParameterException,
                                         TimeoutException,
                                         NoSuccessException
Constructs a Metric object with the specified parameters. This method is to be provided by the factory.

Parameters:
name - name of the metric.
desc - description of the metric.
mode - mode of the metric.
unit - unit of the metric value.
type - type of the metric.
value - value of the metric.
Returns:
the metric.
Throws:
NotImplementedException
BadParameterException
TimeoutException
NoSuccessException

createMetric

public static Metric createMetric(String name,
                                  String desc,
                                  String mode,
                                  String unit,
                                  String type,
                                  String value)
                           throws NotImplementedException,
                                  BadParameterException,
                                  TimeoutException,
                                  NoSuccessException
Constructs a Metric object with the specified parameters.

Parameters:
name - name of the metric.
desc - description of the metric.
mode - mode of the metric.
unit - unit of the metric value.
type - type of the metric.
value - value of the metric.
Returns:
the metric.
Throws:
NotImplementedException - is thrown if the implementation does not provide an implementation of this method.
TimeoutException - is thrown when a remote operation did not complete successfully because the network communication or the remote service timed out.
BadParameterException - is thrown on incorrectly formatted 'value' parameter, invalid 'mode' or 'type' parameter, and empty required parameter (all but 'unit').
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

createMetric

public static Metric createMetric(String sagaFactoryClassname,
                                  String name,
                                  String desc,
                                  String mode,
                                  String unit,
                                  String type,
                                  String value)
                           throws NotImplementedException,
                                  BadParameterException,
                                  TimeoutException,
                                  NoSuccessException
Constructs a Metric object with the specified parameters.

Parameters:
sagaFactoryClassname - the class name of the Saga factory to be used.
name - name of the metric.
desc - description of the metric.
mode - mode of the metric.
unit - unit of the metric value.
type - type of the metric.
value - value of the metric.
Returns:
the metric.
Throws:
NotImplementedException - is thrown if the implementation does not provide an implementation of this method.
TimeoutException - is thrown when a remote operation did not complete successfully because the network communication or the remote service timed out.
BadParameterException - is thrown on incorrectly formatted 'value' parameter, invalid 'mode' or 'type' parameter, and empty required parameter (all but 'unit').
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.