SimpleWebServer (RabbIT/4)
Date: 2009-12-20

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## rabbit.webserver
Class SimpleWebServer

    java.lang.Object
      rabbit.webserver.SimpleWebServer

    public class SimpleWebServer

extends Object

A simple web server that serves static resources.

Author:
  Robert Olofsson

Constructor Summary
`SimpleWebServer(int port, String path)` Start a web server listening on the given port and serving files from the given path.

Method Summary
`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(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

### SimpleWebServer

    public SimpleWebServer(int port,
                           String path)
                    throws IOException

  Start a web server listening on the given port and serving files from the given path. The web server will not serve requests until `start ()` is called

  Throws:
    `IOException`

Method Detail

### main

    public static void main(String[] args)

  Start a web server using the port and base dir given as arguments.

### start

    public void start()

  Start serving requests.

### getBaseDir

    public File getBaseDir()

  Get the directory files are served from.

### getBufferHandler

    public BufferHandler getBufferHandler()

  Get the BufferHandler used by this web server.

### getNioHandler

    public NioHandler getNioHandler()

  Get the SelectorRunner used by this web server.

### getTrafficLogger

    public TrafficLogger getTrafficLogger()

  Get the TrafficLogger used by this web server.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD