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 and Description
    `GuiceResteasyBootstrapServletContextListener()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and 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 your `Module`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 the `Injector` after it has been created.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### GuiceResteasyBootstrapServletContextListener

          public GuiceResteasyBootstrapServletContextListener()

  - ### Method Detail

    - #### contextInitialized

          public void contextInitialized(javax.servlet.ServletContextEvent event)

      Specified by:
        `contextInitialized` in interface `javax.servlet.ServletContextListener`
      Overrides:
        `contextInitialized` in class `ResteasyBootstrap`

    - #### withInjector

          protected void withInjector(com.google.inject.Injector injector)

      Override this method to interact with the `Injector` 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 your `Module`s yourself.
      Parameters:
        `context` -
      Returns:

    - #### contextDestroyed

          public void contextDestroyed(javax.servlet.ServletContextEvent event)

      Specified by:
        `contextDestroyed` in interface `javax.servlet.ServletContextListener`
      Overrides:
        `contextDestroyed` in class `ResteasyBootstrap`

Copyright © 2014. All Rights Reserved.