LinkedFilterBinding.java revision b4b7f7209570bd75352eb322825ae79392f03978
1/** 2 * Copyright (C) 2010 Google Inc. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17package com.google.inject.servlet; 18 19import java.util.Map; 20 21import javax.servlet.Filter; 22 23import com.google.inject.Key; 24 25/** 26 * A linked binding to a filter. 27 * 28 * @author sameb@google.com 29 * @since 3.0 30 */ 31public interface LinkedFilterBinding { 32 33 /** 34 * Returns the pattern type that this filter binding was created with. 35 * This will be {@link UriPatternType#REGEX} if the binding was created with 36 * {@link ServletModule#filterRegex(String, String...)}, and 37 * {@link UriPatternType#SERVLET} if it was created with 38 * {@link ServletModule#filter(String, String...)}. 39 */ 40 UriPatternType getUriPatternType(); 41 42 /** Returns the pattern used to match against the filter. */ 43 String getPattern(); 44 45 /** Returns any init params supplied when creating the binding. */ 46 Map<String, String> getInitParams(); 47 48 /** Returns the key used to lookup the filter instance. */ 49 Key<? extends Filter> getLinkedKey(); 50 51} 52