uk.co.gidley.jmxmonitor.monitoring
Class MonitoringGroup

java.lang.Object
  extended by uk.co.gidley.jmxmonitor.monitoring.MonitoringGroup
All Implemented Interfaces:
Runnable

public class MonitoringGroup
extends Object
implements Runnable

A monitoring group combines a set of monitors and expressions to output data to a logger


Constructor Summary
MonitoringGroup()
           
 
Method Summary
 String getName()
           
 void initialise(String name, File monitorsConfigurationFile, File expressionsConfigurationFile, long intervalInMilliseconds)
          Called to initialise the monitoring group.
 boolean isAlive()
          The group should respond true unless it knows it has failed
 void run()
          Start monitoring (as a thread) return when stopped
 void setName(String name)
           
 void stop()
          The group should stop at the next opportunity.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MonitoringGroup

public MonitoringGroup()
Method Detail

getName

public String getName()

setName

public void setName(String name)

initialise

public void initialise(String name,
                       File monitorsConfigurationFile,
                       File expressionsConfigurationFile,
                       long intervalInMilliseconds)
                throws InitialisationException
Called to initialise the monitoring group. The group should use this to construct expensive objects, validate configuration and prepare to run.

Parameters:
monitorsConfigurationFile - The monitors file
expressionsConfigurationFile - The expression file
intervalInMilliseconds - The interval to poll in milliseconds
Throws:
InitialisationException

stop

public void stop()
The group should stop at the next opportunity. At most within 5 seconds.


isAlive

public boolean isAlive()
The group should respond true unless it knows it has failed


run

public void run()
Start monitoring (as a thread) return when stopped

Specified by:
run in interface Runnable


Copyright © 2009-2010. All Rights Reserved.