An atg.service.statistics.Sampler is configured with a list of service name/property name pairs, naming the properties to be sampled. From this list, the Sampler can generate a SampleEvent containing the current values of those properties. The method sample() generates such a SampleEvent.

A Sampler may also have one or more atg.service.statistics.SampleListener objects added to it. When a Sample is taken, the sample can be broadcast to all of the SampleListener objects by calling acceptSample() on those listeners. Calling sample(true) both generates a new SampleEvent and broadcasts that event to all of the listeners.

A Sampler may also be configured with a Scheduler and Schedule. If so, then the Sampler will automatically call sample(true) according to the specified Schedule.

In summary, the Sampler can be used in the following ways:

 
loading table of contents...