Top Description Fields Constructors Methods
org.glassfish.grizzly.servlet

pack-priv final Class FilterChainImpl

extends Object
implements FilterChain, FilterChainInvoker
Class Inheritance
All Implemented Interfaces
org.glassfish.grizzly.servlet.FilterChainInvoker, jakarta.servlet.FilterChain
Imports
java.io.IOException, java.util.EventListener, java.util.logging.Level, .Logger, org.glassfish.grizzly.Grizzly, org.glassfish.grizzly.localization.LogMessages, jakarta.servlet.Filter, .FilterChain, .Servlet, .ServletException, .ServletRequest, .ServletRequestEvent, .ServletRequestListener, .ServletResponse

Implementation of jakarta.servlet.FilterChain used to manage the execution of a set of filters for a particular request. When the set of defined filters has all been executed, the next call to doFilter() will execute the servlet's service() method itself.
Author
Craig R. McClanahan

Field Summary

Modifier and TypeField and Description
private final WebappContext
private FilterRegistration[]
private final Object
private static final Logger
private int
n

private int
pos

The int which is used to maintain the current position in the filter chain.

private final Servlet
servlet

The servlet instance to be executed by this chain.

Constructor Summary

AccessConstructor and Description
public
FilterChainImpl(final Servlet servlet, final WebappContext ctx)

Method Summary

Modifier and TypeMethod and Description
protected void
addFilter(final FilterRegistration filterRegistration)

public void
doFilter(ServletRequest
The servlet request we are processing
request
,
ServletResponse
The servlet response we are creating
response
)

Implements jakarta.servlet.FilterChain.doFilter.

Invoke the next filter in this chain, passing the specified request and response.

public void
private void
private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ctxback to summary
private final WebappContext ctx
filtersback to summary
private FilterRegistration[] filters
lockback to summary
private final Object lock
LOGGERback to summary
private static final Logger LOGGER
nback to summary
private int n
posback to summary
private int pos

The int which is used to maintain the current position in the filter chain.

servletback to summary
private final Servlet servlet

The servlet instance to be executed by this chain.

Constructor Detail

FilterChainImplback to summary
public FilterChainImpl(final Servlet servlet, final WebappContext ctx)

Method Detail

addFilterback to summary
protected void addFilter(final FilterRegistration filterRegistration)
doFilterback to summary
public void doFilter(ServletRequest request, ServletResponse response) throws IOException, ServletException

Implements jakarta.servlet.FilterChain.doFilter.

Invoke the next filter in this chain, passing the specified request and response. If there are no more filters in this chain, invoke the service() method of the servlet itself.

Parameters
request:ServletRequest

The servlet request we are processing

response:ServletResponse

The servlet response we are creating

Annotations
@Override
Exceptions
IOException:
if an input/output error occurs
ServletException:
if a servlet exception occurs
invokeFilterChainback to summary
public void invokeFilterChain(ServletRequest request, ServletResponse response) throws IOException, ServletException

Implements org.glassfish.grizzly.servlet.FilterChainInvoker.invokeFilterChain.

Annotations
@Override
requestDestroyedback to summary
private void requestDestroyed(ServletRequestEvent event)
requestInitializedback to summary
private void requestInitialized(ServletRequestEvent event)