|
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 |
java.lang.Objectorg.hyperic.hq.transport.AgentProxyFactoryImpl
public class AgentProxyFactoryImpl
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 |
---|
public AgentProxyFactoryImpl(AsynchronousInvoker invoker)
invoker
- The asynchronous invoker that will be used for any
async service calls.
java.lang.NullPointerException
- if the asynchronous invoker is null
.Method Detail |
---|
protected final AsynchronousInvoker getAsynchronousInvoker()
public java.lang.Object createSyncService(Agent agent, java.lang.Class serviceInterface) throws java.lang.Exception
AgentProxyFactory
createSyncService
in interface AgentProxyFactory
agent
- The agent.serviceInterface
- The service interface.
java.lang.Exception
- if an exception occurs acquiring the proxy.AgentProxyFactory.createSyncService(Agent, java.lang.Class)
public java.lang.Object createAsyncService(Agent agent, java.lang.Class serviceInterface, boolean guaranteed) throws java.lang.Exception
AgentProxyFactory
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.
createAsyncService
in interface AgentProxyFactory
agent
- The agent.serviceInterface
- The service interface.guaranteed
- true
to guarantee message delivery;
false
if guaranteed delivery is not required.
java.lang.Exception
- if an exception occurs acquiring the proxy.AgentProxyFactory.createAsyncService(Agent, java.lang.Class, boolean)
public void destroyService(java.lang.Object proxy)
AgentProxyFactory
destroyService
in interface AgentProxyFactory
proxy
- The proxy to an agent service. Null values should
be handled gracefully.AgentProxyFactory.destroyService(java.lang.Object)
|
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 |