Class HttpTunnelingServlet

java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.jboss.netty.channel.socket.http.HttpTunnelingServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class HttpTunnelingServlet extends javax.servlet.http.HttpServlet
An HttpServlet that proxies an incoming data to the actual server and vice versa. Please refer to the package summary for the detailed usage.
See Also:
  • Field Details

  • Constructor Details

    • HttpTunnelingServlet

      public HttpTunnelingServlet()
  • Method Details

    • init

      public void init() throws javax.servlet.ServletException
      Overrides:
      init in class javax.servlet.GenericServlet
      Throws:
      javax.servlet.ServletException
    • parseEndpoint

      protected SocketAddress parseEndpoint(String endpoint) throws Exception
      Throws:
      Exception
    • createChannelFactory

      protected ChannelFactory createChannelFactory(SocketAddress remoteAddress) throws Exception
      Throws:
      Exception
    • destroy

      public void destroy()
      Specified by:
      destroy in interface javax.servlet.Servlet
      Overrides:
      destroy in class javax.servlet.GenericServlet
    • destroyChannelFactory

      protected void destroyChannelFactory(ChannelFactory factory) throws Exception
      Throws:
      Exception
    • service

      protected void service(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws javax.servlet.ServletException, IOException
      Overrides:
      service in class javax.servlet.http.HttpServlet
      Throws:
      javax.servlet.ServletException
      IOException
    • read

      private static ChannelBuffer read(PushbackInputStream in) throws IOException
      Throws:
      IOException