org.duelengine.duel.mvc
Class DuelMvcModule

java.lang.Object
  extended by com.google.inject.AbstractModule
      extended by com.google.inject.servlet.ServletModule
          extended by com.sun.jersey.guice.JerseyServletModule
              extended by org.duelengine.duel.mvc.DuelMvcModule
All Implemented Interfaces:
com.google.inject.Module

public abstract class DuelMvcModule
extends com.sun.jersey.guice.JerseyServletModule


Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.inject.servlet.ServletModule
com.google.inject.servlet.ServletModule.FilterKeyBindingBuilder, com.google.inject.servlet.ServletModule.ServletKeyBindingBuilder
 
Constructor Summary
DuelMvcModule()
           
 
Method Summary
protected  void bindControllers()
          MVC controller bindings We have to explicitly bind each controller class to ensure Guice controls instantiation for AOP.
protected abstract  void bindStaticRoutes(javax.servlet.http.HttpServlet defaultServlet, javax.servlet.Filter neverExpire)
          Static URL route bindings
protected abstract  void configureApp()
          Miscellaneous IoC configuration
protected  void configureServlets()
           
protected abstract  Package[] getControllerPackages()
          Gets the set of packages containing all MVC controllers.
 
Methods inherited from class com.sun.jersey.guice.JerseyServletModule
exceptionMapperContext, extendedUriInfo, fearturesAndProperties, httpContext, httpHeaders, messageBodyWorkers, providers, request, requestContext, responseContext, securityContext, uriInfo, webApp
 
Methods inherited from class com.google.inject.servlet.ServletModule
configure, filter, filterRegex, getServletContext, serve, serveRegex
 
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

DuelMvcModule

public DuelMvcModule()
Method Detail

configureApp

protected abstract void configureApp()
Miscellaneous IoC configuration


bindStaticRoutes

protected abstract void bindStaticRoutes(javax.servlet.http.HttpServlet defaultServlet,
                                         javax.servlet.Filter neverExpire)
Static URL route bindings

Parameters:
defaultServlet - standard static file servlet
neverExpire - filter which sets the cache control headers to never expire http://google-guice.googlecode.com/svn/trunk/javadoc/com/google/inject/servlet/ServletModule.html

getControllerPackages

protected abstract Package[] getControllerPackages()
Gets the set of packages containing all MVC controllers. Return null for manually binding controllers.


bindControllers

protected void bindControllers()
MVC controller bindings We have to explicitly bind each controller class to ensure Guice controls instantiation for AOP. Default implementation binds by convention entire controller packages using #bindPackages(String...)


configureServlets

protected final void configureServlets()
Overrides:
configureServlets in class com.google.inject.servlet.ServletModule


Copyright © 2011. All Rights Reserved.