DRBatchProcessor

This is the class to be used for Processing and Forwarding agents. Since they do not differ more than from an output perspective, the system uses the same class for both types. This agent is fed data through the consume method, applies the logic on the data and then either routes it forward in the workflow (processing) or to an external system (forwarding).

  • drain

    Called before the current batch ends. The agent must flush all internal buffers to make sure all pending data has been processed before the transaction is ended. This method is the last point in the batch processing where it is legal for the agent to route data.

    Note!

    This method is typically not useful for a forwarding agent, since a forwarding agent never routes data in the workflow.

  • splittingBatch

    Called when the collector has split the input batch. This is the result of an agent calling DRBatchServerEnv.hintEndBatch. If the agent keeps internal buffers to be flushed differently depending on the nature of the transaction, this method serves as a hint to the drain call.

The following sequence diagram shows in which order methods are called for the Batch Processor.

Sequence diagram for DRBatchProcessor

For examples of processing and forwarding agent plugins, see:

com.digitalroute.devkit.examples.maxmin.*

and

com.digitalroute.devkit.examples.diskforwarding.* (forwarding).