|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Pipe
Pipe describes a collection of Filters that should be processed in sequence
when the doFilter method is called. It is required that a
filter somewhere in the pipe (often the last one) must process the request
and create the corresponding response, rather than trying to pass the request
on.
Pipe extends Filter making it possible to use pipe implementations in place of pure filter implementations where applicable.
| Method Summary | |
|---|---|
void |
addFilterName(int index,
ObjectName name)
Adds a new filter to the given location. |
void |
addFilterName(ObjectName name)
Adds a new filter to the end of the pipe. |
void |
clearFilterNames()
Clears all filters from the pipe. |
void |
closeNamedFilter(ObjectName filter)
Closes the named filter. |
void |
closeNamedFilter(ObjectName filter,
int index)
Closes the indexed filter. |
boolean |
containsFilterName(ObjectName filter)
Checks whether the specified filter is in the pipe. |
void |
doFilter(ServletRequest request,
ServletResponse response,
FilterChain chain)
Causes the specified request and response to be processed by the filters associated with this pipe, until one of these filters causes the response to be created and returned. |
ObjectName |
getFilterName(int index)
Gets the indexed filter in the pipe. |
List |
getFilterNames()
Gets filters in the pipe. |
Filter |
getFirstFilter()
Gets the first registered filter in the pipe. |
Filter |
getFirstFilter(Class clazz)
Gets the first registered filter of the specified class in the pipe. |
Filter |
getLastFilter()
Gets the last registered filter in the pipe. |
Filter |
getLastFilter(Class clazz)
Gets the last registered filter of the specified class in the pipe. |
Filter |
getNextFilter(int index)
Gets the next registered filter following the given location. |
Filter |
getNextFilter(int index,
Class clazz)
Gets the next registered filter of the specified class following the given location. |
Filter |
getPreviousFilter(int index)
Gets the previous registered filter preceding the given location. |
Filter |
getPreviousFilter(int index,
Class clazz)
Gets the previous registered filter of the specified class preceding the given location. |
boolean |
isNamedFilterOpen(ObjectName filter)
Checks whether the named filter is open. |
boolean |
isNamedFilterOpen(ObjectName filter,
int index)
Checks whether the indexed filter is open. |
int |
locateFilter(Class clazz)
Locates the first registered filter of the specified class in the pipe. |
int |
locateFilter(int index,
Class clazz)
Locates the next registered filter of the specified class following the given location. |
int |
locateNamedFilter(ObjectName filter)
Locates the named filter in the pipe. |
int |
locateNamedFilter(ObjectName filter,
int index)
Locates the named filter in the pipe from the given location. |
void |
openNamedFilter(ObjectName filter)
Opens the named filter. |
void |
openNamedFilter(ObjectName filter,
int index)
Opens the indexed filter. |
Filter |
queryFilter(String pattern)
Queries for a specified filter in the pipe. |
void |
removeFilterName(int index)
Removes the indexed filter from the pipe. |
void |
removeFilterName(ObjectName name)
Removes the first filter with the specified name from the pipe. |
void |
setFilterName(int index,
ObjectName name)
Sets the indexed filter in the pipe. |
void |
setFilterNames(List names)
Sets filters in the pipe. |
| Methods inherited from interface javax.servlet.Filter |
|---|
destroy, init |
| Method Detail |
|---|
List getFilterNames()
void setFilterNames(List names)
names - a list of object names of filters.void addFilterName(ObjectName name)
name - the object name of the new filter.
void addFilterName(int index,
ObjectName name)
index - the index of the location.name - the object name of the new filter.
IndexOutOfBoundsException - for an incorrect index.boolean containsFilterName(ObjectName filter)
filter - the object name of the filter.
ObjectName getFilterName(int index)
index - the index of the location.
IndexOutOfBoundsException - for an incorrect index.
void setFilterName(int index,
ObjectName name)
index - the index of the location.name - the object name of the filter.
IndexOutOfBoundsException - for an incorrect index.void removeFilterName(ObjectName name)
name - the object name of the filter.void removeFilterName(int index)
index - the index of the location.
IndexOutOfBoundsException - for an incorrect index.void clearFilterNames()
int locateNamedFilter(ObjectName filter)
filter - the object name of the filter.
int locateNamedFilter(ObjectName filter,
int index)
filter - the object name of the filter.index - the start index of the location.
IndexOutOfBoundsException - for an incorrect index.int locateFilter(Class clazz)
clazz - the class or interface.
int locateFilter(int index,
Class clazz)
index - the start index of the location.clazz - the class or interface.
IndexOutOfBoundsException - for an incorrect index.Filter queryFilter(String pattern)
pattern - the name pattern.
Filter getFirstFilter()
Filter getFirstFilter(Class clazz)
clazz - the class or interface.
Filter getLastFilter()
Filter getLastFilter(Class clazz)
clazz - the class or interface.
Filter getNextFilter(int index)
index - the index of the location.
IndexOutOfBoundsException - for an incorrect index.
Filter getNextFilter(int index,
Class clazz)
clazz - the class or interface.index - the index of the location.
IndexOutOfBoundsException - for an incorrect index.Filter getPreviousFilter(int index)
index - the index the location.
IndexOutOfBoundsException - for an incorrect index.
Filter getPreviousFilter(int index,
Class clazz)
clazz - the class or interface.index - the index of the location.
IndexOutOfBoundsException - for an incorrect index.boolean isNamedFilterOpen(ObjectName filter)
filter - the object name of the filter.
boolean isNamedFilterOpen(ObjectName filter,
int index)
filter - the object name of the filter.index - the start index of the location.
IndexOutOfBoundsException - for an incorrect index.void openNamedFilter(ObjectName filter)
filter - the object name of the filter.void closeNamedFilter(ObjectName filter)
filter - the object name of the filter.
void openNamedFilter(ObjectName filter,
int index)
filter - the object name of the filter.index - the start index of the location.
IndexOutOfBoundsException - for an incorrect index.
void closeNamedFilter(ObjectName filter,
int index)
filter - the object name of the filter.index - the start index of the location.
IndexOutOfBoundsException - for an incorrect index.
void doFilter(ServletRequest request,
ServletResponse response,
FilterChain chain)
throws ServletException,
IOException
Note that changes to the list of filters in the pipe during one request will be effective only for forthcoming requests.
doFilter in interface Filterrequest - the request to process.response - the response to return.chain - the filter chain from preceding pipes.
ServletException - for servlet errors.
IOException - for general errors.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||