Class JerseyHandlerFilter
java.lang.Object
com.amazonaws.serverless.proxy.jersey.JerseyHandlerFilter
- All Implemented Interfaces:
jakarta.servlet.Filter,org.glassfish.jersey.server.spi.Container
public class JerseyHandlerFilter
extends Object
implements jakarta.servlet.Filter, org.glassfish.jersey.server.spi.Container
Servlet filter class that calls Jersey's ApplicationHandler. Given a Jax RS Application object, this class
initializes a Jersey
ApplicationHandler and calls its handle method. Requests are transformed
to ContainerRequest objects by the servletRequestToContainerRequest(ServletRequest) method.
Jersey responses are written directly to the ServletResponse by the JerseyServletResponseWriter.-
Field Summary
FieldsFields inherited from interface org.glassfish.jersey.server.spi.Container
DEFAULT_HTTP_PORT, DEFAULT_HTTPS_PORT -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()voiddoFilter(jakarta.servlet.ServletRequest servletRequest, jakarta.servlet.ServletResponse servletResponse, jakarta.servlet.FilterChain filterChain) org.glassfish.jersey.server.ApplicationHandlerorg.glassfish.jersey.server.ResourceConfigvoidinit(jakarta.servlet.FilterConfig filterConfig) voidreload()Shuts down and restarts the application handler in the current container.voidreload(org.glassfish.jersey.server.ResourceConfig resourceConfig) Restarts the application handler and configures a differentApplicationobject.
-
Field Details
-
JERSEY_SERVLET_REQUEST_PROPERTY
- See Also:
-
JERSEY_SERVLET_RESPONSE_PROPERTY
- See Also:
-
-
Method Details
-
init
public void init(jakarta.servlet.FilterConfig filterConfig) - Specified by:
initin interfacejakarta.servlet.Filter
-
doFilter
public void doFilter(jakarta.servlet.ServletRequest servletRequest, jakarta.servlet.ServletResponse servletResponse, jakarta.servlet.FilterChain filterChain) throws IOException, jakarta.servlet.ServletException - Specified by:
doFilterin interfacejakarta.servlet.Filter- Throws:
IOExceptionjakarta.servlet.ServletException
-
destroy
public void destroy()- Specified by:
destroyin interfacejakarta.servlet.Filter
-
getConfiguration
public org.glassfish.jersey.server.ResourceConfig getConfiguration()- Specified by:
getConfigurationin interfaceorg.glassfish.jersey.server.spi.Container
-
getApplicationHandler
public org.glassfish.jersey.server.ApplicationHandler getApplicationHandler()- Specified by:
getApplicationHandlerin interfaceorg.glassfish.jersey.server.spi.Container
-
reload
public void reload()Shuts down and restarts the application handler in the current container. TheApplicationHandlerobject is re-initialized with theApplicationobject initially set in theLambdaContainer.getInstance()call.- Specified by:
reloadin interfaceorg.glassfish.jersey.server.spi.Container
-
reload
public void reload(org.glassfish.jersey.server.ResourceConfig resourceConfig) Restarts the application handler and configures a differentApplicationobject. The new application resets the one currently configured in the container.- Specified by:
reloadin interfaceorg.glassfish.jersey.server.spi.Container- Parameters:
resourceConfig- An initialized Application
-