net.noderunner.http.servlet
Class ServletServer
java.lang.Object
net.noderunner.http.ThreadedHttpServer
net.noderunner.http.servlet.ServletServer
- All Implemented Interfaces:
- java.lang.Runnable
public class ServletServer
- extends ThreadedHttpServer
Extends the threaded HTTP server by sending requests to a single servlet.
Currently does not support streamed requests or responses, though this
feature may likely be supported in the future.
- Author:
- Elias Ross
Constructor Summary |
ServletServer(javax.servlet.http.HttpServlet servlet)
Constructs a new ServletServer. |
ServletServer(javax.servlet.http.HttpServlet servlet,
int port)
Constructs a new ServletServer for this local port. |
ServletServer(javax.servlet.http.HttpServlet servlet,
java.net.ServerSocket ss)
Constructs a new ServletServer. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ServletServer
public ServletServer(javax.servlet.http.HttpServlet servlet)
throws java.io.IOException
- Constructs a new ServletServer.
- Parameters:
servlet
- pre-initialized HTTP servlet to use
- Throws:
java.io.IOException
ServletServer
public ServletServer(javax.servlet.http.HttpServlet servlet,
java.net.ServerSocket ss)
- Constructs a new ServletServer.
- Parameters:
servlet
- pre-initialized HTTP servlet to usess
- server socket
ServletServer
public ServletServer(javax.servlet.http.HttpServlet servlet,
int port)
throws java.io.IOException
- Constructs a new ServletServer for this local port.
- Parameters:
servlet
- pre-initialized HTTP servlet to useport
- TCP/IP port number
- Throws:
java.io.IOException
handleRequest
protected void handleRequest(ThreadedHttpServer.Request r)
throws java.io.IOException
- Description copied from class:
ThreadedHttpServer
- Override this method to handle the request.
You may optionally process this request asynchronously.
- Specified by:
handleRequest
in class ThreadedHttpServer
- Throws:
java.io.IOException
Copyright © 2010. All Rights Reserved.