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.
Difference between revisions of "Example: Aperi Agent Request Handler"
m |
m (Linked example) |
||
Line 6: | Line 6: | ||
# Extract the latest 0.2 code to your Eclipse workspace. | # Extract the latest 0.2 code to your Eclipse workspace. | ||
− | # Download the [[ | + | # Download the [[media:Aperi_Example_AgentRequestHandler.zip | example code]]. |
# Import the sample | # Import the sample | ||
#* File \-> Import \-> Existing Projects into Workspace | #* File \-> Import \-> Existing Projects into Workspace |
Revision as of 13:20, 23 January 2007
Example Request Handler
This example shows how a 3rd party plugin can contribute a request handler to the Aperi agent. The example handler writes "Hello World\!" to the agent log. The example also includes the client code necessary to exercise the handler.
Instructions
- Extract the latest 0.2 code to your Eclipse workspace.
- Download the example code.
- Import the sample
- File \-> Import \-> Existing Projects into Workspace
- Import both projects from the archive and click finish.
- Run the Example_AgentRequestHandler launch configuration. Note: Compare this launch configuration with the "RunAperiAgent" launch configuration. It should be the same as the agent launch configuration with the addition of the "Example_AgentRequestHandler" bundle.
- Run the Example_AgentRequestHandler_Client launch configuration.
- The console should output the message, "Request completed successfully.". If it does, check the agent log for the message, "HWM0001I: Hello World!".
- If the console displays an exception (1) check that the agent started successfully (2) correct the hostname and port information in the "example.AgentRequestHandler.client.Application" class.