1 // ======================================================================== 2 // Copyright (c) 2010-2011 Mort Bay Consulting Pty. Ltd. 3 // ------------------------------------------------------------------------ 4 // All rights reserved. This program and the accompanying materials 5 // are made available under the terms of the Eclipse Public License v1.0 6 // and Apache License v2.0 which accompanies this distribution. 7 // The Eclipse Public License is available at 8 // http://www.eclipse.org/legal/epl-v10.html 9 // The Apache License v2.0 is available at 10 // http://www.opensource.org/licenses/apache2.0.php 11 // You may elect to redistribute this code under either of these licenses. 12 // ======================================================================== 13 package org.eclipse.jetty.osgi.nested; 14 15 import java.io.IOException; 16 17 import javax.servlet.ServletException; 18 import javax.servlet.ServletRequest; 19 import javax.servlet.ServletResponse; 20 import javax.servlet.http.HttpServlet; 21 22 import org.eclipse.jetty.nested.NestedConnector; 23 24 /** 25 * Wraps a NestedConnector into a servlet that can be plugged into 26 * BridgeServlet#registerServletDelegate 27 */ 28 public class NestedConnectorServletDelegate extends HttpServlet 29 { 30 private static final long serialVersionUID = 1L; 31 32 private final NestedConnector _nestedConnector; 33 34 public NestedConnectorServletDelegate(NestedConnector nestedConnector) 35 { 36 _nestedConnector = nestedConnector; 37 } 38 39 @Override 40 public void service(ServletRequest req, ServletResponse res) 41 throws ServletException, IOException 42 { 43 _nestedConnector.service(req, res); 44 } 45 46 }