|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AdviceController<N>
Provides methods to suspend and resume the execution of an asynchronous advice instance. An advice instance
uses the setPending()
method to signal the engine when it starts executing its business logic on a
separate thread. This usually happens just before the advice implementation returns from its execute()
method. While the
asynchronous advice implementation is executing, the engine can execute other advice instances or activities, if such
exist on parallel tracks in the process. The engine will not execute the next advice instance in the pipeline or the
next activity on the same track before the asynchronous advice instance finishes executing.
When the asynchronous advice instance finishes its business logic on the parallel thread, it signals back the engine
this event by calling setReady()
.
AsyncAdvice
Method Summary | |
---|---|
void |
setPending(long maxDelay)
The advice instance should call this method from within its execute() method, right after it starts executing
its business logic on a parallel thread and just before it returns from execute() . |
boolean |
setReady(ReturnWrapper<N> result)
The advice instance should call this method, from a parallel thread, once its business logic is completed. |
Method Detail |
---|
void setPending(long maxDelay)
execute()
method, right after it starts executing
its business logic on a parallel thread and just before it returns from execute()
.
Once this method is called, the advice instance is placed into the pending state after it returns from its
execute()
method.
maxDelay
- The maximum amount of time, in milliseconds, that the advice needs to finish executing its business logic.
If this period expires prior to calling setReady()
, the advice implementation's cancelled()
method will be called.boolean setReady(ReturnWrapper<N> result) throws AspectException
postExecute()
method will be invoked as a result of this call.
A call to this method would eventually cause an advice instance to leave the pending state and enter the ready state.
result
- the result of the advice implementation
AspectException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |