org.ow2.jasmine.probe.collectors
Class JCollectorService

java.lang.Object
  extended by org.ow2.jasmine.probe.collectors.JCollectorService
All Implemented Interfaces:
org.ow2.jasmine.probe.collector.JasmineCollectorService

public abstract class JCollectorService
extends Object
implements org.ow2.jasmine.probe.collector.JasmineCollectorService

Base class for Collector Service. It allows the management of the collectors of a given type corresponding to all the indicators of that type. It allows to find out the properties that must be defined in order to create an indicator of that type.

Author:
durieuxp, danesa

Field Summary
protected  org.ow2.jasmine.probe.JasmineCollectorInfo collectorInfo
          CollectorInfo unique object
protected  org.ow2.util.log.Log logger
          Logger.
protected  List<org.ow2.jasmine.probe.JasminePropertyInfo> properties
          Info about indicator Properties.
 
Constructor Summary
JCollectorService()
           
 
Method Summary
protected  void addCollector(String name, JCollector coll)
          Add a collector instance to the list of collectors corresponding to a given indicator.
abstract  org.ow2.jasmine.probe.collector.JasmineCollector getCollector(org.ow2.jasmine.probe.JasmineIndicator indicator, org.ow2.jasmine.probe.JasmineProbe probe)
          Get the Collector corresponding to a JasmineIndicator.
protected  JCollector getCollector(String name, String probeId)
          Find a collector corresponding to a given indicator and probe
 org.ow2.jasmine.probe.JasmineCollectorInfo getCollectorInfo()
          Get the Information about the Collector
 List<String> getDependantIndicators(org.ow2.jasmine.probe.JasmineIndicator indic)
          Returns the List of indicators used by this indicator.
 List<String> getDependantTargets(org.ow2.jasmine.probe.JasmineIndicator indic)
          Returns the List of targets used by this indicator.
 List<org.ow2.jasmine.probe.JasminePropertyInfo> getPropertiesInfo()
          Deprecated.  
 String getType()
           
 void removeCollectors(String name, String probeId)
          Remove all the collectors (if name and probeId are both null) - called when the service stopped.
 void removeTarget(String name)
          Remove a target.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected org.ow2.util.log.Log logger
Logger.


properties

protected List<org.ow2.jasmine.probe.JasminePropertyInfo> properties
Info about indicator Properties. TODO Set an ArrayList to be conform to JasmineCollectorInfo (mapping issue ?) warning: the MXBean should be conform ! (ArrayList may cause problem)


collectorInfo

protected org.ow2.jasmine.probe.JasmineCollectorInfo collectorInfo
CollectorInfo unique object

Constructor Detail

JCollectorService

public JCollectorService()
Method Detail

getCollector

public abstract org.ow2.jasmine.probe.collector.JasmineCollector getCollector(org.ow2.jasmine.probe.JasmineIndicator indicator,
                                                                              org.ow2.jasmine.probe.JasmineProbe probe)
                                                                       throws org.ow2.jasmine.probe.collector.JasmineCollectorException
Get the Collector corresponding to a JasmineIndicator. Create it if necessary.

Specified by:
getCollector in interface org.ow2.jasmine.probe.collector.JasmineCollectorService
Parameters:
indicator - the given indicator's definition
probe - the definition of the probe in which the indicator is used
Returns:
a Collector instance corresponding to the given indicator
Throws:
org.ow2.jasmine.probe.collector.JasmineCollectorException

removeCollectors

public void removeCollectors(String name,
                             String probeId)
Remove all the collectors (if name and probeId are both null) - called when the service stopped. Remove all the collectors attached to a given indicator (name not null, probeId null) - called when an indicator is removed, or has changed. Remove the collector corresponding to a given indicator and a given probe.

Specified by:
removeCollectors in interface org.ow2.jasmine.probe.collector.JasmineCollectorService
Parameters:
name - Indicator name
probeId - Probe identifier

removeTarget

public void removeTarget(String name)
Remove a target. This operation has no effect by on collector services which use implicit targets.

Specified by:
removeTarget in interface org.ow2.jasmine.probe.collector.JasmineCollectorService
Parameters:
name - the name of the target to remove

addCollector

protected void addCollector(String name,
                            JCollector coll)
Add a collector instance to the list of collectors corresponding to a given indicator.

Parameters:
name - indicator name
coll - collector instance

getCollector

protected JCollector getCollector(String name,
                                  String probeId)
Find a collector corresponding to a given indicator and probe

Parameters:
name - indicator name
probeId - probe id
Returns:
return the first collector corresponding to the given indicator and probe

getPropertiesInfo

public List<org.ow2.jasmine.probe.JasminePropertyInfo> getPropertiesInfo()
Deprecated. 

Retrieve the description of all specific properties hidden in JasmineIndicator Return a Map of all properties with their description

Specified by:
getPropertiesInfo in interface org.ow2.jasmine.probe.collector.JasmineCollectorService
Returns:
a Map of property descriptions

getCollectorInfo

public org.ow2.jasmine.probe.JasmineCollectorInfo getCollectorInfo()
Get the Information about the Collector

Specified by:
getCollectorInfo in interface org.ow2.jasmine.probe.collector.JasmineCollectorService
Returns:
JasmineIndicatorTypeInfo

getDependantIndicators

public List<String> getDependantIndicators(org.ow2.jasmine.probe.JasmineIndicator indic)
Returns the List of indicators used by this indicator. This default version return an empty list.

Specified by:
getDependantIndicators in interface org.ow2.jasmine.probe.collector.JasmineCollectorService
Parameters:
indic - JasmineIndicator
Returns:
Returns the List of indicators used by this indicator.

getDependantTargets

public List<String> getDependantTargets(org.ow2.jasmine.probe.JasmineIndicator indic)
Returns the List of targets used by this indicator. This default version return an empty list.

Specified by:
getDependantTargets in interface org.ow2.jasmine.probe.collector.JasmineCollectorService
Parameters:
indic - JasmineIndicator
Returns:
Returns the List of targets used by this indicator.

getType

public String getType()


Copyright © 2013 OW2 Consortium. All Rights Reserved.