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

    java.lang.Object
      org.hyperic.hq.transport.util.AsynchronousInvoker

    public class AsynchronousInvoker

extends java.lang.Object

A helper class for performing asynchronous invocations within the HQ transport layer. Asynchronous invocations are performed using a thread pool executor.

Constructor Summary
`AsynchronousInvoker(int poolSize)` Creates an instance.

Method Summary
`void` | `invoke(AsynchronousInvocationHandler handler)` Make an invocation.
`void` | `start()` Start the asynchronous invoker.
`void` | `stop()` Stop the asynchronous invoker.

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

Constructor Detail

### AsynchronousInvoker

    public AsynchronousInvoker(int poolSize)

  Creates an instance.

  Parameters:
    `poolSize` - The thread pool size.
  Throws:
    `java.lang.IllegalArgumentException` - if the pool size is less than or equal to zero.

Method Detail

### start

    public void start()

  Start the asynchronous invoker. This amounts to warming up all the threads in the thread pool.

### stop

    public void stop()

  Stop the asynchronous invoker. After stopped, any attempt to make a non-guaranteed invocation will result in a `RejectedExecutionException`. Guaranteed invocations will still be allowed but will only consist of persisting the invocation for later execution, not making the invocation itself.

### invoke

    public void invoke(AsynchronousInvocationHandler handler)

  Make an invocation.

  Parameters:
    `handler` - The invocation handler.
  Throws:
    `java.util.concurrent.RejectedExecutionException` - if the invoker is `stopped` and delivery is not guaranteed.

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.