public abstract class Filterable
extends java.lang.Object
ClientFilter
instances.
A ClientFilter
instance MUST be occur at most once in any Filterable
instance,
otherwise unexpected results may occur. If it is necessary to add the same type of ClientFilter
more than once to
the same Filterable
instance or to more than one Filterable
instance then a new instance of that ClientFilter
MUST be added.Modifier | Constructor and Description |
---|---|
protected |
Filterable(ClientHandler root)
Construct with a root client handler.
|
protected |
Filterable(Filterable that)
Construct from an existing filterable instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addFilter(ClientFilter f)
Add a filter to the filter chain.
|
ClientHandler |
getHeadHandler()
Get the head client handler of the filter chain.
|
boolean |
isFilterPresent(ClientFilter filter)
Check if a filter is present in the chain.
|
boolean |
isFilterPreset(ClientFilter filter)
Deprecated.
use
isFilterPresent(ClientFilter) instead. |
void |
removeAllFilters()
Remove all filters from the filter chain.
|
void |
removeFilter(ClientFilter f)
Remove a filter from the chain.
|
protected Filterable(ClientHandler root)
root
- the root handler to handle the request and return a response.protected Filterable(Filterable that)
that
- the filter to copy.public void addFilter(ClientFilter f)
f
- the filter to add.public void removeFilter(ClientFilter f)
f
- the filter to remove.@Deprecated public boolean isFilterPreset(ClientFilter filter)
isFilterPresent(ClientFilter)
instead.filter
- the filter to remove.true
if the filter is present, otherwise false
.public boolean isFilterPresent(ClientFilter filter)
filter
- the filter to remove.true
if the filter is present, otherwise false
.public void removeAllFilters()
public ClientHandler getHeadHandler()
Copyright © 2016 Oracle Corporation. All Rights Reserved.