com.sun.grid.loadsensor.LoadSensorManager
The LoadSensorManager implements the load sensor protocol. A load sensor can use this class either by instantiating an instance and passing in the LoadSensor implementation instance or by running the LoadSensorManager class directly and passing as an argument the name of the class to be run as the LoadSensor implementation. Once started, the LoadSensorManager instance reads the input from the load sensor framework from stdin and writes commands to stdout. The load sensor protocol is completely encapsulated, however, allowing the LoadSensor implementation to work at the level of name=value pairs for measured load values. The LoadSensorManager will monitor how often it is asked for load values and how long it takes to take a measurement. It will use that information to try to optimally schedule the next measurement. The idea is to run the measurement as late as possible but still have it complete before the next time load values are requested. Alternatively, the load sensor may specify its own measurement interval independent of when the load value requests are made. In that case, the measurements are made in a separate thread, and load value requests are given the last set of load values reported by the measurement thread. The LoadSensorManager class uses the Logger named "com.sun.grid.LoadSensor". By default, the Logger has no handlers installed. In order to enable logging, add a handler, i.e. a FileHandler instance. It is always a good idea to enabling logging, as errors in load sensor protocol handling will be logged as warnings, but will not be visible any other way.
@since 6.2u5