|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbiz.hammurapi.dispatch.Dispatcher
public class Dispatcher
This class dispatches objects to invocation handlers which can accept them. Target invocation handlers are organized in "buckets" keyed by the argument class. This makes dispatching very efficient at runtime because only compatible handlers are interated over for invocation.
Nested Class Summary | |
---|---|
protected static interface |
Dispatcher.Invocation
Simple form of invocation used by dispatcher to chain invocations. |
Constructor Summary | |
---|---|
Dispatcher(java.util.Collection targets)
Creates dispatcher. |
Method Summary | |
---|---|
protected void |
consumeResult(java.lang.Object result)
Consumes invocation results. |
void |
dispatch(java.lang.Object arg)
Dispatches object to invocation handlers. |
int |
size()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Dispatcher(java.util.Collection targets)
targets
- Collection which contains instances of InvocationTarget or InvocationHandler.Method Detail |
---|
public void dispatch(java.lang.Object arg)
arg
- Instance to be dispatched.protected void consumeResult(java.lang.Object result)
result
- public int size()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |