|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.oreilly.servlet.DaemonHttpServlet
public abstract class DaemonHttpServlet
A superclass for HTTP servlets that wish to accept raw socket connections. DaemonHttpServlet starts listening for client requests in its init() method and stops listening in its destroy() method. In between, for every connection it receives, it calls the abstract handleClient(Socket client) method. This method should be implemented by the servlet subclassing DaemonHttpServlet. The port on which the servlet is to listen is determined by the getSocketPort() method.
RemoteDaemonHttpServlet,
序列化表格| 字段摘要 | |
|---|---|
protected int |
DEFAULT_PORT
The default listening port (1313) |
| 构造方法摘要 | |
|---|---|
DaemonHttpServlet()
|
|
| 方法摘要 | |
|---|---|
void |
destroy()
Halts the thread listening for socket connections. |
protected int |
getSocketPort()
Returns the socket port on which the servlet will listen. |
abstract void |
handleClient(Socket client)
Handles a new socket connection. |
void |
init(javax.servlet.ServletConfig config)
Begins a thread listening for socket connections. |
| 从类 javax.servlet.http.HttpServlet 继承的方法 |
|---|
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service |
| 从类 javax.servlet.GenericServlet 继承的方法 |
|---|
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 字段详细信息 |
|---|
protected int DEFAULT_PORT
| 构造方法详细信息 |
|---|
public DaemonHttpServlet()
| 方法详细信息 |
|---|
public void init(javax.servlet.ServletConfig config)
throws javax.servlet.ServletException
javax.servlet.Servlet 中的 initjavax.servlet.GenericServlet 中的 initconfig - the servlet config
javax.servlet.ServletException - if a servlet exception occursprotected int getSocketPort()
public abstract void handleClient(Socket client)
client - the client socketpublic void destroy()
javax.servlet.Servlet 中的 destroyjavax.servlet.GenericServlet 中的 destroy
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||