GWTP Dispatch Server, Guice implementation 0.7-redhat-1

com.gwtplatform.dispatch.server.guice
Class HandlerModule

java.lang.Object
  extended by com.google.inject.AbstractModule
      extended by com.gwtplatform.dispatch.server.guice.HandlerModule
All Implemented Interfaces:
com.google.inject.Module

public abstract class HandlerModule
extends com.google.inject.AbstractModule

Base module that will bind Actions to ActionHandlers and ActionValidators. Your own Guice modules should extend this class.

Author:
Christian Goudreau, David Peterson

Constructor Summary
HandlerModule()
          Constructs a HandlerModule that uses the DispatchModule with default configuration.
HandlerModule(DispatchModule dispatchModule)
          Constructs a HandlerModule that uses the DispatchModule with a custom configuration.
 
Method Summary
protected
<A extends Action<R>,R extends Result>
void
bindHandler(Class<A> actionClass, Class<? extends ActionHandler<A,R>> handlerClass)
           
protected
<A extends Action<R>,R extends Result>
void
bindHandler(Class<A> actionClass, Class<? extends ActionHandler<A,R>> handlerClass, Class<? extends ActionValidator> actionValidator)
           
protected  void configure()
           
protected abstract  void configureHandlers()
          Override this method to configure your handlers.
 
Methods inherited from class com.google.inject.AbstractModule
addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestStaticInjection, requireBinding, requireBinding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HandlerModule

public HandlerModule()
Constructs a HandlerModule that uses the DispatchModule with default configuration.


HandlerModule

public HandlerModule(DispatchModule dispatchModule)
Constructs a HandlerModule that uses the DispatchModule with a custom configuration.

Parameters:
dispatchModule - The custom configured DispatchModule
Method Detail

bindHandler

protected <A extends Action<R>,R extends Result> void bindHandler(Class<A> actionClass,
                                                                  Class<? extends ActionHandler<A,R>> handlerClass)
Type Parameters:
A - Type of Action
R - Type of Result
Parameters:
actionClass - Implementation of Action to link and bind
handlerClass - Implementation of ActionHandler to link and bind

bindHandler

protected <A extends Action<R>,R extends Result> void bindHandler(Class<A> actionClass,
                                                                  Class<? extends ActionHandler<A,R>> handlerClass,
                                                                  Class<? extends ActionValidator> actionValidator)
Type Parameters:
A - Type of Action
R - Type of Result
Parameters:
actionClass - Implementation of Action to link and bind
handlerClass - Implementation of ActionHandler to link and bind
actionValidator - Implementation of ActionValidator to link and bind

configure

protected final void configure()
Specified by:
configure in class com.google.inject.AbstractModule

configureHandlers

protected abstract void configureHandlers()
Override this method to configure your handlers. Use calls to bindHandler(java.lang.Class, java.lang.Class>) to register actions that do not need any specific security validation.


GWTP Dispatch Server, Guice implementation 0.7-redhat-1

Copyright © 2010-2013 JBoss by Red Hat. All Rights Reserved.