Class ServletScopingModule

java.lang.Object
com.google.inject.AbstractModule
com.peterphi.std.guice.web.rest.scoping.ServletScopingModule
All Implemented Interfaces:
com.google.inject.Module

public class ServletScopingModule extends com.google.inject.AbstractModule
Adds the RequestScoped and SessionScoped scope annotations, also exposes HttpCallContext, HttpServletRequest, HttpServletResponse and HttpSession based on the current HTTP call
  • Constructor Details

    • ServletScopingModule

      public ServletScopingModule()
  • Method Details

    • configure

      protected void configure()
      Overrides:
      configure in class com.google.inject.AbstractModule
    • getServletRequest

      @Provides public javax.servlet.http.HttpServletRequest getServletRequest(HttpCallContext call)
    • getServletResponse

      @Provides public javax.servlet.http.HttpServletResponse getServletResponse(HttpCallContext call)
    • getServletResponse

      @Provides public HttpCallContext getServletResponse()
    • getServletSession

      @Provides public javax.servlet.http.HttpSession getServletSession(HttpCallContext call)