com.google.sitebricks
Class SitebricksServletModule

java.lang.Object
  extended by com.google.inject.AbstractModule
      extended by com.google.inject.servlet.ServletModule
          extended by com.google.sitebricks.SitebricksServletModule
All Implemented Interfaces:
com.google.inject.Module

public class SitebricksServletModule
extends com.google.inject.servlet.ServletModule

Provides an optional mechanism for users of Sitebricks to supply Servlet and Filter implementations using the standard Guice Servlet APIs.

For example:

  public Injector getInjector() {
    return Guice.createInjector(new SitebricksModule() {


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
SitebricksServletModule()
           
 
Method Summary
protected  void configureCustomServlets()
          Provides a mechanism for users of Sitebricks to register their own Servlet implementations with Guice Servlet via serve and serveRegex.
protected  void configurePostFilters()
          Provides a mechanism for users of Sitebricks to register their own Filter implementation with Guice Servlet via filter and filterRegex.
protected  void configurePreFilters()
          Provides a mechanism for users of Sitebricks to register their own Filter implementation with Guice Servlet via filter and filterRegex.
protected  void configureServlets()
           
 
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

SitebricksServletModule

public SitebricksServletModule()
Method Detail

configureServlets

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

configureCustomServlets

protected void configureCustomServlets()
Provides a mechanism for users of Sitebricks to register their own Servlet implementations with Guice Servlet via serve and serveRegex.


configurePreFilters

protected void configurePreFilters()
Provides a mechanism for users of Sitebricks to register their own Filter implementation with Guice Servlet via filter and filterRegex.


Filters declared in this method will execute in the filter chain before the Sitebricks filter invokes.


configurePostFilters

protected void configurePostFilters()
Provides a mechanism for users of Sitebricks to register their own Filter implementation with Guice Servlet via filter and filterRegex.


Filters declared in this method will execute in the filter chain only if Sitebricks determines it will not handle the request.



Copyright © 2014. All rights reserved.