DRAgent(4.3)
DRAgent
is the base class for all agent types.
The getEnv
method returns the runtime environment that will be a DRRealtimeWorkflowEnv
if the workflow is a realtime workflow or a DRBatchWorkflowEnv
for batch workflows. The environment also exists as a protected variable called _env
.
The getIdentity
method returns an identity for the agent, which contains the workflow name and the agent name. The identity also exists as a protected variable called _identity
.
The getRouter
method returns the router object responsible for routing raw data or UDRs into the workflow. The router also exists as a protected variable called _router
that is used if many router invocations are expected. The router is explained further in the following section. These methods can be overridden:
consume
Called when data is routed to the agent. This function is not applicable for batch Collection agents. The method is implemented for Processing and Forwarding agents as well as for realtime Collection agents with response capability.
getMIMValue
This method is called for agents that publishes at least one MIM value. The entry whose value is to be returned, is given as an argument, and the agent must return the value for the given entry. Depending on the workflow and entry type, this function can be called frequently. The agent must therefore consider defining its MIM entries as
static final
to be able to use direct reference comparison in this method. The result must match the types defined in the UDR Type system.deinitialize
Called when the workflow has been stopped and no more calls to
consume
will be performed. The agent must free all resources in this method, such as file and database references.executeCommand
Called when the operator wants to interact with the workflow. Only agents supporting the Dynamic Commands functionality need to implement this method.
updateConfig
Called when a new version of the workflow is deployed. Currently this is only supported for realtime workflows. This must be implemented if the Inspectable indicates support for updated configurations.