GWTP Dispatch client 0.6-redhat-1

com.gwtplatform.dispatch.client.gin
Class DispatchAsyncModule

java.lang.Object
  extended by com.google.gwt.inject.client.AbstractGinModule
      extended by com.gwtplatform.dispatch.client.gin.DispatchAsyncModule
All Implemented Interfaces:
com.google.gwt.inject.client.GinModule

public class DispatchAsyncModule
extends com.google.gwt.inject.client.AbstractGinModule

This gin module provides provides access to the DispatchAsync singleton, which is used to make remote procedure calls to the server. This module requires an ExceptionHandler and a SecurityCookieAccessor. By default, these will be bound to DefaultExceptionHandler and DefaultSecurityCookieAccessor respectively.

If you want to prevent XSRF attack (you use secured Actions) the default EmptySecurityCookieAccessor could leave your application vulnerable to XSRF attacks. For more details see this document. For more security use DispatchAsyncSecureModule.

If you don't need XSRF protection, you can use directly this module with your Ginjector, i.e.:

 @GinModules( { DispatchAsyncModule.class, ... }
 
For customization, skip the previous step and install the module in one of your configure() methods:
 install(new DispatchAsyncModule.Builder().exceptionHandler(
     MyExceptionHandler.class).sessionAccessor(
     MySecurityCookieAccessor.class).build());
 
You can pass null as any of the two parameter to fallback to the default.

Author:
David Peterson, Philippe Beaudoin, Brendan Doherty

Nested Class Summary
static class DispatchAsyncModule.Builder
          A DispatchAsyncModule builder.
 
Field Summary
protected  Class<? extends ClientActionHandlerRegistry> clientActionHandlerRegistryType
           
protected  Class<? extends ExceptionHandler> exceptionHandlerType
           
protected  Class<? extends SecurityCookieAccessor> sessionAccessorType
           
 
Constructor Summary
DispatchAsyncModule()
           
DispatchAsyncModule(Class<? extends ClientActionHandlerRegistry> clientActionHandlerRegistryType)
          Deprecated. 
DispatchAsyncModule(Class<? extends ExceptionHandler> exceptionHandlerType, Class<? extends SecurityCookieAccessor> sessionAccessorType)
          Deprecated. 
DispatchAsyncModule(Class<? extends ExceptionHandler> exceptionHandlerType, Class<? extends SecurityCookieAccessor> sessionAccessorType, Class<? extends ClientActionHandlerRegistry> clientActionHandlerRegistryType)
          Deprecated. 
 
Method Summary
protected  void configure()
           
protected  DispatchAsync provideDispatchAsync(ExceptionHandler exceptionHandler, SecurityCookieAccessor secureSessionAccessor, ClientActionHandlerRegistry registry)
           
 
Methods inherited from class com.google.gwt.inject.client.AbstractGinModule
bind, bind, bind, bindConstant, binder, configure, install, requestStaticInjection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

exceptionHandlerType

protected final Class<? extends ExceptionHandler> exceptionHandlerType

sessionAccessorType

protected final Class<? extends SecurityCookieAccessor> sessionAccessorType

clientActionHandlerRegistryType

protected final Class<? extends ClientActionHandlerRegistry> clientActionHandlerRegistryType
Constructor Detail

DispatchAsyncModule

public DispatchAsyncModule()

DispatchAsyncModule

@Deprecated
public DispatchAsyncModule(Class<? extends ExceptionHandler> exceptionHandlerType,
                                      Class<? extends SecurityCookieAccessor> sessionAccessorType)
Deprecated. 


DispatchAsyncModule

@Deprecated
public DispatchAsyncModule(Class<? extends ClientActionHandlerRegistry> clientActionHandlerRegistryType)
Deprecated. 


DispatchAsyncModule

@Deprecated
public DispatchAsyncModule(Class<? extends ExceptionHandler> exceptionHandlerType,
                                      Class<? extends SecurityCookieAccessor> sessionAccessorType,
                                      Class<? extends ClientActionHandlerRegistry> clientActionHandlerRegistryType)
Deprecated. 

Method Detail

configure

protected void configure()
Specified by:
configure in class com.google.gwt.inject.client.AbstractGinModule

provideDispatchAsync

@Provides
protected DispatchAsync provideDispatchAsync(ExceptionHandler exceptionHandler,
                                                      SecurityCookieAccessor secureSessionAccessor,
                                                      ClientActionHandlerRegistry registry)

GWTP Dispatch client 0.6-redhat-1

Copyright © 2010-2012 ArcBees. All Rights Reserved.