AgentConnectionListener (Hyperic HQ Plugin API)
Keywords: org.hyperic.hq.agent.server.AgentConnectionListener class

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.server
Class AgentConnectionListener

    java.lang.Object
      org.hyperic.hq.agent.server.AgentConnectionListener

    public abstract class AgentConnectionListener

extends java.lang.Object

The AgentConnectionListener is an interface for plugins which wish to handle incoming connections & pass them off to the agent.

Constructor Summary
`AgentConnectionListener(AgentConfig cfg)` Setup the connection listener.

Method Summary
`abstract void` | `cleanup()` Called by the agent when the connection listener should cleanup all resources such as sockets, open files, etc.
`protected AgentConfig` | `getConfig()`
`abstract AgentServerConnection` | `getNewConnection()` Fetch a new incoming connection and return it to the agent.
`abstract void` | `setup(int timeout)` Initialize the listener.

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

Constructor Detail

### AgentConnectionListener

    public AgentConnectionListener(AgentConfig cfg)

  Setup the connection listener.

Method Detail

### getConfig

    protected AgentConfig getConfig()

### getNewConnection

    public abstract AgentServerConnection getNewConnection()
                                                    throws AgentConnectionException,
                                                           java.io.InterruptedIOException

  Fetch a new incoming connection and return it to the agent.

  Returns:
    the incoming connection to the agent
  Throws:
    `AgentConnectionException` - on generic connection failures
    `java.io.InterruptedIOException` - if a timeout occurred waiting for the connection

### setup

    public abstract void setup(int timeout)
                        throws AgentStartException

  Initialize the listener. This should perform functions such as creating the socket to listen on, etc.

  Parameters:
    `timeout` - Timeout in milliseconds to wait for a connection
  Throws:
    `AgentStartException`

### cleanup

    public abstract void cleanup()

  Called by the agent when the connection listener should cleanup all resources such as sockets, open files, etc.

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.