net.customware.gwt.dispatch.server
Interface ActionHandler<A extends Action<R>,R extends Result>

All Known Implementing Classes:
AbstractActionHandler, BatchActionHandler

public interface ActionHandler<A extends Action<R>,R extends Result>

Instances of this interface will handle specific types of Action classes.

Author:
David Peterson

Method Summary
 R execute(A action, ExecutionContext context)
          Handles the specified action.
 java.lang.Class<A> getActionType()
           
 void rollback(A action, R result, ExecutionContext context)
          Attempts to roll back the specified action.
 

Method Detail

getActionType

java.lang.Class<A> getActionType()
Returns:
The type of Action supported by this handler.

execute

R execute(A action,
          ExecutionContext context)
                         throws ActionException
Handles the specified action.

Type Parameters:
T - The Result type.
Parameters:
action - The action.
Returns:
The Result.
Throws:
ActionException - if there is a problem performing the specified action.
ServiceException - if there is a low-level problem.

rollback

void rollback(A action,
              R result,
              ExecutionContext context)
              throws ActionException
Attempts to roll back the specified action.

Parameters:
action - The action.
result - The result of the action.
context - The execution context.
Throws:
ServiceException
ActionException


Copyright © 2009 customware.net. All Rights Reserved.