Package org.nanohttpd.router
Class RouterNanoHTTPD
java.lang.Object
org.nanohttpd.protocols.http.NanoHTTPD
org.nanohttpd.router.RouterNanoHTTPD
- Direct Known Subclasses:
BeetRootWebServer
public class RouterNanoHTTPD
extends org.nanohttpd.protocols.http.NanoHTTPD
- Author:
- vnnv, ritchieGitHub
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classGeneral nanolet to inherit from if you provide text or html data, only fixed size responses will be generated.static classstatic classGeneral nanolet to inherit from if you provide stream data, only chucked responses will be generated.static classHandling error 404 - unrecognized urlsstatic classGeneral nanolet to print debug info's as a html page.static classHandling indexstatic classstatic interfacestatic classstatic classstatic classGeneral nanolet to print debug info's as a html page.static classstatic interfacestatic classNested classes/interfaces inherited from class org.nanohttpd.protocols.http.NanoHTTPD
org.nanohttpd.protocols.http.NanoHTTPD.ResponseException -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final org.slf4j.LoggerPatched: autumo-beetroot.protected RouterNanoHTTPD.UriRouterPatched: autumo-beetroot.Fields inherited from class org.nanohttpd.protocols.http.NanoHTTPD
asyncRunner, CONTENT_DISPOSITION_ATTRIBUTE_PATTERN, CONTENT_DISPOSITION_ATTRIBUTE_REGEX, CONTENT_DISPOSITION_PATTERN, CONTENT_DISPOSITION_REGEX, CONTENT_TYPE_PATTERN, CONTENT_TYPE_REGEX, hostname, interceptors, MIME_HTML, MIME_PLAINTEXT, MIME_TYPES, myPort, SOCKET_READ_TIMEOUT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDefault routings, they are over writable.voidstatic StringnormalizeUri(String value) voidremoveRoute(String url) org.nanohttpd.protocols.http.response.Responseserve(org.nanohttpd.protocols.http.IHTTPSession session) <T extends RouterNanoHTTPD.UriResponder>
voidsetNotFoundHandler(Class<T> handler) <T extends RouterNanoHTTPD.UriResponder>
voidsetNotImplementedHandler(Class<T> handler) voidsetRoutePrioritizer(RouterNanoHTTPD.IRoutePrioritizer routePrioritizer) Methods inherited from class org.nanohttpd.protocols.http.NanoHTTPD
addHTTPInterceptor, closeAllConnections, createClientHandler, createServerRunnable, decodeParameters, decodeParameters, decodePercent, getHostname, getListeningPort, getMimeTypeForFile, getMyServerSocket, getServerSocketFactory, getTempFileManagerFactory, handle, isAlive, makeSecure, makeSSLSocketFactory, makeSSLSocketFactory, makeSSLSocketFactory, mimeTypes, safeClose, setAsyncRunner, setHTTPHandler, setServerSocketFactory, setTempFileManagerFactory, start, start, start, stop, wasStarted
-
Field Details
-
LOG
protected static final org.slf4j.Logger LOGPatched: autumo-beetroot. beetroot logger. -
router
Patched: autumo-beetroot.
-
-
Constructor Details
-
RouterNanoHTTPD
public RouterNanoHTTPD(int port) -
RouterNanoHTTPD
-
-
Method Details
-
normalizeUri
-
addMappings
public void addMappings()Default routings, they are over writable.router.setNotFoundHandler(GeneralHandler.class);
-
addRoute
-
setNotImplementedHandler
-
setNotFoundHandler
-
removeRoute
-
setRoutePrioritizer
-
serve
public org.nanohttpd.protocols.http.response.Response serve(org.nanohttpd.protocols.http.IHTTPSession session) - Overrides:
servein classorg.nanohttpd.protocols.http.NanoHTTPD
-