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

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

All Implemented Interfaces:
  AgentProxyFactory

    public class AgentProxyFactoryImpl

extends java.lang.Object
implements AgentProxyFactory

The factory class for creating proxies to agent services. Note that proxy invocations are not thread-safe and must be synchronized externally if multiple threads are making invocations on the same proxy. The unidirectional transport is not supported for a .ORG instance.

Constructor Summary
`AgentProxyFactoryImpl(AsynchronousInvoker invoker)` Create an instance.

Method Summary
`java.lang.Object` | `createAsyncService(Agent agent, java.lang.Class serviceInterface, boolean guaranteed)` Create an asynchronous proxy to an agent service where proxy method invocations return immediately.
`java.lang.Object` | `createSyncService(Agent agent, java.lang.Class serviceInterface)` Create a synchronous proxy to an agent service.
`void` | `destroyService(java.lang.Object proxy)` When a proxy to an agent service is no longer in use, it should be destroyed to reclaim resources.
`protected AsynchronousInvoker` | `getAsynchronousInvoker()`

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

Constructor Detail

### AgentProxyFactoryImpl

    public AgentProxyFactoryImpl(AsynchronousInvoker invoker)

  Create an instance.

  Parameters:
    `invoker` - The asynchronous invoker that will be used for any async service calls.
  Throws:
    `java.lang.NullPointerException` - if the asynchronous invoker is `null`.

Method Detail

### getAsynchronousInvoker

    protected final AsynchronousInvoker getAsynchronousInvoker()

  Returns:
    The asynchronous invoker that will be used for any async service calls.

### createSyncService

    public java.lang.Object createSyncService(Agent agent,
                                              java.lang.Class serviceInterface)
                                       throws java.lang.Exception

  Description copied from interface: `AgentProxyFactory`
  Create a synchronous proxy to an agent service.

  Specified by:
    `createSyncService` in interface `AgentProxyFactory`
  Parameters:
    `agent` - The agent.
    `serviceInterface` - The service interface.
  Returns:
    A proxy to the agent service.
  Throws:
    `java.lang.Exception` - if an exception occurs acquiring the proxy.
  See Also:
    `AgentProxyFactory.createSyncService(Agent, java.lang.Class)`

### createAsyncService

    public java.lang.Object createAsyncService(Agent agent,
                                               java.lang.Class serviceInterface,
                                               boolean guaranteed)
                                        throws java.lang.Exception

  Description copied from interface: `AgentProxyFactory`
  Create an asynchronous proxy to an agent service where proxy method invocations return immediately. The return type for an asynchronous proxy method call is always `null` even if the service interface specifies another return type. In addition, exceptions thrown by the agent service are never propagated back to an asynchronous proxy.

  Specified by:
    `createAsyncService` in interface `AgentProxyFactory`
  Parameters:
    `agent` - The agent.
    `serviceInterface` - The service interface.
    `guaranteed` - `true` to guarantee message delivery; `false` if guaranteed delivery is not required.
  Returns:
    A proxy to the agent service.
  Throws:
    `java.lang.Exception` - if an exception occurs acquiring the proxy.
  See Also:
    `AgentProxyFactory.createAsyncService(Agent, java.lang.Class, boolean)`

### destroyService

    public void destroyService(java.lang.Object proxy)

  Description copied from interface: `AgentProxyFactory`
  When a proxy to an agent service is no longer in use, it should be destroyed to reclaim resources.

  Specified by:
    `destroyService` in interface `AgentProxyFactory`
  Parameters:
    `proxy` - The proxy to an agent service. Null values should be handled gracefully.
  See Also:
    `AgentProxyFactory.destroyService(java.lang.Object)`

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.