public class TestDispatchService extends Object implements DispatchService
DispatchService for use with test
cases that configure guice using a MockHandlerModule.| Constructor and Description |
|---|
TestDispatchService(Dispatch dispatch) |
| 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.
|
public Result execute(String cookieSentByRPC, Action<?> action) throws ActionException, ServiceException
DispatchServiceexecute in interface DispatchServicecookieSentByRPC - 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>)public void undo(String cookieSentByRPC, Action<Result> action, Result result) throws ActionException, ServiceException
DispatchServiceundo in interface DispatchServicecookieSentByRPC - 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.