|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ldodds.http.responder.Server
A very simple, light-weight HTTP Server. Adapted from the source of the Sun RMI HTTP class loader.
This class isn't designed to be a general purpose HTTP server, and doesn't attempt to offer a wide range of functionality. Its sole purpose is to provide an HTTP interface (specifically GET requests) that can be used to feed information into the FOAF-a-Matic from the users browser.
With this in mind the server will also only respond to requests from the local machine. This should also limit any potential security loop-holes.
Field Summary | |
static int |
DEFAULT_PORT
|
static java.lang.String |
DIR_MARKER
|
static java.lang.String |
PARAM_MARKER
|
static java.lang.String |
PARAM_SEPARATOR
|
Constructor Summary | |
Server()
Constructor for Server. |
|
Server(int port)
|
|
Server(int port,
com.ldodds.http.responder.ResponderFactory factory)
|
Method Summary | |
static java.lang.String |
getPathAndParameters(java.io.DataInputStream in)
Parse out the path and parameter part of the url. |
com.ldodds.http.responder.ResponderFactory |
getResponderFactory()
|
static java.util.Map |
parseParameters(java.lang.String path)
Builds a Map of parameters parsed from a path string produced by getPathAndParameters. |
void |
run()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int DEFAULT_PORT
public static final java.lang.String DIR_MARKER
public static final java.lang.String PARAM_MARKER
public static final java.lang.String PARAM_SEPARATOR
Constructor Detail |
public Server() throws java.io.IOException
public Server(int port) throws java.io.IOException
public Server(int port, com.ldodds.http.responder.ResponderFactory factory) throws java.io.IOException
Method Detail |
public static java.lang.String getPathAndParameters(java.io.DataInputStream in) throws java.io.IOException
java.io.IOException
public static java.util.Map parseParameters(java.lang.String path)
public void run()
run
in interface java.lang.Runnable
public com.ldodds.http.responder.ResponderFactory getResponderFactory()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |