Class NoOpServletContainerProvider

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean bindsServletRequestResponse()
      Used by Jersey runtime to tell if the extension covers HTTP Servlet request response handling with respect to underlying injection manager.
      void configure​(ResourceConfig resourceConfig)
      This method is called for each ServletContainer instance initialization, i.e.
      RequestScopedInitializerProvider getRequestScopedInitializerProvider()
      Give me a RequestScopedInitializerProvider instance, that will be utilized at runtime to set the actual HTTP Servlet request and response.
      void onRegister​(javax.servlet.ServletContext servletContext, java.util.Set<java.lang.String> servletNames)
      Notifies the provider about all registered Jersey servlets by its names.
      void postInit​(javax.servlet.ServletContext servletContext, java.util.Set<java.lang.Class<?>> classes, java.util.Set<java.lang.String> servletNames)
      Do your post-initialization job after Jersey finished its servlet initialization.
      void preInit​(javax.servlet.ServletContext servletContext, java.util.Set<java.lang.Class<?>> classes)
      Do your pre-initialization job before Jersey starts its servlet initialization.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • HTTP_SERVLET_REQUEST_TYPE

        public final java.lang.reflect.Type HTTP_SERVLET_REQUEST_TYPE
      • HTTP_SERVLET_RESPONSE_TYPE

        public final java.lang.reflect.Type HTTP_SERVLET_RESPONSE_TYPE
    • Constructor Detail

      • NoOpServletContainerProvider

        public NoOpServletContainerProvider()
    • Method Detail

      • preInit

        public void preInit​(javax.servlet.ServletContext servletContext,
                            java.util.Set<java.lang.Class<?>> classes)
                     throws javax.servlet.ServletException
        Description copied from interface: ServletContainerProvider
        Do your pre-initialization job before Jersey starts its servlet initialization. It is allowed to configure ServletContext or add/remove servlet registrations. Parameter servletNames contains list of names of currently registered Jersey servlets.
        Specified by:
        preInit in interface ServletContainerProvider
        Parameters:
        servletContext - the ServletContext of the JAX-RS/Jersey web application that is being started.
        classes - the mutable Set of application classes that extend Application, implement, or have been annotated with the class types Path, Provider or ApplicationPath. May be empty, never null.
        Throws:
        javax.servlet.ServletException - if an error has occurred. javax.servlet.ServletContainerInitializer.onStartup is interrupted.
      • postInit

        public void postInit​(javax.servlet.ServletContext servletContext,
                             java.util.Set<java.lang.Class<?>> classes,
                             java.util.Set<java.lang.String> servletNames)
        Description copied from interface: ServletContainerProvider
        Do your post-initialization job after Jersey finished its servlet initialization. It is allowed to configure ServletContext or add/remove servlet registrations. Parameter servletNames contains list of names of currently registered Jersey servlets.
        Specified by:
        postInit in interface ServletContainerProvider
        Parameters:
        servletContext - the ServletContext of the JAX-RS/Jersey web application that is being started.
        classes - the mutable Set of application classes that extend Application, implement, or have been annotated with the class types Path, Provider or ApplicationPath. May be empty, never null.
        servletNames - the Immutable set of Jersey's ServletContainer names. May be empty, never null.
      • onRegister

        public void onRegister​(javax.servlet.ServletContext servletContext,
                               java.util.Set<java.lang.String> servletNames)
                        throws javax.servlet.ServletException
        Description copied from interface: ServletContainerProvider
        Notifies the provider about all registered Jersey servlets by its names. It is allowed to configure ServletContext. Do not add/remove any servlet registrations here. Parameter servletNames contains list of names of registered Jersey servlets. Currently it is ServletContainer or org.glassfish.jersey.servlet.portability.PortableServletContainer servlets. It does not matter servlet container is configured in web.xml, by org.glassfish.jersey.servlet.init.JerseyServletContainerInitializer or by customer direct Servlet API calls.
        Specified by:
        onRegister in interface ServletContainerProvider
        Parameters:
        servletContext - the ServletContext of the JAX-RS/Jersey web application that is being started.
        servletNames - the Immutable set of Jersey's ServletContainer names. May be empty, never null.
        Throws:
        javax.servlet.ServletException - if an error has occurred. javax.servlet.ServletContainerInitializer.onStartup is interrupted.
      • configure

        public void configure​(ResourceConfig resourceConfig)
                       throws javax.servlet.ServletException
        Description copied from interface: ServletContainerProvider
        This method is called for each ServletContainer instance initialization, i.e. during WebComponent initialization. The method is also called during ServletContainer.reload() or ServletContainer.reload(ResourceConfig) methods invocation. It does not matter servlet container is configured in web.xml, by org.glassfish.jersey.servlet.init.JerseyServletContainerInitializer or by customer direct Servlet API calls.
        Specified by:
        configure in interface ServletContainerProvider
        Parameters:
        resourceConfig - Jersey application configuration.
        Throws:
        javax.servlet.ServletException - if an error has occurred. org.glassfish.jersey.servlet.WebComponent construction is interrupted.