net.sf.infrared.agent.transport
Interface CollectionStrategy

All Known Implementing Classes:
CentralizedCollectionStrategy, LocalCollectionStrategy

public interface CollectionStrategy

InfraRED uses 2 collection strategies for aggregating the performance statistics - remote and local. For either strategy, the statistics object collected at StatisticsCollector is merged with the global Statistics object held in StatisticsMgr. StatisticsMgr is located remotely wrt the target application, in case of remote collection strategy necessitating the use of BufferedAggregator and Periodic Flush Policy. A collection strategy groups an aggregator, forwarder & flush policy. This is to make sure that only compatible versions of each are used together.


Method Summary
 boolean collect(Statistics stats)
          Needs to hanle the collection of statistic objects.
 boolean destroy()
          Destroy the strategy, bring the flush policy etc down.
 boolean init(MonitorConfig configuration)
          Initialize the collection strategy, this methods need to be overridden to create the aggregator, forwarder & the flush policy and tie them together
 void resume()
          Resume statistics collection
 void suspend()
          Suspend statistics collection
 

Method Detail

init

public boolean init(MonitorConfig configuration)
Initialize the collection strategy, this methods need to be overridden to create the aggregator, forwarder & the flush policy and tie them together

Returns:

collect

public boolean collect(Statistics stats)
Needs to hanle the collection of statistic objects. This method will be called after the execution of a request is complete

Parameters:
stats - - statistics object that needs to be
Returns:
true if the operation succeded other wise false

suspend

public void suspend()
Suspend statistics collection


resume

public void resume()
Resume statistics collection


destroy

public boolean destroy()
Destroy the strategy, bring the flush policy etc down.

Returns: