org.rhq.enterprise.server.agentclient
Interface AgentClient

All Known Implementing Classes:
AgentClientImpl

public interface AgentClient

The client interface to a JON agent - used by the JON server to send commands to the various agent subsystems. If you want to know all the things the JON Server can command the JON agent to do, study this interface and the Agent Services it provides.


Method Summary
 org.rhq.core.domain.resource.Agent getAgent()
          Returns the agent domain object which provides the information about the agent.
 BundleAgentService getBundleAgentService()
           
 ConfigurationAgentService getConfigurationAgentService()
           
 ContentAgentService getContentAgentService()
           
 DiscoveryAgentService getDiscoveryAgentService()
           
 DriftAgentService getDriftAgentService()
           
 MeasurementAgentService getMeasurementAgentService()
           
 OperationAgentService getOperationAgentService()
           
 ResourceFactoryAgentService getResourceFactoryAgentService()
           
 SupportAgentService getSupportAgentService()
           
 boolean ping(long timeoutMillis)
          Returns true if the agent is up and this client can communicate with it.
 void startSending()
          Puts this agent client in "sending mode" which enables this client to begin sending messages to the agent.
 void stopSending()
          Stops the agent client from sending messages.
 

Method Detail

getAgent

org.rhq.core.domain.resource.Agent getAgent()
Returns the agent domain object which provides the information about the agent.

Returns:
agent information

startSending

void startSending()
Puts this agent client in "sending mode" which enables this client to begin sending messages to the agent. Calling this method will immediately begin sending messages that were flagged as guaranteed delivery and have yet to be successfully sent (that is, messages spooled will be flushed out to the agent).


stopSending

void stopSending()
Stops the agent client from sending messages. Any messages sent asynchronously with guaranteed delivery will be spooled and sent the next time an agent client is started.


ping

boolean ping(long timeoutMillis)
Returns true if the agent is up and this client can communicate with it. This will return false if, for any reason, the agent cannot be pinged (which could mean the agent is down, or a network problem has occurred that prohibits the client from reaching the agent).

Parameters:
timeoutMillis - the amount of time, in milliseconds, the caller wants to wait before considering the agent down
Returns:
true if the agent can be pinged; false if this client cannot communicate with the agent for some reason

getBundleAgentService

BundleAgentService getBundleAgentService()

getContentAgentService

ContentAgentService getContentAgentService()

getResourceFactoryAgentService

ResourceFactoryAgentService getResourceFactoryAgentService()

getDiscoveryAgentService

DiscoveryAgentService getDiscoveryAgentService()

getMeasurementAgentService

MeasurementAgentService getMeasurementAgentService()

getOperationAgentService

OperationAgentService getOperationAgentService()

getConfigurationAgentService

ConfigurationAgentService getConfigurationAgentService()

getSupportAgentService

SupportAgentService getSupportAgentService()

getDriftAgentService

DriftAgentService getDriftAgentService()


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