Overview | Package | Class | Tree | Deprecated | Index | Help
| Hyperic HQ Plugin API v. 4.4.0.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hyperic.hq.agent.client
Class AgentCommandsClientImpl

    java.lang.Object
      org.hyperic.hq.agent.client.AbstractCommandsClient
          org.hyperic.hq.agent.client.AgentCommandsClientImpl

All Implemented Interfaces:
  AgentCommandsClient

    public class AgentCommandsClientImpl

extends AbstractCommandsClient
implements AgentCommandsClient

The Agent Commands client that uses the new transport.

Field Summary

Fields inherited from class org.hyperic.hq.agent.client.AbstractCommandsClient
`_log`

Constructor Summary
`AgentCommandsClientImpl(Agent agent, AgentProxyFactory factory)`
`AgentCommandsClientImpl(AgentProxyFactory factory, java.lang.String agentAddress, int agentPort, boolean unidirectional)` This constructor should only be used during agent registration where the agent doesn't yet know its agent token and the Agent pojo has not yet been persisted on the server.

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.

Methods inherited from class org.hyperic.hq.agent.client.AbstractCommandsClient
`getAgent, getAsynchronousProxy, getSynchronousProxy, safeDestroyService`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AgentCommandsClientImpl

    public AgentCommandsClientImpl(Agent agent,
                                   AgentProxyFactory factory)

### AgentCommandsClientImpl

    public AgentCommandsClientImpl(AgentProxyFactory factory,
                                   java.lang.String agentAddress,
                                   int agentPort,
                                   boolean unidirectional)

  This constructor should only be used during agent registration where the agent doesn't yet know its agent token and the Agent pojo has not yet been persisted on the server.

Method Detail

### agentSendFileData

    public FileDataResult[] agentSendFileData(FileData[] destFiles,
                                              java.io.InputStream[] streams)
                                       throws AgentRemoteException,
                                              AgentConnectionException

  Description copied from interface: `AgentCommandsClient`
  Send file data to a remote agent

  Specified by:
    `agentSendFileData` in interface `AgentCommandsClient`
  Parameters:
    `destFiles` - Info about the file data to send
  Throws:
    `AgentRemoteException`
    `AgentConnectionException`
  See Also:
    `AgentCommandsClient.agentSendFileData(org.hyperic.hq.agent.FileData[], java.io.InputStream[])`

### die

    public void die()
             throws AgentRemoteException,
                    AgentConnectionException

  Description copied from interface: `AgentCommandsClient`
  Tell the agent to die.

  Specified by:
    `die` in interface `AgentCommandsClient`
  Throws:
    `AgentRemoteException` - indicating the server failed to understand our request.
    `AgentConnectionException` - indicating an error connecting to or communicating with the agent.
  See Also:
    `AgentCommandsClient.die()`

### ping

    public long ping()
              throws AgentRemoteException,
                     AgentConnectionException

  Description copied from interface: `AgentCommandsClient`
  Send a ping to the agent. This routine records the time the request is sent, and returns the round-trip time to the caller.

  Specified by:
    `ping` in interface `AgentCommandsClient`
  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.
  See Also:
    `AgentCommandsClient.ping()`

### getCurrentAgentBundle

    public java.lang.String getCurrentAgentBundle()
                                           throws AgentRemoteException,
                                                  AgentConnectionException

  Description copied from interface: `AgentCommandsClient`
  Return the bundle that the agent is currently running.

  Specified by:
    `getCurrentAgentBundle` in interface `AgentCommandsClient`
  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.
  See Also:
    `AgentCommandsClient.getCurrentAgentBundle()`

### upgrade

    public java.util.Map upgrade(java.lang.String tarFile,
                                 java.lang.String destination)
                          throws AgentRemoteException,
                                 AgentConnectionException

  Description copied from interface: `AgentCommandsClient`
  Tell the agent to upgrade itself upon JVM restart.

  Specified by:
    `upgrade` in interface `AgentCommandsClient`
  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.
  See Also:
    `AgentCommandsClient.upgrade(java.lang.String, java.lang.String)`

### restart

    public void restart()
                 throws AgentRemoteException,
                        AgentConnectionException

  Description copied from interface: `AgentCommandsClient`
  Tell the agent to restart.

  Specified by:
    `restart` in interface `AgentCommandsClient`
  Throws:
    `AgentRemoteException` - indicating the server failed to understand our request.
    `AgentConnectionException` - indicating an error connecting to or communicating with the agent.
  See Also:
    `AgentCommandsClient.restart()`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Hyperic HQ Plugin API v. 4.4.0.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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