Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Aperi Agent R2 Extensibility

Revision as of 18:06, 22 January 2007 by Laverone.us.ibm.com (Talk | contribs) (Initial version: Work in progress)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Data Agent

How do you add function to the Agent?

  • Request handler - A request handler is a function that responds to a particular type of request. A request always includes a reference to a org.eclipse.aperi.request.Request object and the request handler always responds by updating a reference to a org.eclipse.aperi.request.Response object. A request handler can be added to the agent using the org.eclipse.aperi.agent.data.requestHandler extension point.
    • Example: Request Handler 1
  • Job - The Aperi agent provides an request handler implementation that performs tasks common to all jobs. It creates a job log and interacts with the scheduler so the job status and log files can be displayed in the GUI. A job can be added to the agent using the org.eclipse.aperi.agent.data.job extension point. Current examples of agent jobs are filesystem probe, org.eclipse.aperi.agent.probe.ExecProbe, discovery, org.eclipse.aperi.agent.discovery.ExecDiscovery, and batch reports, org.eclipse.aperi.agent.report.ExecReport.
  • Subprocess - The agent spawns a few threads at startup to handle functions that are independent of request handlers and jobs described above. For lack of a better term, I'm calling these threads subprocesses. These threads are started by the start(BundleContext context) method of the bundle activator and stopped by the stop(BundleContext context) method of the bundle activator.
    Current examples of subprocesses are the Reporter, org.eclipse.aperi.agent.reporter.Reporter, the Uptime Poller, org.eclipse.aperi.agent.probe.UpTime, and the Microsoft Cluster Event Listener, org.eclipse.aperi.agent.svp.Agent.MSCSEventListener. All of these are started as user threads from the init() method of the Agent class, org.eclipse.aperi.agent.svp.Agent, and stopped in the bundle activator.

How should an agent initiate communication with the server?

  • Use the org.eclipse.aperi.agent.reporter.Reporter class. You won't need to know the server's contact information (hostname and port) and if the server is backlogged the reporter will retry the request.
    • Example: Reporter

Can an agent send a request to another agent?

  • An agent should never contact another agent. It should only contact the server.

Back to the top