Hyperic HQ Plugin API v. 4.4.0.2

org.hyperic.hq.transport.util
Class AsynchronousInvocationHandler

java.lang.Object
  extended by org.hyperic.hq.transport.util.AsynchronousInvocationHandler
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, java.lang.Runnable

public abstract class AsynchronousInvocationHandler
extends java.lang.Object
implements java.lang.Runnable, java.io.Externalizable

The handler for making asynchronous invocations. If the invocations must be guaranteed, then any state associated with the invocation must be made Externalizable.

See Also:
Serialized Form

Constructor Summary
AsynchronousInvocationHandler()
          Public no-arg constructor required for externalization.
AsynchronousInvocationHandler(boolean guaranteed)
          Creates an instance.
 
Method Summary
abstract  void handleInvocation()
          Handle the invocation.
 boolean isInvocationGuaranteed()
           
 void readExternal(java.io.ObjectInput in)
          Subclasses should only extend this method, never override it.
 void run()
          Delegates to handleInvocation() but swallows any exceptions throw during invocation handling.
 void writeExternal(java.io.ObjectOutput out)
          Subclasses should only extend this method, never override it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AsynchronousInvocationHandler

public AsynchronousInvocationHandler()
Public no-arg constructor required for externalization.


AsynchronousInvocationHandler

public AsynchronousInvocationHandler(boolean guaranteed)
Creates an instance.

Parameters:
guaranteed - true if the invocation is guaranteed.
Method Detail

run

public final void run()
Delegates to handleInvocation() but swallows any exceptions throw during invocation handling.

Specified by:
run in interface java.lang.Runnable

isInvocationGuaranteed

public final boolean isInvocationGuaranteed()
Returns:
true if the invocation is guaranteed.

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Subclasses should only extend this method, never override it.

Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException
See Also:
Externalizable.readExternal(java.io.ObjectInput)

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Subclasses should only extend this method, never override it.

Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException
See Also:
Externalizable.writeExternal(java.io.ObjectOutput)

handleInvocation

public abstract void handleInvocation()
                               throws java.lang.Exception
Handle the invocation.

Throws:
java.lang.Exception - if invocation handling fails.

Hyperic HQ Plugin API v. 4.4.0.2

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