net.customware.gwt.dispatch.server.guice
Class ServerDispatchModule

java.lang.Object
  extended by com.google.inject.AbstractModule
      extended by net.customware.gwt.dispatch.server.guice.ServerDispatchModule
All Implemented Interfaces:
com.google.inject.Module

public class ServerDispatchModule
extends com.google.inject.AbstractModule

This module will configure the implementation for the Dispatch and ActionHandlerRegistry interfaces. If you want to override the defaults (GuiceDispatch and DefaultActionHandlerRegistry, respectively), pass the override values into the constructor for this module and ensure it is installed before any ActionHandlerModule instances.

Author:
David Peterson

Constructor Summary
ServerDispatchModule()
           
ServerDispatchModule(Class<? extends Dispatch> dispatchClass)
           
ServerDispatchModule(Class<? extends Dispatch> dispatchClass, Class<? extends ActionHandlerRegistry> actionHandlerRegistryClass)
           
 
Method Summary
protected  void configure()
           
 boolean equals(Object obj)
          Override so that only one instance of this class will ever be installed in an Injector.
protected  Class<? extends ActionHandlerRegistry> getActionHandlerRegistryClass()
          The class returned by this method is bound to the ActionHandlerRegistry.
protected  Class<? extends Dispatch> getDispatchClass()
          The class returned by this method is bound to the Dispatch service.
 int hashCode()
          Override so that only one instance of this class will ever be installed in an Injector.
 
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, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerDispatchModule

public ServerDispatchModule()

ServerDispatchModule

public ServerDispatchModule(Class<? extends Dispatch> dispatchClass)

ServerDispatchModule

public ServerDispatchModule(Class<? extends Dispatch> dispatchClass,
                            Class<? extends ActionHandlerRegistry> actionHandlerRegistryClass)
Method Detail

configure

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

getDispatchClass

protected Class<? extends Dispatch> getDispatchClass()
The class returned by this method is bound to the Dispatch service. Subclasses may override this method to provide custom implementations. Defaults to GuiceDispatch.

Returns:
The Dispatch implementation class.

getActionHandlerRegistryClass

protected Class<? extends ActionHandlerRegistry> getActionHandlerRegistryClass()
The class returned by this method is bound to the ActionHandlerRegistry. Subclasses may override this method to provide custom implementations. Defaults to DefaultActionHandlerRegistry.

Returns:
The ActionHandlerRegistry implementation class.

equals

public boolean equals(Object obj)
Override so that only one instance of this class will ever be installed in an Injector.

Overrides:
equals in class Object

hashCode

public int hashCode()
Override so that only one instance of this class will ever be installed in an Injector.

Overrides:
hashCode in class Object


Copyright © 2011 customware.net. All Rights Reserved.