org.rhq.core.clientapi.agent.operation
Interface OperationAgentService


public interface OperationAgentService

The interface to a JON agent's operation subsystem which allows the server to execute an operation on the agent.


Method Summary
 CancelResults cancelOperation(String jobId)
          Asks that the operation invocation with the given jobId be canceled.
 void invokeOperation(String jobId, int resourceId, String operationName, Configuration parameters)
          Invoke the operation with the specified name.
 

Method Detail

invokeOperation

void invokeOperation(@NotNull
                     String jobId,
                     int resourceId,
                     @NotNull
                     String operationName,
                     @Nullable
                     Configuration parameters)
                     throws PluginContainerException
Invoke the operation with the specified name.

Parameters:
jobId - a unique job id for the invocation - when the agent sends back the result for the invocation, it will include this job id so the server can associate the results with the correct invocation
resourceId - identifies the resource on which the operation should be invoked (either a physical resource or a compatible group)
operationName - the name of the operation
parameters - the parameters for the operation, or null if the operation has no parameters
Throws:
PluginContainerException - if failed to submit the request to the resource for invocation. Note that this is not an indication that the actual operation invocation failed. This method only submits the invocation request - the actual invocation happens asynchronously. The server will be notified via a separate mechanism that the operation invocation failed.

cancelOperation

CancelResults cancelOperation(@NotNull
                              String jobId)
Asks that the operation invocation with the given jobId be canceled.

Parameters:
jobId - identifies the job that is to be canceled
Returns:
the results of the cancelation


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