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.
Aperi Agent R2 Extensibility
This page provides information on how to extend the functionality provided by Aperi agents. The sections within this page are organized as a series of HOWTOs to help you get started quickly with extending agents. These instructions assume you have knowledge of key Equinox / OSGi concepts (e.g., plugins, extension points, etc.), as well as a basic understanding of Aperi’s architecture.
As with all software projects, Aperi will evolve over time. However, the content of this page is specific to its 0.2 release will evolve in response to the needs of Aperi developers. Please share any questions, comments, and concerns on the Aperi Development mailing list (https://dev.eclipse.org/mailman/listinfo/aperi-dev) or the Aperi newsgroup (http://www.eclipse.org/newsgroups/index_project.php).
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 an org.eclipse.aperi.request.Request object. The request handler responds by updating a reference to an 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
- Job: The Aperi agent provides a 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
- batch reports: org.eclipse.aperi.agent.report.ExecReport.
- Subprocess: The agent spawns threads at startup to handle functions that are independent of request handlers and jobs described above. We refer to these threads as "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:
- Reporter: org.eclipse.aperi.agent.reporter.Reporter
- Uptime Poller: org.eclipse.aperi.agent.probe.UpTime
- Microsoft Cluster Event Listener: org.eclipse.aperi.agent.svp.Agent.MSCSEventListener
All of these subprocesses 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 do not need to know the server's contact information (hostname and port). If the server is backlogged the reporter will retry the request.
Can an agent send a request to another agent?
An agent should never contact another agent. It should only contact the server.