Package ucar.unidata.util
Class HttpServer
java.lang.Object
ucar.unidata.util.HttpServer
- Direct Known Subclasses:
IdvMonitor
,ImageServer
,OneInstanceServer
Class HttpServer. A simple http server.
- Version:
- $Revision: 1.12 $
- Author:
- IDV Development Team
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Class RequestHandler handles requests -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionHttpServer
(int port) Create me with the given portHttpServer
(String propertyFile) _more_ -
Method Summary
Modifier and TypeMethodDescriptionprotected HttpServer.RequestHandler
doMakeRequestHandler
(Socket socket) Factory method to create the request handlerint
getPort()
_more__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
test main
-
Field Details
-
RESPONSE_OK
public static final int RESPONSE_OK_more_- See Also:
-
RESPONSE_NOTFOUND
public static final int RESPONSE_NOTFOUND_more_- See Also:
-
RESPONSE_UNAUTHORIZED
public static final int RESPONSE_UNAUTHORIZED_more_- See Also:
-
RESPONSE_INTERNALERROR
public static final int RESPONSE_INTERNALERROR_more_- See Also:
-
TYPE_GET
get type- See Also:
-
TYPE_POST
post type- See Also:
-
serverProperties
_more_
-
-
Constructor Details
-
HttpServer
public HttpServer(int port) Create me with the given port- Parameters:
port
- The port to listen on
-
HttpServer
_more_- Parameters:
propertyFile
- _more_
-
-
Method Details
-
setPort
public void setPort(int port) _more_- Parameters:
port
- _more_
-
getPort
public int getPort()_more_- Returns:
- _more_
-
getProperties
_more_- Returns:
- _more_
-
init
public void init()_more_ -
handleError
_more_- Parameters:
msg
- _more_exc
- _more_
-
initServerSocket
_more_- Parameters:
socket
- _more_
-
doMakeRequestHandler
Factory method to create the request handler- Parameters:
socket
- The socket- Returns:
- The handler
- Throws:
Exception
- On badness
-
xxxxmain
test main- Parameters:
args
- args
-