biz.hammurapi.metrics
Class SlicingMeasurementCategoryFactory

java.lang.Object
  extended by biz.hammurapi.metrics.MeasurementCategoryFactory
      extended by biz.hammurapi.metrics.SlicingMeasurementCategoryFactory
All Implemented Interfaces:
Component, DomConfigurable
Direct Known Subclasses:
RemoteSlicingMeasurementCategoryFactory

public class SlicingMeasurementCategoryFactory
extends MeasurementCategoryFactory
implements Component, DomConfigurable

Author:
Pavel Vlasov

Field Summary
protected  org.w3c.dom.Element configElement
           
 
Constructor Summary
SlicingMeasurementCategoryFactory()
           
 
Method Summary
 void configure(org.w3c.dom.Node configNode, Context context)
          Reads configuration from Node
protected  SlicingMeasurementConsumer createMeasurementConsumer(long tick, boolean keepMeasurements, int maxQueue)
          Override this method to create a custom consumer.
protected  SliceConsumer createSliceConsumer()
          Creates a consumer using DomConfigFactory
 MeasurementConsumer getMeasurementConsumer(java.lang.String categoryName)
          Subclasses shall implement this method to bind sinks to category
 void setOwner(java.lang.Object owner)
          Plugs the component into container and naming bus.
 void start()
          Invoked by container before the first use.
 void stop()
          Invoked by container when component is not needed anymore.
 
Methods inherited from class biz.hammurapi.metrics.MeasurementCategoryFactory
getCategory, getCategory, getTimeIntervalCategory, getTimeIntervalCategory, register, register, register, register, unregister, unregister
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

configElement

protected org.w3c.dom.Element configElement
Constructor Detail

SlicingMeasurementCategoryFactory

public SlicingMeasurementCategoryFactory()
Method Detail

start

public void start()
           throws ConfigurationException
Description copied from interface: Component
Invoked by container before the first use. Component shall perform initialization in this method.

Specified by:
start in interface Component
Throws:
ConfigurationException

createSliceConsumer

protected SliceConsumer createSliceConsumer()
                                     throws ConfigurationException
Creates a consumer using DomConfigFactory

Parameters:
cxpa -
factory -
Returns:
Throws:
ConfigurationException
javax.xml.transform.TransformerException

createMeasurementConsumer

protected SlicingMeasurementConsumer createMeasurementConsumer(long tick,
                                                               boolean keepMeasurements,
                                                               int maxQueue)
                                                        throws ConfigurationException
Override this method to create a custom consumer.

Parameters:
tick -
keepMeasurements -
maxQueue -
sliceConsumer -
Returns:
Throws:
ConfigurationException

stop

public void stop()
          throws ConfigurationException
Description copied from interface: Component
Invoked by container when component is not needed anymore. Component shall perform cleanup in this method.

Specified by:
stop in interface Component
Throws:
ConfigurationException

configure

public void configure(org.w3c.dom.Node configNode,
                      Context context)
               throws ConfigurationException
Description copied from interface: DomConfigurable
Reads configuration from Node

Specified by:
configure in interface DomConfigurable
Throws:
ConfigurationException

getMeasurementConsumer

public MeasurementConsumer getMeasurementConsumer(java.lang.String categoryName)
Description copied from class: MeasurementCategoryFactory
Subclasses shall implement this method to bind sinks to category

Specified by:
getMeasurementConsumer in class MeasurementCategoryFactory
Returns:
sink for the category, can be null.

setOwner

public void setOwner(java.lang.Object owner)
Description copied from interface: Component
Plugs the component into container and naming bus.

Specified by:
setOwner in interface Component


Copyright © 2003 Hammurapi Group. All Rights Reserved.