|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.customware.gwt.dispatch.server.AbstractDispatch
public abstract class AbstractDispatch
Abstract base implementation of the Dispatch
Provides basic action handler lookup and execution support. Lifecycle methods may be overriden by implementors to receive notifications regarding action execution and execution results.
| Constructor Summary | |
|---|---|
AbstractDispatch()
|
|
| Method Summary | ||
|---|---|---|
|
execute(A action)
Executes the specified action and returns the appropriate result. |
|
protected
|
executed(A action,
R result,
ActionHandler<A,R> handler,
ExecutionContext ctx)
Method invoked after the specified action has been succesfully executed with the specified handler. |
|
protected
|
executing(A action,
ActionHandler<A,R> handler,
ExecutionContext ctx)
Method invoked before executing the specified action with the specified handler. |
|
protected
|
failed(A action,
Throwable e,
ActionHandler<A,R> handler,
ExecutionContext ctx)
Method invoked after the specified action has been unsuccesfully executed with the specified handler. |
|
protected abstract ActionHandlerRegistry |
getHandlerRegistry()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractDispatch()
| Method Detail |
|---|
public <A extends Action<R>,R extends Result> R execute(A action)
throws DispatchException
Dispatch
execute in interface Dispatchaction - The Action.
DispatchException - if the action execution failed.protected abstract ActionHandlerRegistry getHandlerRegistry()
protected <A extends Action<R>,R extends Result> void executing(A action,
ActionHandler<A,R> handler,
ExecutionContext ctx)
throws DispatchException
Any exception thrown from this method will prevent the normal execution of the action and will be propagated.
A - the action typeR - the result typeaction - the action to executehandler - the handler to execute it withctx - the execution context
DispatchException - if the action execution should be cancelled
protected <A extends Action<R>,R extends Result> void executed(A action,
R result,
ActionHandler<A,R> handler,
ExecutionContext ctx)
This method must not throw any exceptions.
A - the action typeR - the result typeaction - the action to executeresult - the execution resulthandler - the handler to execute it withctx - the execution context
protected <A extends Action<R>,R extends Result> void failed(A action,
Throwable e,
ActionHandler<A,R> handler,
ExecutionContext ctx)
This method must not throw any exceptions.
A - the action typeR - the result typeaction - the action to executee - the exception thrown by the handler or by the executing methodhandler - the handler to execute it withctx - the execution context
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||