Hyperic HQ Plugin API v. 4.4.0.2

org.hyperic.hq.agent.client
Interface AgentCommandsClient

All Known Implementing Classes:
AgentCommandsClientImpl, AgentCommandsService, LegacyAgentCommandsClientImpl

public interface AgentCommandsClient


Method Summary
 FileDataResult[] agentSendFileData(FileData[] destFiles, java.io.InputStream[] streams)
          Send file data to a remote agent
 void die()
          Tell the agent to die.
 java.lang.String getCurrentAgentBundle()
          Return the bundle that the agent is currently running.
 long ping()
          Send a ping to the agent.
 void restart()
          Tell the agent to restart.
 java.util.Map upgrade(java.lang.String tarFile, java.lang.String destination)
          Tell the agent to upgrade itself upon JVM restart.
 

Method Detail

ping

long ping()
          throws AgentRemoteException,
                 AgentConnectionException
Send a ping to the agent. This routine records the time the request is sent, and returns the round-trip time to the caller.

Returns:
the time it took (in milliseconds) for the round-trip time of the request to the agent.
Throws:
AgentRemoteException - indicating the server failed to understand our request.
AgentConnectionException - indicating an error connecting to or communicating with the agent.

restart

void restart()
             throws AgentRemoteException,
                    AgentConnectionException
Tell the agent to restart.

Throws:
AgentRemoteException - indicating the server failed to understand our request.
AgentConnectionException - indicating an error connecting to or communicating with the agent.

die

void die()
         throws AgentRemoteException,
                AgentConnectionException
Tell the agent to die.

Throws:
AgentRemoteException - indicating the server failed to understand our request.
AgentConnectionException - indicating an error connecting to or communicating with the agent.

getCurrentAgentBundle

java.lang.String getCurrentAgentBundle()
                                       throws AgentRemoteException,
                                              AgentConnectionException
Return the bundle that the agent is currently running.

Returns:
The agent bundle name.
Throws:
AgentRemoteException - indicating the server failed to understand our request.
AgentConnectionException - indicating an error connecting to or communicating with the agent.

upgrade

java.util.Map upgrade(java.lang.String tarFile,
                      java.lang.String destination)
                      throws AgentRemoteException,
                             AgentConnectionException
Tell the agent to upgrade itself upon JVM restart.

Parameters:
tarFile - Agent bundle tarball used to update the agent.
destination - Destination directory on the agent where the bundle will reside.
Throws:
AgentRemoteException - indicating the server failed to understand our request.
AgentConnectionException - indicating an error connecting to or communicating with the agent.

agentSendFileData

FileDataResult[] agentSendFileData(FileData[] destFiles,
                                   java.io.InputStream[] streams)
                                   throws AgentRemoteException,
                                          AgentConnectionException
Send file data to a remote agent

Parameters:
destFiles - Info about the file data to send
Throws:
AgentRemoteException
AgentConnectionException

Hyperic HQ Plugin API v. 4.4.0.2

Copyright © 2004-2006 Hyperic, Inc. support@hyperic.net, All Rights Reserved.