GWTP Dispatch Server Base 0.6-redhat-2

com.gwtplatform.dispatch.server
Interface Dispatch

All Known Implementing Classes:
AbstractDispatchImpl

public interface Dispatch

The base class of the synchronous dispatcher service with an arbitrary action type. The server-side implementation is com.gwtplatform.dispatch.server.guice.DispatchImpl and the async client-side version is DispatchAsync.

This class is closely related to DispatchService. In fact, this class wouldn't be needed, but we use it to workaround a GWT limitation described in DispatchAsync.

Author:
Christian Goudreau, David Peterson

Method Summary
<A extends Action<R>,R extends Result>
R
execute(A action)
          Executes the specified action and returns the appropriate result.
<A extends Action<R>,R extends Result>
void
undo(A action, R result)
          Undoes a previously executed action.
 

Method Detail

execute

<A extends Action<R>,R extends Result> R execute(A action)
                         throws ActionException,
                                ServiceException
Executes the specified action and returns the appropriate result.

Type Parameters:
A - The Action type.
R - The Result type.
Parameters:
action - The Action.
Returns:
The action's result.
Throws:
ActionException - if the action execution failed.
ServiceException - if the execution failed due to a service error.

undo

<A extends Action<R>,R extends Result> void undo(A action,
                                                 R result)
          throws ActionException,
                 ServiceException
Undoes a previously executed action.

Type Parameters:
A - The Action type.
R - The Result type.
Parameters:
action - The Action to undo.
result - The result obtained when the action was previously executed.
Throws:
ActionException - if undoing the action failed.
ServiceException - if the execution failed due to a service error.

GWTP Dispatch Server Base 0.6-redhat-2

Copyright © 2010-2012 ArcBees. All Rights Reserved.