public <A extends Action<R>, R extends Result> DispatchRequest undo(A action,
R result, AsyncCallback<Void> callback) {
ClientActionHandler<?, ?> clientActionHandler = clientActionHandlers.get(action.getClass());
if (clientActionHandler != null) {
DelegatingDispatchRequest request = new DelegatingDispatchRequest();
((ClientActionHandler<A, R>) clientActionHandler).undo(action, result,
callback, new UndoCommand<A, R>() {
@Override
public DispatchRequest undo(A action, R result, AsyncCallback<Void> callback) {
return serviceUndo(action, result, callback);