The configuration applied to this filter via init params will be used as the the default
configuration of any websocket upgraded by this filter, prior to the configuration of the
websocket applied by the WebSocketMappings.
Configuration / Init-Parameters:
| Modifier and Type | Field and Description |
|---|---|
| private final Configuration. | |
| private static final AutoLock | |
| private static final Logger | |
| private WebSocketMappings |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | destroy()
Overrides default jakarta. Called by the web container to indicate to a filter that it is being taken out of service. |
| public void | doFilter(ServletRequest
the request, ServletResponse ServletRequest object contains the client's requestthe response, FilterChain ServletResponse object contains the filter's responsethe chain)FilterChain for invoking the next filter or the resourceImplements jakarta. The |
| public void | dump(Appendable
The appendable to dump to out, String The indent to apply after any new lines. indent)Implements org. Dump this object (and children) into an Appendable using the provided indent after any new lines. |
| public static FilterHolder | Returns: the configured defaultWebSocketUpgradeFilter instance.the servletContext)ServletContext to use.Ensure a |
| public static FilterHolder | Returns: the configured defaultWebSocketUpgradeFilter instance.the servletContext)ServletContext to use.Return the default |
| public void | init(FilterConfig
a config)FilterConfig object containing the filter's configuration and initialization
parametersOverrides default jakarta. Called by the web container to indicate to a filter that it is being placed into service. |
| defaultCustomizer | back to summary |
|---|---|
| private final Configuration. | |
| LOCK | back to summary |
|---|---|
| private static final AutoLock LOCK | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| mappings | back to summary |
|---|---|
| private WebSocketMappings mappings | |
| WebSocketUpgradeFilter | back to summary |
|---|---|
| public WebSocketUpgradeFilter() | |
| destroy | back to summary |
|---|---|
| public void destroy() Overrides default jakarta. Doc from jakarta. Called by the web container to indicate to a filter that it is being taken out of service. This method is only called once all threads within the filter's doFilter method have exited or after a timeout period has passed. After the web container calls this method, it will not call the doFilter method again on this instance of the filter. This method gives the filter an opportunity to clean up any resources that are being held (for example, memory, file handles, threads) and make sure that any persistent state is synchronized with the filter's current state in memory.
| |
| doFilter | back to summary |
|---|---|
| public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException Implements jakarta. Doc from jakarta. The A typical implementation of this method would follow the following pattern:
| |
| dump | back to summary |
|---|---|
| public void dump(Appendable out, String indent) throws IOException Implements org. Doc from org. Dump this object (and children) into an Appendable using the provided indent after any new lines. The indent should not be applied to the first object dumped.
| |
| ensureFilter | back to summary |
|---|---|
| public static FilterHolder ensureFilter(ServletContext servletContext) Ensure a
The default
| |
| getFilter | back to summary |
|---|---|
| public static FilterHolder getFilter(ServletContext servletContext) Return the default
| |
| init | back to summary |
|---|---|
| public void init(FilterConfig config) throws ServletException Overrides default jakarta. Doc from jakarta. Called by the web container to indicate to a filter that it is being placed into service.
The servlet container calls the init method exactly once after instantiating the filter. The init method must
complete successfully before the filter is asked to do any filtering work. The container will ensure that actions
performed in the The web container cannot place the filter into service if the init method either
| |