Package org.apache.shiro.web.filter.mgt
Class SimpleNamedFilterList
- java.lang.Object
-
- org.apache.shiro.web.filter.mgt.SimpleNamedFilterList
-
- All Implemented Interfaces:
Iterable<javax.servlet.Filter>,Collection<javax.servlet.Filter>,List<javax.servlet.Filter>,NamedFilterList
public class SimpleNamedFilterList extends Object implements NamedFilterList
SimpleNamedFilterListimplementation that is supported by a backingListinstance and a simplenameproperty. AllListmethod implementations are immediately delegated to the wrapped backing list.- Since:
- 1.0
-
-
Constructor Summary
Constructors Constructor Description SimpleNamedFilterList(String name)Creates a newSimpleNamedFilterListinstance with the specifiedname, defaulting to a newArrayListinstance as the backing list.SimpleNamedFilterList(String name, List<javax.servlet.Filter> backingList)Creates a newSimpleNamedFilterListinstance with the specifiednameandbackingList.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int index, javax.servlet.Filter filter)booleanadd(javax.servlet.Filter filter)booleanaddAll(int index, Collection<? extends javax.servlet.Filter> c)booleanaddAll(Collection<? extends javax.servlet.Filter> c)voidclear()booleancontains(Object o)booleancontainsAll(Collection<?> c)javax.servlet.Filterget(int index)StringgetName()Returns the configuration-unique name assigned to thisFilterlist.intindexOf(Object o)booleanisEmpty()Iterator<javax.servlet.Filter>iterator()intlastIndexOf(Object o)ListIterator<javax.servlet.Filter>listIterator()ListIterator<javax.servlet.Filter>listIterator(int index)javax.servlet.FilterChainproxy(javax.servlet.FilterChain orig)Returns a newFilterChaininstance that will first execute this list'sFilters (in list order) and end with the execution of the givenfilterChaininstance.javax.servlet.Filterremove(int index)booleanremove(Object o)booleanremoveAll(Collection<?> c)booleanretainAll(Collection<?> c)javax.servlet.Filterset(int index, javax.servlet.Filter filter)protected voidsetName(String name)intsize()List<javax.servlet.Filter>subList(int fromIndex, int toIndex)Object[]toArray()<T> T[]toArray(T[] a)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
equals, hashCode, replaceAll, sort, spliterator
-
-
-
-
Constructor Detail
-
SimpleNamedFilterList
public SimpleNamedFilterList(String name)
Creates a newSimpleNamedFilterListinstance with the specifiedname, defaulting to a newArrayListinstance as the backing list.- Parameters:
name- the name to assign to this instance.- Throws:
IllegalArgumentException- ifnameis null or empty.
-
SimpleNamedFilterList
public SimpleNamedFilterList(String name, List<javax.servlet.Filter> backingList)
Creates a newSimpleNamedFilterListinstance with the specifiednameandbackingList.- Parameters:
name- the name to assign to this instance.backingList- the list instance used to back all of this class'sListmethod implementations.- Throws:
IllegalArgumentException- ifnameis null or empty.NullPointerException- if the backing list isnull.
-
-
Method Detail
-
setName
protected void setName(String name)
-
getName
public String getName()
Description copied from interface:NamedFilterListReturns the configuration-unique name assigned to thisFilterlist.- Specified by:
getNamein interfaceNamedFilterList- Returns:
- the configuration-unique name assigned to this
Filterlist.
-
proxy
public javax.servlet.FilterChain proxy(javax.servlet.FilterChain orig)
Description copied from interface:NamedFilterListReturns a newFilterChaininstance that will first execute this list'sFilters (in list order) and end with the execution of the givenfilterChaininstance.- Specified by:
proxyin interfaceNamedFilterList- Parameters:
orig- theFilterChaininstance to execute after this list'sFilters have executed.- Returns:
- a new
FilterChaininstance that will first execute this list'sFilters (in list order) and end with the execution of the givenfilterChaininstance.
-
add
public boolean add(javax.servlet.Filter filter)
- Specified by:
addin interfaceCollection<javax.servlet.Filter>- Specified by:
addin interfaceList<javax.servlet.Filter>
-
add
public void add(int index, javax.servlet.Filter filter)
-
addAll
public boolean addAll(Collection<? extends javax.servlet.Filter> c)
- Specified by:
addAllin interfaceCollection<javax.servlet.Filter>- Specified by:
addAllin interfaceList<javax.servlet.Filter>
-
addAll
public boolean addAll(int index, Collection<? extends javax.servlet.Filter> c)
-
clear
public void clear()
- Specified by:
clearin interfaceCollection<javax.servlet.Filter>- Specified by:
clearin interfaceList<javax.servlet.Filter>
-
contains
public boolean contains(Object o)
- Specified by:
containsin interfaceCollection<javax.servlet.Filter>- Specified by:
containsin interfaceList<javax.servlet.Filter>
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAllin interfaceCollection<javax.servlet.Filter>- Specified by:
containsAllin interfaceList<javax.servlet.Filter>
-
get
public javax.servlet.Filter get(int index)
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceCollection<javax.servlet.Filter>- Specified by:
isEmptyin interfaceList<javax.servlet.Filter>
-
iterator
public Iterator<javax.servlet.Filter> iterator()
-
lastIndexOf
public int lastIndexOf(Object o)
- Specified by:
lastIndexOfin interfaceList<javax.servlet.Filter>
-
listIterator
public ListIterator<javax.servlet.Filter> listIterator()
- Specified by:
listIteratorin interfaceList<javax.servlet.Filter>
-
listIterator
public ListIterator<javax.servlet.Filter> listIterator(int index)
- Specified by:
listIteratorin interfaceList<javax.servlet.Filter>
-
remove
public javax.servlet.Filter remove(int index)
-
remove
public boolean remove(Object o)
- Specified by:
removein interfaceCollection<javax.servlet.Filter>- Specified by:
removein interfaceList<javax.servlet.Filter>
-
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAllin interfaceCollection<javax.servlet.Filter>- Specified by:
removeAllin interfaceList<javax.servlet.Filter>
-
retainAll
public boolean retainAll(Collection<?> c)
- Specified by:
retainAllin interfaceCollection<javax.servlet.Filter>- Specified by:
retainAllin interfaceList<javax.servlet.Filter>
-
set
public javax.servlet.Filter set(int index, javax.servlet.Filter filter)
-
size
public int size()
- Specified by:
sizein interfaceCollection<javax.servlet.Filter>- Specified by:
sizein interfaceList<javax.servlet.Filter>
-
subList
public List<javax.servlet.Filter> subList(int fromIndex, int toIndex)
-
toArray
public Object[] toArray()
- Specified by:
toArrayin interfaceCollection<javax.servlet.Filter>- Specified by:
toArrayin interfaceList<javax.servlet.Filter>
-
toArray
public <T> T[] toArray(T[] a)
- Specified by:
toArrayin interfaceCollection<javax.servlet.Filter>- Specified by:
toArrayin interfaceList<javax.servlet.Filter>
-
-