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 ResteasyBootstrap implements javax.servlet.ServletContextListener
-
-
Field Summary
-
Fields inherited from class org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap
deployment
-
-
Constructor Summary
Constructors Constructor Description GuiceResteasyBootstrapServletContextListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
contextDestroyed(javax.servlet.ServletContextEvent event)
void
contextInitialized(javax.servlet.ServletContextEvent event)
protected List<? extends com.google.inject.Module>
getModules(javax.servlet.ServletContext context)
Override this method to instantiate yourModule
s yourself.protected com.google.inject.Stage
getStage(javax.servlet.ServletContext context)
Override this method to set the Stage.protected void
withInjector(com.google.inject.Injector injector)
Override this method to interact with theInjector
after it has been created.
-
-
-
Method Detail
-
contextInitialized
public void contextInitialized(javax.servlet.ServletContextEvent event)
- Specified by:
contextInitialized
in interfacejavax.servlet.ServletContextListener
- Overrides:
contextInitialized
in classResteasyBootstrap
-
withInjector
protected void withInjector(com.google.inject.Injector injector)
Override this method to interact with theInjector
after 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 yourModule
s yourself.- Parameters:
context
-- Returns:
-
contextDestroyed
public void contextDestroyed(javax.servlet.ServletContextEvent event)
- Specified by:
contextDestroyed
in interfacejavax.servlet.ServletContextListener
- Overrides:
contextDestroyed
in classResteasyBootstrap
-
-