Package org.jboss.resteasy.plugins.guice
Class GuiceResteasyBootstrapServletContextListener
- java.lang.Object
-
- org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap
-
- org.jboss.resteasy.plugins.guice.GuiceResteasyBootstrapServletContextListener
-
- All Implemented Interfaces:
EventListener,javax.servlet.ServletContextListener
public class GuiceResteasyBootstrapServletContextListener extends org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap implements javax.servlet.ServletContextListener
-
-
Constructor Summary
Constructors Constructor Description GuiceResteasyBootstrapServletContextListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcontextDestroyed(javax.servlet.ServletContextEvent event)voidcontextInitialized(javax.servlet.ServletContextEvent event)protected List<? extends com.google.inject.Module>getModules(javax.servlet.ServletContext context)Override this method to instantiate yourModules yourself.protected com.google.inject.StagegetStage(javax.servlet.ServletContext context)Override this method to set the Stage.protected voidwithInjector(com.google.inject.Injector injector)Override this method to interact with theInjectorafter it has been created.
-
-
-
Method Detail
-
contextInitialized
public void contextInitialized(javax.servlet.ServletContextEvent event)
- Specified by:
contextInitializedin interfacejavax.servlet.ServletContextListener- Overrides:
contextInitializedin classorg.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap
-
withInjector
protected void withInjector(com.google.inject.Injector injector)
Override this method to interact with theInjectorafter it has been created. The default is no-op.- Parameters:
injector-
-
getStage
protected com.google.inject.Stage getStage(javax.servlet.ServletContext context)
Override this method to set the Stage. By default it is taken from resteasy.guice.stage context param.- Parameters:
context-- Returns:
- Guice Stage
-
getModules
protected List<? extends com.google.inject.Module> getModules(javax.servlet.ServletContext context)
Override this method to instantiate yourModules yourself.- Parameters:
context-- Returns:
-
contextDestroyed
public void contextDestroyed(javax.servlet.ServletContextEvent event)
- Specified by:
contextDestroyedin interfacejavax.servlet.ServletContextListener- Overrides:
contextDestroyedin classorg.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap
-
-