|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.fusesource.hawtdispatch.DispatchQueueProxy
public class DispatchQueueProxy
This class creates proxy objects that allow you to easily service all
method calls to an interface via a DispatchQueue.
The general idea is that proxy asynchronously invoke the delegate using the dispatch queue. The proxy implementation is generated using ASM using the following code generation pattern:
class <>$__ACTOR_PROXY__ implements < > { private final < > target; private final DispatchQueue queue; public < >$__ACTOR_PROXY__(< > target, DispatchQueue queue) { this.target = target; this.queue = queue; } < > < > { queue.execute( new Runnable() { public void run() { this.target.< >; } } ); } < > }
| Constructor Summary | |
|---|---|
DispatchQueueProxy()
|
|
| Method Summary | ||
|---|---|---|
static
|
create(Class<T> interfaceClass,
T target,
DispatchQueue queue)
Create an asynchronous dispatch proxy to the target object via the dispatch queue. |
|
static
|
create(ClassLoader classLoader,
Class<T> interfaceClass,
T target,
DispatchQueue queue)
Create an asynchronous dispatch proxy to the target object via the dispatch queue. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DispatchQueueProxy()
| Method Detail |
|---|
public static <T> T create(Class<T> interfaceClass,
T target,
DispatchQueue queue)
throws IllegalArgumentException
T - the type of the interface classinterfaceClass - the interface that will be implemented by the proxytarget - the delegate object the proxy will asynchronously invokequeue - the dispatch queue that the asynchronous runnables will execute on
IllegalArgumentException
public static <T> T create(ClassLoader classLoader,
Class<T> interfaceClass,
T target,
DispatchQueue queue)
throws IllegalArgumentException
T - the type of the interface asynchronousclassLoader - the classloader which the proxy class should useinterfaceClass - the interface that will be implemented by the proxytarget - the delegate object the proxy will asynchronously invokequeue - the dispatch queue that the asyncronous runnables will execute on
IllegalArgumentException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||