net.customware.gwt.dispatch.server
Interface ExecutionContext


public interface ExecutionContext

ExecutionContext instances are passed to ActionHandlers, and allows them to execute sub-actions. These actions can be automatically rolled back if any part of the action handler fails.

Author:
David Peterson

Method Summary
<A extends Action<R>,R extends Result>
R
execute(A action)
          Executes an action in the current context.
<A extends Action<R>,R extends Result>
R
execute(A action, boolean allowRollback)
          Executes an action in the current context.
 

Method Detail

execute

<A extends Action<R>,R extends Result> R execute(A action,
                                                 boolean allowRollback)
                         throws ActionException
Executes an action in the current context. If rollbackOnException is set to true, the action will be rolled back if the surrounding execution fails.

Type Parameters:
A - The action type.
R - The result type.
Parameters:
action - The action.
allowRollback - If true, any failure in the surrounding execution will trigger a rollback of the action.
Returns:
The result.
Throws:
ServiceException
ActionException

execute

<A extends Action<R>,R extends Result> R execute(A action)
                         throws ActionException
Executes an action in the current context. If the surrounding execution fails, the action will be rolled back.

Type Parameters:
A - The action type.
R - The result type.
Parameters:
action - The action.
Returns:
The result.
Throws:
ServiceException
ActionException


Copyright © 2009 customware.net. All Rights Reserved.