org.rhq.core.clientapi.server.configuration
Interface ConfigurationServerService


public interface ConfigurationServerService

Interface that allows an agent to provide information about a resource's configuration.


Method Summary
 void completeConfigurationUpdate(ConfigurationUpdateResponse response)
          The agent will notify the server when a configuration update request has been completed by calling this method.
 void persistUpdatedResourceConfiguration(int resourceId, Configuration resourceConfiguration)
          This is for when the agent needs to notify the server that a new Resource configuration has been detected on the agent side.
 

Method Detail

completeConfigurationUpdate

@Asynchronous(guaranteedDelivery=true)
void completeConfigurationUpdate(ConfigurationUpdateResponse response)
The agent will notify the server when a configuration update request has been completed by calling this method.

The completed request will contain the final status(for example, ConfigurationUpdateStatus.SUCCESS or ConfigurationUpdateStatus.FAILURE). If an error occurred, the request's error message should be non-null to describe an overall error message and it should have a Configuration with properties that contain error messages that indicate which properties failed to get updated and why. This allows you to indicate all the errors that occurred, in case more than one property was invalid or could not be updated.

If the update was successful, the completedRequest object does not need to have a non-null ConfigurationUpdateResponse.getConfiguration() (to avoid sending a duplicate configuration back over the wire). Therefore, callers can set the configuration to null if the status was ConfigurationUpdateStatus.SUCCESS. When the status is successful, the response's configuration is actually ignored and the original configuration that was sent in the original request will be assumed to have been used (this is why agents can just set the configuration to null when successful - avoid sending it over the wire since this method doesn't even need it.

Parameters:
response - information about the request that was completed (which may have succeeded or failed)

persistUpdatedResourceConfiguration

@Asynchronous(guaranteedDelivery=true)
void persistUpdatedResourceConfiguration(int resourceId,
                                                                        Configuration resourceConfiguration)
This is for when the agent needs to notify the server that a new Resource configuration has been detected on the agent side. This happens when a resource configuration is changed outside of this system and is detected on its regularly scheduled checks for update.

Parameters:
resourceId - the resourceId to update
resourceConfiguration - the newly detected configuration


Copyright © 2008-2009 Red Hat, Inc.. All Rights Reserved.