Hyperic HQ Plugin API v. 4.4.0.2

org.hyperic.hq.agent.server
Interface AgentServerHandler

All Known Implementing Classes:
AgentCommandsServer, AutoinventoryCommandsServer, CommandsServer, ControlCommandsServer, LiveDataCommandsServer, MeasurementCommandsServer

public interface AgentServerHandler

An interface which must be used by any libraries wanting to be hooked into the CommandDispatcher.


Method Summary
 AgentRemoteValue dispatchCommand(java.lang.String cmd, AgentRemoteValue arg, java.io.InputStream inStream, java.io.OutputStream outStream)
          dispatchCommand is the method used to invoke any command, previously retrieved via getCommandSet.
 AgentAPIInfo getAPIInfo()
          Get information about the API, including the version number, which is used to ensure that remote APIs match up with local APIs.
 java.lang.String[] getCommandSet()
          Get an array of strings with the commands that this handler recognizes.
 void shutdown()
          inform the plugin that it should shutdown.
 void startup(AgentDaemon agent)
          inform the plugin that it should startup.
 

Method Detail

getCommandSet

java.lang.String[] getCommandSet()
Get an array of strings with the commands that this handler recognizes.


getAPIInfo

AgentAPIInfo getAPIInfo()
Get information about the API, including the version number, which is used to ensure that remote APIs match up with local APIs.

Returns:
an AgentAPIInfo object, valid for this server handler.

dispatchCommand

AgentRemoteValue dispatchCommand(java.lang.String cmd,
                                 AgentRemoteValue arg,
                                 java.io.InputStream inStream,
                                 java.io.OutputStream outStream)
                                 throws AgentRemoteException
dispatchCommand is the method used to invoke any command, previously retrieved via getCommandSet. Note that if the inStream and outStream are used, they must be left in a state which the agent can use to communicate exceptions and results back correctly.

Parameters:
cmd - name of the command to execute
arg - argument to pass to the command
inStream - Input stream which can be used to read special command specific data from the remote entity
outStream - Output stream which can be used to write special command specific data to the remote entity.
Returns:
The object which was the result of the method invocation
Throws:
AgentRemoteException - indicating an exception occurred during execution
See Also:
getCommandSet()

startup

void startup(AgentDaemon agent)
             throws AgentStartException
inform the plugin that it should startup. When this method is invoked, a plugin should setup all the internal resources it needs (like helper threads, etc.)

Parameters:
agent - The agent.
Throws:
AgentStartException

shutdown

void shutdown()
inform the plugin that it should shutdown. When this method is invoked, a plugin should cleanup all resources (such as open sockets, threads, etc.).


Hyperic HQ Plugin API v. 4.4.0.2

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