public interface DispatchService extends RemoteService
DispatchServiceImpl and the async client-side version is
DispatchServiceAsync.
This class is closely related to Dispatch, in theory the latter wouldn't
be needed, but we use it to workaround a GWT limitation described in
com.gwtplatform.dispatch.rpc.client.DispatchAsync.com.gwtplatform.dispatch.rpc.client.DispatchAsync,
Dispatch,
DispatchImpl,
DispatchService,
DispatchServiceAsync,
DispatchServiceImpl| Modifier and Type | Method and Description |
|---|---|
Result |
execute(String cookieSentByRPC,
Action<?> action)
This method is called server-side whenever a new action is dispatched.
|
void |
undo(String cookieSentByRPC,
Action<Result> action,
Result result)
This method is called server-side whenever a previously executed action needs to be undone.
|
Result execute(String cookieSentByRPC, Action<?> action) throws ActionException, ServiceException
cookieSentByRPC - This is the content of the security cookie accessed on the client (in javascript), its
goal is to prevent XSRF attacks. See
SecurityCookieAccessor for more details.action - The Action to execute.Result of the action.ActionException - Thrown if the action could not be executed for application-specific reasons. User
handlers should always throw ActionException or derived classes.ServiceException - Thrown if the action could not be executed because of a service error.DispatchServiceAsync.execute(java.lang.String, com.gwtplatform.dispatch.rpc.shared.Action<?>, com.google.gwt.user.client.rpc.AsyncCallback<com.gwtplatform.dispatch.rpc.shared.Result>)void undo(String cookieSentByRPC, Action<Result> action, Result result) throws ActionException, ServiceException
cookieSentByRPC - This is the content of the security cookie accessed on the client (in javascript), its
goal is to prevent XSRF attacks. See
SecurityCookieAccessor for more details.action - The Action to execute.result - The Result of this action when it was executed.ActionException - Thrown if the action could not be undone for application-specific reasons. User handlers
should always throw ActionException or derived classes.ServiceException - Thrown if the action could not be undone because of a service error.DispatchServiceAsync.undo(java.lang.String, com.gwtplatform.dispatch.rpc.shared.Action<?>, com.gwtplatform.dispatch.rpc.shared.Result, com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Void>)Copyright © 2010-2014 ArcBees. All Rights Reserved.