net.customware.gwt.dispatch.server
Class SimpleActionHandler<A extends Action<R>,R extends Result>

java.lang.Object
  extended by net.customware.gwt.dispatch.server.SimpleActionHandler<A,R>
Type Parameters:
A - The Action implementation.
R - The Result implementation.
All Implemented Interfaces:
ActionHandler<A,R>

public abstract class SimpleActionHandler<A extends Action<R>,R extends Result>
extends Object
implements ActionHandler<A,R>

The SimpleActionHandler is a base implementation which allows for only the ActionHandler.execute(Action, ExecutionContext) method to be implemented.

It provides an empty implementation for the rollback(Action, Result, ExecutionContext) method infers the action type from the class type parameters.

Author:
Robert Munteanu
See Also:
AbstractActionHandler

Constructor Summary
SimpleActionHandler()
           
 
Method Summary
 Class<A> getActionType()
           
 void rollback(A action, R result, ExecutionContext context)
          Attempts to roll back the specified action.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.customware.gwt.dispatch.server.ActionHandler
execute
 

Constructor Detail

SimpleActionHandler

public SimpleActionHandler()
Method Detail

getActionType

public Class<A> getActionType()
Specified by:
getActionType in interface ActionHandler<A extends Action<R>,R extends Result>
Returns:
The type of Action supported by this handler.

rollback

public void rollback(A action,
                     R result,
                     ExecutionContext context)
              throws DispatchException
Description copied from interface: ActionHandler
Attempts to roll back the specified action.

Specified by:
rollback in interface ActionHandler<A extends Action<R>,R extends Result>
Parameters:
action - The action.
result - The result of the action.
context - The execution context.
Throws:
DispatchException


Copyright © 2011 customware.net. All Rights Reserved.