@WebFilter(value="/*",
asyncSupported=true,
displayName="Graceful Shutdown Filter")
public class GracefulShutdownFilter
extends Object
implements javax.servlet.Filter
| Constructor and Description |
|---|
GracefulShutdownFilter() |
| Modifier and Type | Method and Description |
|---|---|
int |
decrementActiveRequestCounter()
Method decrements the request counter by one.
|
void |
destroy()
Method will be called before the filter is finally deleted.
|
void |
doFilter(javax.servlet.ServletRequest pRequest,
javax.servlet.ServletResponse pResponse,
javax.servlet.FilterChain pChain)
Implementation of the concrete filtering.
|
int |
getActiveRequestCounter()
Method returns the current amount of active requests.
|
int |
incrementActiveRequestCounter()
Method increments the request counter by one.
|
void |
init(javax.servlet.FilterConfig pFilterConfig)
Initialize filter.
|
boolean |
isShutdownRequested()
Method returns if we are in the shutdown mode.
|
void |
shutdownRequested(boolean pShutdownRequested)
Method can be used to switch the filter into shutdown mode.
|
public boolean isShutdownRequested()
public void shutdownRequested(boolean pShutdownRequested)
pShutdownRequested - Parameter will switch filter to shutdown mode in case that it is true and will disable
shutdown mode if it is false.public int incrementActiveRequestCounter()
public int decrementActiveRequestCounter()
public int getActiveRequestCounter()
public void init(javax.servlet.FilterConfig pFilterConfig)
throws javax.servlet.ServletException
init in interface javax.servlet.Filterjavax.servlet.ServletExceptionpublic void doFilter(javax.servlet.ServletRequest pRequest,
javax.servlet.ServletResponse pResponse,
javax.servlet.FilterChain pChain)
throws IOException,
javax.servlet.ServletException
doFilter in interface javax.servlet.FilterIOExceptionjavax.servlet.ServletExceptionpublic void destroy()
destroy in interface javax.servlet.FilterCopyright © 2022. All rights reserved.