public abstract class DaemonHttpServlet
extends javax.servlet.http.HttpServlet
RemoteDaemonHttpServlet
,
Serialized FormModifier and Type | Field and Description |
---|---|
protected int |
DEFAULT_PORT
The default listening port (1313)
|
Constructor and Description |
---|
DaemonHttpServlet() |
Modifier and Type | Method and Description |
---|---|
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(java.net.Socket client)
Handles a new socket connection.
|
void |
init(javax.servlet.ServletConfig config)
Begins a thread listening for socket connections.
|
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException
init
in interface javax.servlet.Servlet
init
in class javax.servlet.GenericServlet
config
- the servlet configjavax.servlet.ServletException
- if a servlet exception occursprotected int getSocketPort()
public abstract void handleClient(java.net.Socket client)
client
- the client socketpublic void destroy()
destroy
in interface javax.servlet.Servlet
destroy
in class javax.servlet.GenericServlet