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 (DefaultDispatch 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(java.lang.Class<? extends Dispatch> dispatchClass)
           
ServerDispatchModule(java.lang.Class<? extends Dispatch> dispatchClass, java.lang.Class<? extends ActionHandlerRegistry> actionHandlerRegistryClass)
           
 
Method Summary
protected  void configure()
           
 boolean equals(java.lang.Object obj)
          Override so that only one instance of this class will ever be installed in an Injector.
protected  java.lang.Class<? extends ActionHandlerRegistry> getActionHandlerRegistryClass()
          The class returned by this method is bound to the ActionHandlerRegistry.
protected  java.lang.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(java.lang.Class<? extends Dispatch> dispatchClass)

ServerDispatchModule

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

configure

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

getDispatchClass

protected java.lang.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 DefaultDispatch.

Returns:
The Dispatch implementation class.

getActionHandlerRegistryClass

protected java.lang.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(java.lang.Object obj)
Override so that only one instance of this class will ever be installed in an Injector.

Overrides:
equals in class java.lang.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 java.lang.Object


Copyright © 2009 customware.net. All Rights Reserved.