The project uses JAXB through the Maven plugin cxf-xjc-plugin to generate classes from XML schema.
The plugin uses Log4j for logging. Each project which links to this project must provide a Log4j configuration which is accessible at runtime as a result of the build process.
For testing the project uses the Log4j configuration supplied by the pineapple-test-utils project.
The plugin contains a configuration file which defines a Spring application context. The Spring application context defines the input unmarshalling for the plugin. The file is located in src/main/resources/com.alpha.pineapple.plugin.agent-config.xml.
The package com.alpha.pineapple.plugin.agent is the root package of the plugin and contains the plugin class PluginImpl.
Furthermore the package contains the interface AgentConstants which constant used by the plugin.
The package com.alpha.pineapple.plugin.agent.session contains the session classes for the plugin:
The package com.alpha.pineapple.plugin.agent.operation contains the operation classes for the plugin.
The plugin implement these default operations:
The package com.alpha.pineapple.plugin.agent.model contains model mapper classes for mapping values from the plugin model (e.g. the schema generated classes) to the command contexts:
The plugin application configures the Spring REST client RestTemplate.
RestTemplate is configured with these message converters which supports conversion from and to HTTP requests and responses:
RestTemplate is configured with the SimpleClientHttpRequestFactory in streaming mode ( bufferRequestBody = false) to support upload of large modules (1+ GB) by avoid loading the module into memory prior to uploading it.
The package com.alpha.pineapple.plugin.agent.utils contains classes to improve the error handling from for RestTemlpate:
The package com.alpha.pineapple.plugin.agent.command contains Chain commands which invokes REST services at agents, the exact semantics of these services are described in the REST API documentation:
Finally, some exceptions are defined:
The commands invokes REST services a agents, the exact semantics of these services are described in the REST API documentation:
Creates a new environment at a remote agent by invoking the Create Environment REST service.
Distributes a module which is known to this Pineapple instance, e.g. is registered with the module repository. The command zip's the module and then uploads it to a remote agent by invoking the Upload Module REST service. At the agent, the module is unzipped and installed in Pineapple ready for usage.
Executes a operation at the remote Pineapple instance. The algorithm is:
Mapping of results from the received model results are implemented by the class ExecutionResultMapper in the Pineapple API project.
Refreshes the environment configuration and reinitializes the core component at the remote Pineapple instance by invoking Refresh Environment Configuration REST service. At the agent, the core component is reinitialized and thus refreshes the environment configuration in the process.
Schedules operation at a remote agent by invoking the Schedule Operation REST service.
Schedules operation at a remote agent by invoking the Delete Scheduled Operation REST service.
Schedules operation at a remote agent by invoking the Delete Scheduled Operations REST service.