public static class HttpURIHandler.RouteableNanoHttpd extends NanoHttpdServer
NanoHttpdServer.AsyncRunner, NanoHttpdServer.Cookie, NanoHttpdServer.CookieHandler, NanoHttpdServer.DefaultAsyncRunner, NanoHttpdServer.DefaultTempFile, NanoHttpdServer.DefaultTempFileManager, NanoHttpdServer.HTTPSession, NanoHttpdServer.IHTTPSession, NanoHttpdServer.Method, NanoHttpdServer.Response, NanoHttpdServer.ResponseException, NanoHttpdServer.TempFile, NanoHttpdServer.TempFileManager, NanoHttpdServer.TempFileManagerFactory
MIME_HTML, MIME_PLAINTEXT, SOCKET_READ_TIMEOUT
Constructor | Description |
---|---|
RouteableNanoHttpd(@NotNull String hostname,
int port) |
Modifier and Type | Method | Description |
---|---|---|
void |
handle(@NotNull String key,
@NotNull HttpURIHandler.RequestHandler handler) |
|
void |
remove(@NotNull String key) |
|
@NotNull NanoHttpdServer.Response |
serve(@NotNull NanoHttpdServer.IHTTPSession session) |
Override this to customize the server.
|
closeAllConnections, decodeParameters, decodeParameters, decodePercent, getListeningPort, isAlive, registerConnection, setAsyncRunner, setTempFileManagerFactory, start, stop, unRegisterConnection, wasStarted
public RouteableNanoHttpd(@NotNull @NotNull String hostname, int port)
public void handle(@NotNull @NotNull String key, @NotNull @NotNull HttpURIHandler.RequestHandler handler)
public void remove(@NotNull @NotNull String key)
@NotNull public @NotNull NanoHttpdServer.Response serve(@NotNull @NotNull NanoHttpdServer.IHTTPSession session)
NanoHttpdServer
serve
in class NanoHttpdServer
session
- The HTTP sessionCopyright © 2017. All rights reserved.