1 /* 2 * Copyright (C) 2008 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 package com.google.inject.servlet; 17 18 import java.io.IOException; 19 import javax.inject.Inject; 20 import javax.servlet.FilterChain; 21 import javax.servlet.ServletContext; 22 import javax.servlet.ServletException; 23 import javax.servlet.ServletRequest; 24 import javax.servlet.ServletResponse; 25 26 /** 27 * This default pipeline simply dispatches to web.xml's servlet pipeline. 28 * 29 * @author dhanji (at) gmail.com (Dhanji R. Prasanna) 30 * @see com.google.inject.servlet.ManagedFilterPipeline See Also ManagedFilterPipeline. 31 */ 32 class DefaultFilterPipeline implements FilterPipeline { 33 @Inject 34 DefaultFilterPipeline() {} 35 36 @Override 37 public void initPipeline(ServletContext context) {} 38 39 @Override 40 public void destroyPipeline() {} 41 42 @Override 43 public void dispatch( 44 ServletRequest request, ServletResponse response, FilterChain proceedingFilterChain) 45 throws IOException, ServletException { 46 47 proceedingFilterChain.doFilter(request, response); 48 } 49 } 50