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

Difference between revisions of "Aperi Agent R2 Extensibility"

(How do you add function to the Agent?: Linked example handler)
m (How should an agent initiate communication with the server?)
Line 13: Line 13:
 
=== How should an agent initiate communication with the server? ===
 
=== 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.
 
* 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: [[Example:_Aperi_Reporter | Reporter ]]
** Example: Reporter
+
  
 
=== Can an agent send a request to another agent? ===
 
=== Can an agent send a request to another agent? ===
 
* An agent should never contact another agent. It should only contact the server.
 
* An agent should never contact another agent. It should only contact the server.

Revision as of 13:37, 23 January 2007

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.
  • 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.

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