net.sf.infrared.agent.transport
Class CentralizedCollectionStrategy

java.lang.Object
  extended bynet.sf.infrared.agent.transport.CentralizedCollectionStrategy
All Implemented Interfaces:
CollectionStrategy

public class CentralizedCollectionStrategy
extends Object
implements CollectionStrategy

The CollectionStrategy impelementation, creates the Aggregator, Forwarder & FlushPolicy appropriate for infraRED to send statistics collected to a stand-alone infrared web application.


Constructor Summary
CentralizedCollectionStrategy()
           
 
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.
 Aggregator getAggregator()
           
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CentralizedCollectionStrategy

public CentralizedCollectionStrategy()
Method Detail

init

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

Specified by:
init in interface CollectionStrategy
Returns:

collect

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

Specified by:
collect in interface CollectionStrategy
Parameters:
stats - - statistics object that needs to be
Returns:
true if the operation succeded other wise false

suspend

public void suspend()
Description copied from interface: CollectionStrategy
Suspend statistics collection

Specified by:
suspend in interface CollectionStrategy

resume

public void resume()
Description copied from interface: CollectionStrategy
Resume statistics collection

Specified by:
resume in interface CollectionStrategy

getAggregator

public Aggregator getAggregator()

destroy

public boolean destroy()
Description copied from interface: CollectionStrategy
Destroy the strategy, bring the flush policy etc down.

Specified by:
destroy in interface CollectionStrategy
Returns: