AgentTransport (Hyperic HQ Plugin API)
Keywords: org.hyperic.hq.transport.AgentTransport 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.transport
Class AgentTransport

    java.lang.Object
      org.hyperic.hq.transport.AgentTransport

    public class AgentTransport

extends java.lang.Object

The transport for the HQ agent. Services hosted by this transport should be registered before the transport is started.

Constructor Summary
`AgentTransport(java.net.InetSocketAddress serverTransportAddr, java.lang.String path, boolean encrypted, java.lang.String agentToken, boolean unidirectional, long pollingFrequency, int asyncThreadPoolSize)` Creates an instance.

Method Summary
`org.jboss.remoting.InvokerLocator` | `getRemoteEndpointLocator()`
`void` | `registerService(java.lang.Class serviceInterface, java.lang.Object serviceImpl)` Register a service to be hosted by this transport.
`void` | `start()` Start the transport.
`void` | `stop()` Stop the transport.
`void` | `updateAgentToken(java.lang.String agentToken)` Update the agent token uniquely identifying the agent.

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

Constructor Detail

### AgentTransport

    public AgentTransport(java.net.InetSocketAddress serverTransportAddr,
                          java.lang.String path,
                          boolean encrypted,
                          java.lang.String agentToken,
                          boolean unidirectional,
                          long pollingFrequency,
                          int asyncThreadPoolSize)
                   throws java.lang.Exception

  Creates an instance.

  Parameters:
    `serverTransportAddr` - The listening socket address on the server transport.
    `path` - The invoker locator path or `null`.
    `encrypted` - `true` if using encrypted communication; `false` if not encrypted.
    `agentToken` - The agent token uniquely identifying the agent.
    `unidirectional` - `true` to use a unidirectional transport; `false` to use a bidirectional transport.
    `pollingFrequency` - The polling frequency in milliseconds. This parameter is ignored for bidirectional transports.
    `asyncThreadPoolSize` - The thread pool size for the asynchronous invoker. This parameter is ignored for bidirectional transports.
  Throws:
    `java.lang.ClassNotFoundException` - if this is a .ORG instance and attempting to use the unidirectional transport.
    `java.lang.Exception` - if instance creation fails.

Method Detail

### getRemoteEndpointLocator

    public org.jboss.remoting.InvokerLocator getRemoteEndpointLocator()

  Returns:
    The invoker locator for the remote end point to which this transport is connected.

### registerService

    public void registerService(java.lang.Class serviceInterface,
                                java.lang.Object serviceImpl)
                         throws java.lang.Exception

  Register a service to be hosted by this transport.

  Parameters:
    `serviceInterface` - The service interface class.
    `serviceImpl` - The service implementation.
  Throws:
    `java.lang.IllegalArgumentException` - if the service does not implement the interface.
    `java.lang.Exception` - if service registration fails.

### updateAgentToken

    public void updateAgentToken(java.lang.String agentToken)

  Update the agent token uniquely identifying the agent.

  Parameters:
    `agentToken` - The agent token.
  Throws:
    `java.lang.NullPointerException` - if the agent token is `null`.

### start

    public void start()
               throws java.lang.Exception

  Start the transport.

  Throws:
    `java.lang.Exception`

### stop

    public void stop()
              throws java.lang.InterruptedException

  Stop the transport. Once stopped, it cannot be started again.

  Throws:
    `java.lang.InterruptedException`

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.