| |
|
| java.lang.Object org.jicarilla.lang.AbstractActive org.jicarilla.lang.AbstractExecutable org.jicarilla.lang.AbstractAsyncEnabled
Field Summary | |
final protected Channel | m_incoming The recipient of incoming calls. |
Method Summary | |
protected void | doHandle(Invocation invocation) This method will be called from the worker thread and you should
implement whatever behaviour neccessary to complete the invocation. | protected void | doHandleException(Invocation invocation) This method is called by the default doHandle() implementation if an
exception occurs making the invocation. | protected Object | getImmediateResult(Invocation invocation) Override this to specify what the handle() method should return after
enqueuing an invocation. | public Object | handle(Invocation invocation) Enqueue the invocation on the asynchronous call stack. | protected void | work() Implements the
super#work() superclass method by dequeuing an
invocation (possibly blocking until one is added to the queue), then
feeding it to the
AbstractAsyncEnabled.doHandle(Invocation) method. |
m_incoming | final protected Channel m_incoming(Code) | | The recipient of incoming calls.
|
AbstractAsyncEnabled | public AbstractAsyncEnabled(Executor executor)(Code) | | Create an instance using a custom executor.
Parameters: executor - the Executor that will be used inAbstractExecutable to do the work |
AbstractAsyncEnabled | public AbstractAsyncEnabled(Executor executor, ExceptionListener listener)(Code) | | Create an instance using a custom executor and an exception listener.
Parameters: executor - the Executor that will be used inAbstractExecutable to do the work Parameters: listener - the listener that will be notified of any abnomralproblems occuring during the calls to AbstractAsyncEnabled.work(). Note thatany exceptions resulting from applying an Invocation are not sent to this listener. |
doHandle | protected void doHandle(Invocation invocation)(Code) | | This method will be called from the worker thread and you should
implement whatever behaviour neccessary to complete the invocation. The
default implementation simply runs the invocation.
Parameters: invocation - the invocation that has just been dequeued and shouldnow be applied or redirected somewhere else |
doHandleException | protected void doHandleException(Invocation invocation)(Code) | | This method is called by the default doHandle() implementation if an
exception occurs making the invocation. The default implementation
silently ignores the problem, which is arguably a bad idea, but
acceptable if subclasses never throw exceptions.
Parameters: invocation - the invocation that was applied and caused anexception |
getImmediateResult | protected Object getImmediateResult(Invocation invocation)(Code) | | Override this to specify what the handle() method should return after
enqueuing an invocation. The default implementation simply returns
null .
null, but subclasses may change that behaviour Parameters: invocation - the invocation that has just been enqueued |
|
|
|