Interaction with Agent and Repository using the Console API

An application that uses the Configuration Object API often needs to retrieve, update, or replace such configuration objects. To retrieve and send the configuration objects from the application to the agent or repository, the application needs to use the Console API.

Note 

When an agent is running in the repository configuration mode, configuration objects (such as a rulebase or schedule) updated on the agent are not permanent and the rulebase map can only be updated on a repository.

The following steps illustrate one possible way that an application using the Console API and Configuration Object API can update a configuration object of an agent or repository.

1. Create a TIBHawkConsole.
2. Listen to AgentMonitorEvent of the AgentMonitor.
3. Wait until the AgentMonitorEvent from the desire agent is received by examining the AgentInstance of the AgentMonitorEvent.
4. Retrieve the MicroAgentID of the RulebaseEngine or Repository from the AgentInstance.
5. Retrieve the configuration object from the RulebaseEngine or Repository microagent using the AgentManager.
6. Update or modified the configuration object.
7. Update the configuration object on the RulebaseEngine or Repository microagent.

For convenience, the rest of this section lists the methods in RulebaseEngine and Repository microagent that are useful for retrieving and updating Rulebase, Schedule, and Rulebase Map. The complete list of methods can be found in the TIBCO Hawk Methods Reference.

For details and code samples, refer to the Java sample descriptions in Sample Programs , and the sample Java files described there.

For details on TIBHawkConsole, AgentMonitor, AgentMonitorEvent, AgentInstance, and other Console API classes, please refer to Console API .