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()
          Static URL route bindings http://google-guice.googlecode.com/svn/trunk/javadoc/com/google/inject/servlet/ServletModule.html
protected abstract  void configureApp()
          Miscellaneous IoC configuration
protected  void configureServlets()
           
protected abstract  Package[] getControllerPackages()
          Gets the set of packages containing all MVC controllers.
protected  javax.servlet.http.HttpServlet getDefaultServlet()
          Standard static file servlet
protected  javax.servlet.Filter getGzipFilter()
          Servlet Filter which GZIP compresses response
protected  javax.servlet.Filter getNeverExpireFilter()
          Servlet Filter which sets the cache control headers to never expire
 
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

getDefaultServlet

protected javax.servlet.http.HttpServlet getDefaultServlet()
Standard static file servlet


getNeverExpireFilter

protected javax.servlet.Filter getNeverExpireFilter()
Servlet Filter which sets the cache control headers to never expire


getGzipFilter

protected javax.servlet.Filter getGzipFilter()
Servlet Filter which GZIP compresses response


configureApp

protected abstract void configureApp()
Miscellaneous IoC configuration


bindStaticRoutes

protected abstract void bindStaticRoutes()
Static URL route bindings 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 © 2013. All Rights Reserved.