Handler - countProducts

 

Description

This agent keeps two statistics on products it has seen:

It passes these products without modification.

Configuration Variables

productCount
The counter of the number of incoming products which persists through the lifetime of the agent or until the counter is manually reset.

productSize

A running total of the size of products represented in productCount

resetCounts

A write-only attribute that causes productCount and productSize to get reset to zero. To use this set it to true. The value of this attribute will not change but it will have the side-effect of resetting the counts.

Product

The output product is the same product that it receives.

 

Revised: 12 March 1999