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