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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ChannelFactory
private static final String
private long
private static final String
(package private) static final InternalLogger
private SocketAddress
private static final String
private long
private static final long
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ChannelFactory
createChannelFactory
(SocketAddress remoteAddress) void
destroy()
protected void
destroyChannelFactory
(ChannelFactory factory) void
init()
protected SocketAddress
parseEndpoint
(String endpoint) private static ChannelBuffer
protected void
service
(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
ENDPOINT
- See Also:
-
CONNECT_ATTEMPTS
- See Also:
-
RETRY_DELAY
- See Also:
-
logger
-
remoteAddress
-
channelFactory
-
connectAttempts
private volatile long connectAttempts -
retryDelay
private volatile long retryDelay
-
-
Constructor Details
-
HttpTunnelingServlet
public HttpTunnelingServlet()
-
-
Method Details
-
init
public void init() throws javax.servlet.ServletException- Overrides:
init
in classjavax.servlet.GenericServlet
- Throws:
javax.servlet.ServletException
-
parseEndpoint
- Throws:
Exception
-
createChannelFactory
- Throws:
Exception
-
destroy
public void destroy()- Specified by:
destroy
in interfacejavax.servlet.Servlet
- Overrides:
destroy
in classjavax.servlet.GenericServlet
-
destroyChannelFactory
- Throws:
Exception
-
service
protected void service(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws javax.servlet.ServletException, IOException - Overrides:
service
in classjavax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
IOException
-
read
- Throws:
IOException
-