Class HTTPServer.GeneralHandler
java.lang.Object
ch.autumo.beetroot.server.HTTPServer.DefaultStreamHandler
ch.autumo.beetroot.server.HTTPServer.DefaultHandler
ch.autumo.beetroot.server.HTTPServer.GeneralHandler
- All Implemented Interfaces:
HTTPServer.UriResponder
- Enclosing class:
HTTPServer
General nanolet to print debug info's as a html page.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.nanohttpd.protocols.http.response.Responseget(HTTPServer.UriResource uriResource, Map<String, String> urlParams, org.nanohttpd.protocols.http.IHTTPSession session) Handles an HTTP GET request.MIME type of the streamed data.org.nanohttpd.protocols.http.response.IStatusHTTP status of the response.getText()Not supported; this handler renders the response inget(UriResource, Map, IHTTPSession).Methods inherited from class HTTPServer.DefaultHandler
getDataMethods inherited from class HTTPServer.DefaultStreamHandler
delete, other, post, putModifier and TypeMethodDescriptionorg.nanohttpd.protocols.http.response.Responsedelete(HTTPServer.UriResource uriResource, Map<String, String> urlParams, org.nanohttpd.protocols.http.IHTTPSession session) Handles an HTTP DELETE request.org.nanohttpd.protocols.http.response.Responseother(String method, HTTPServer.UriResource uriResource, Map<String, String> urlParams, org.nanohttpd.protocols.http.IHTTPSession session) Handles any other HTTP method.org.nanohttpd.protocols.http.response.Responsepost(HTTPServer.UriResource uriResource, Map<String, String> urlParams, org.nanohttpd.protocols.http.IHTTPSession session) Handles an HTTP POST request.org.nanohttpd.protocols.http.response.Responseput(HTTPServer.UriResource uriResource, Map<String, String> urlParams, org.nanohttpd.protocols.http.IHTTPSession session) Handles an HTTP PUT request.
-
Constructor Details
-
GeneralHandler
public GeneralHandler()Default constructor.
-
-
Method Details
-
getText
Not supported; this handler renders the response inget(UriResource, Map, IHTTPSession).- Specified by:
getTextin classHTTPServer.DefaultHandler- Returns:
- never returns
- Throws:
IllegalStateException- always
-
getMimeType
Description copied from class:HTTPServer.DefaultStreamHandlerMIME type of the streamed data.- Specified by:
getMimeTypein classHTTPServer.DefaultStreamHandler- Returns:
- the MIME type
-
getStatus
public org.nanohttpd.protocols.http.response.IStatus getStatus()Description copied from class:HTTPServer.DefaultHandlerHTTP status of the response.- Specified by:
getStatusin classHTTPServer.DefaultHandler- Returns:
- the response status
-
get
public org.nanohttpd.protocols.http.response.Response get(HTTPServer.UriResource uriResource, Map<String, String> urlParams, org.nanohttpd.protocols.http.IHTTPSession session) Description copied from interface:HTTPServer.UriResponderHandles an HTTP GET request.- Specified by:
getin interfaceHTTPServer.UriResponder- Overrides:
getin classHTTPServer.DefaultHandler- Parameters:
uriResource- the route that matched the requesturlParams- the parameters extracted from the URIsession- the HTTP session- Returns:
- the response
-