|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectrabbit.webserver.SimpleWebServer
public class SimpleWebServer
A simple web server that serves static resources.
| Constructor Summary | |
|---|---|
SimpleWebServer(int port,
java.lang.String path)
Start a web server listening on the given port and serving files from the given path. |
|
| Method Summary | |
|---|---|
java.io.File |
getBaseDir()
Get the directory files are served from. |
BufferHandler |
getBufferHandler()
Get the BufferHandler used by this web server. |
NioHandler |
getNioHandler()
Get the SelectorRunner used by this web server. |
TrafficLogger |
getTrafficLogger()
Get the TrafficLogger used by this web server. |
static void |
main(java.lang.String[] args)
Start a web server using the port and base dir given as arguments. |
void |
start()
Start serving requests. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleWebServer(int port,
java.lang.String path)
throws java.io.IOException
start () is called.
port - the port to listen onpath - the directory to serve resources from
java.io.IOException - if server setup fails| Method Detail |
|---|
public static void main(java.lang.String[] args)
args - the command line argumentspublic void start()
public java.io.File getBaseDir()
public BufferHandler getBufferHandler()
public NioHandler getNioHandler()
public TrafficLogger getTrafficLogger()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||