|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.norther.tammi.core.base.Adaptee
org.norther.tammi.spray.filter.DefaultFilter
org.norther.tammi.spray.filter.DefaultPipe
public class DefaultPipe
A default implementation of Pipe invoking a series of filters that have been configured to be called in order.
| Field Summary |
|---|
| Fields inherited from class org.norther.tammi.core.base.Adaptee |
|---|
ADAPTEE_NOTIF_DESCRIPTION, ADAPTEE_NOTIFICATIONS |
| Fields inherited from interface org.norther.tammi.core.base.MBeanDelegate |
|---|
ARRAY_TYPE, OBJECT_TYPE, PRIMITIVE_TYPE, STRING_TYPE |
| Constructor Summary | |
|---|---|
DefaultPipe()
Constructs a new pipe. |
|
| 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. |
protected int |
locate(ObjectName filter,
Object[] list,
int start)
Locates the specified filter in the filter list from the given location. |
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 class org.norther.tammi.spray.filter.DefaultFilter |
|---|
destroy, getFilterConfig, getRequestMap, getSessionMap, init |
| Methods inherited from class org.norther.tammi.core.base.Adaptee |
|---|
addAdaptee, addNotificationListener, getAttributeSupport, getBroker, getCanonicalName, getDomain, getFactory, getLoader, getLog, getLog, getMBean, getMBeanServer, getNotificationInfo, getObjectName, getRegistrationTime, getSequenceNumber, hasListeners, isRegistered, postmanaged, premanaged, removeNotificationListener, removeNotificationListener, sendNotification, sendNotification, sendNotification, sendNotification, unmanaged, unregister |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.servlet.Filter |
|---|
destroy, init |
| Constructor Detail |
|---|
public DefaultPipe()
| Method Detail |
|---|
public List getFilterNames()
Pipe
getFilterNames in interface Pipepublic void setFilterNames(List names)
Pipe
setFilterNames in interface Pipenames - a list of object names of filters.public void addFilterName(ObjectName name)
Pipe
addFilterName in interface Pipename - the object name of the new filter.
public void addFilterName(int index,
ObjectName name)
Pipe
addFilterName in interface Pipeindex - the index of the location.name - the object name of the new filter.public boolean containsFilterName(ObjectName filter)
Pipe
containsFilterName in interface Pipefilter - the object name of the filter.
public ObjectName getFilterName(int index)
Pipe
getFilterName in interface Pipeindex - the index of the location.
public void setFilterName(int index,
ObjectName name)
Pipe
setFilterName in interface Pipeindex - the index of the location.name - the object name of the filter.public void removeFilterName(ObjectName name)
Pipe
removeFilterName in interface Pipename - the object name of the filter.public void removeFilterName(int index)
Pipe
removeFilterName in interface Pipeindex - the index of the location.public void clearFilterNames()
Pipe
clearFilterNames in interface Pipepublic int locateNamedFilter(ObjectName filter)
Pipe
locateNamedFilter in interface Pipefilter - the object name of the filter.
public int locateNamedFilter(ObjectName filter,
int index)
Pipe
locateNamedFilter in interface Pipefilter - the object name of the filter.index - the start index of the location.
public int locateFilter(Class clazz)
Pipe
locateFilter in interface Pipeclazz - the class or interface.
public int locateFilter(int index,
Class clazz)
Pipe
locateFilter in interface Pipeindex - the start index of the location.clazz - the class or interface.
public Filter queryFilter(String pattern)
Pipe
queryFilter in interface Pipepattern - the name pattern.
public Filter getFirstFilter()
Pipe
getFirstFilter in interface Pipepublic Filter getLastFilter()
Pipe
getLastFilter in interface Pipepublic Filter getNextFilter(int index)
Pipe
getNextFilter in interface Pipeindex - the index of the location.
public Filter getPreviousFilter(int index)
Pipe
getPreviousFilter in interface Pipeindex - the index the location.
public Filter getFirstFilter(Class clazz)
Pipe
getFirstFilter in interface Pipeclazz - the class or interface.
public Filter getLastFilter(Class clazz)
Pipe
getLastFilter in interface Pipeclazz - the class or interface.
public Filter getNextFilter(int index,
Class clazz)
Pipe
getNextFilter in interface Pipeindex - the index of the location.clazz - the class or interface.
public Filter getPreviousFilter(int index,
Class clazz)
Pipe
getPreviousFilter in interface Pipeindex - the index of the location.clazz - the class or interface.
public boolean isNamedFilterOpen(ObjectName filter)
Pipe
isNamedFilterOpen in interface Pipefilter - the object name of the filter.
public boolean isNamedFilterOpen(ObjectName filter,
int index)
Pipe
isNamedFilterOpen in interface Pipefilter - the object name of the filter.index - the start index of the location.
public void openNamedFilter(ObjectName filter)
Pipe
openNamedFilter in interface Pipefilter - the object name of the filter.public void closeNamedFilter(ObjectName filter)
Pipe
closeNamedFilter in interface Pipefilter - the object name of the filter.
public void openNamedFilter(ObjectName filter,
int index)
Pipe
openNamedFilter in interface Pipefilter - the object name of the filter.index - the start index of the location.
public void closeNamedFilter(ObjectName filter,
int index)
Pipe
closeNamedFilter in interface Pipefilter - the object name of the filter.index - the start index of the location.
public void doFilter(ServletRequest request,
ServletResponse response,
FilterChain chain)
throws ServletException,
IOException
PipeNote that changes to the list of filters in the pipe during one request will be effective only for forthcoming requests.
doFilter in interface FilterdoFilter in interface PipedoFilter in class DefaultFilterrequest - the request to process.response - the response to return.chain - the filter chain from preceding pipes.
ServletException - for servlet errors.
IOException - for general errors.
protected int locate(ObjectName filter,
Object[] list,
int start)
filter - the object name of the filter.list - the list of filter references.start - the start index of the location.
IndexOutOfBoundsException - for an incorrect index.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||