Hyperic HQ Plugin API v. 4.4.0.2

org.hyperic.hq.autoinventory.agent.server
Class AutoinventoryCommandsServer

java.lang.Object
  extended by org.hyperic.hq.autoinventory.agent.server.AutoinventoryCommandsServer
All Implemented Interfaces:
AgentNotificationHandler, AgentServerHandler, ScanListener

public class AutoinventoryCommandsServer
extends java.lang.Object
implements AgentServerHandler, AgentNotificationHandler, ScanListener


Field Summary
protected  java.lang.String _certDN
           
static long AIREPORT_MAX_SLEEP_WAIT
           
static long AIREPORT_MAX_TRY_TIME
           
 
Constructor Summary
AutoinventoryCommandsServer()
           
 
Method Summary
 AgentRemoteValue dispatchCommand(java.lang.String cmd, AgentRemoteValue args, java.io.InputStream in, java.io.OutputStream out)
          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 handleNotification(java.lang.String msgClass, java.lang.String msg)
           
 void scanComplete(ScanState scanState)
          This is where we report our autoinventory-detected data to the EAM server.
protected  void scheduleDefaultScan()
          This is the scan that's run when the agent first starts up, and periodically thereafter.
 void shutdown()
          inform the plugin that it should shutdown.
 void startup(AgentDaemon agent)
          inform the plugin that it should startup.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AIREPORT_MAX_SLEEP_WAIT

public static final long AIREPORT_MAX_SLEEP_WAIT
See Also:
Constant Field Values

AIREPORT_MAX_TRY_TIME

public static final long AIREPORT_MAX_TRY_TIME
See Also:
Constant Field Values

_certDN

protected java.lang.String _certDN
Constructor Detail

AutoinventoryCommandsServer

public AutoinventoryCommandsServer()
Method Detail

getAPIInfo

public AgentAPIInfo getAPIInfo()
Description copied from interface: AgentServerHandler
Get information about the API, including the version number, which is used to ensure that remote APIs match up with local APIs.

Specified by:
getAPIInfo in interface AgentServerHandler
Returns:
an AgentAPIInfo object, valid for this server handler.

getCommandSet

public java.lang.String[] getCommandSet()
Description copied from interface: AgentServerHandler
Get an array of strings with the commands that this handler recognizes.

Specified by:
getCommandSet in interface AgentServerHandler

dispatchCommand

public AgentRemoteValue dispatchCommand(java.lang.String cmd,
                                        AgentRemoteValue args,
                                        java.io.InputStream in,
                                        java.io.OutputStream out)
                                 throws AgentRemoteException
Description copied from interface: AgentServerHandler
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.

Specified by:
dispatchCommand in interface AgentServerHandler
Parameters:
cmd - name of the command to execute
args - argument to pass to the command
in - Input stream which can be used to read special command specific data from the remote entity
out - 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:
AgentServerHandler.getCommandSet()

startup

public void startup(AgentDaemon agent)
             throws AgentStartException
Description copied from interface: AgentServerHandler
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.)

Specified by:
startup in interface AgentServerHandler
Parameters:
agent - The agent.
Throws:
AgentStartException

handleNotification

public void handleNotification(java.lang.String msgClass,
                               java.lang.String msg)
Specified by:
handleNotification in interface AgentNotificationHandler

scheduleDefaultScan

protected void scheduleDefaultScan()
This is the scan that's run when the agent first starts up, and periodically thereafter. This method is called by the ScanManager when the RuntimeAutodiscoverer says it's time for a DefaultScan (by default, every 15 mins)


shutdown

public void shutdown()
Description copied from interface: AgentServerHandler
inform the plugin that it should shutdown. When this method is invoked, a plugin should cleanup all resources (such as open sockets, threads, etc.).

Specified by:
shutdown in interface AgentServerHandler

scanComplete

public void scanComplete(ScanState scanState)
                  throws AutoinventoryException,
                         SystemException
This is where we report our autoinventory-detected data to the EAM server.

Specified by:
scanComplete in interface ScanListener
Parameters:
scanState - The final state of the scan. This object is provided for convenience, as the class implementing this interface will likely already have a way to get to it.
Throws:
AutoinventoryException
SystemException
See Also:
ScanListener.scanComplete(org.hyperic.hq.autoinventory.ScanState)

Hyperic HQ Plugin API v. 4.4.0.2

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