001/* 002 * Licensed to the Apache Software Foundation (ASF) under one 003 * or more contributor license agreements. See the NOTICE file 004 * distributed with this work for additional information 005 * regarding copyright ownership. The ASF licenses this file 006 * to you under the Apache License, Version 2.0 (the 007 * "License"); you may not use this file except in compliance 008 * with the License. You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, 013 * software distributed under the License is distributed on an 014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 015 * KIND, either express or implied. See the License for the 016 * specific language governing permissions and limitations 017 * under the License. 018 */ 019package org.apache.shiro.web.filter.mgt; 020 021import javax.servlet.Filter; 022import javax.servlet.FilterChain; 023import java.util.List; 024 025/** 026 * A {@code NamedFilterList} is a {@code List} of {@code Filter} instances that is uniquely identified by a 027 * {@link #getName() name}. It has the ability to generate new {@link FilterChain} instances reflecting this list's 028 * filter order via the {@link #proxy proxy} method. 029 * 030 * @since 1.0 031 */ 032public interface NamedFilterList extends List<Filter> { 033 034 /** 035 * Returns the configuration-unique name assigned to this {@code Filter} list. 036 * 037 * @return the configuration-unique name assigned to this {@code Filter} list. 038 */ 039 String getName(); 040 041 /** 042 * Returns a new {@code FilterChain} instance that will first execute this list's {@code Filter}s (in list order) 043 * and end with the execution of the given {@code filterChain} instance. 044 * 045 * @param filterChain the {@code FilterChain} instance to execute after this list's {@code Filter}s have executed. 046 * @return a new {@code FilterChain} instance that will first execute this list's {@code Filter}s (in list order) 047 * and end with the execution of the given {@code filterChain} instance. 048 */ 049 FilterChain proxy(FilterChain filterChain); 050}