|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.unidata.util.HttpServer
public class HttpServer
Class HttpServer. A simple http server.
| Nested Class Summary | |
|---|---|
static class |
HttpServer.RequestHandler
Class RequestHandler handles requests |
| Field Summary | |
|---|---|
static int |
RESPONSE_INTERNALERROR
_more_ |
static int |
RESPONSE_NOTFOUND
_more_ |
static int |
RESPONSE_OK
_more_ |
static int |
RESPONSE_UNAUTHORIZED
_more_ |
protected Hashtable |
serverProperties
_more_ |
static String |
TYPE_GET
get type |
static String |
TYPE_POST
post type |
| Constructor Summary | |
|---|---|
HttpServer(int port)
Create me with the given port |
|
HttpServer(String propertyFile)
_more_ |
|
| Method Summary | |
|---|---|
protected HttpServer.RequestHandler |
doMakeRequestHandler(Socket socket)
Factory method to create the request handler |
int |
getPort()
_more_ |
Hashtable |
getProperties()
_more_ |
protected void |
handleError(String msg,
Exception exc)
_more_ |
void |
init()
_more_ |
protected void |
initServerSocket(ServerSocket socket)
_more_ |
void |
setPort(int port)
_more_ |
static void |
xxxxmain(String[] args)
test main |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int RESPONSE_OK
public static final int RESPONSE_NOTFOUND
public static final int RESPONSE_UNAUTHORIZED
public static final int RESPONSE_INTERNALERROR
public static final String TYPE_GET
public static final String TYPE_POST
protected Hashtable serverProperties
| Constructor Detail |
|---|
public HttpServer(int port)
port - The port to listen onpublic HttpServer(String propertyFile)
propertyFile - _more_| Method Detail |
|---|
public void setPort(int port)
port - _more_public int getPort()
public Hashtable getProperties()
public void init()
protected void handleError(String msg,
Exception exc)
msg - _more_exc - _more_protected void initServerSocket(ServerSocket socket)
socket - _more_
protected HttpServer.RequestHandler doMakeRequestHandler(Socket socket)
throws Exception
socket - The socket
Exception - On badnesspublic static void xxxxmain(String[] args)
args - args
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||