Interface HTTPServer.UriResponder

All Known Implementing Classes:
BaseHandler, ChangeHandler, CustomResponseHandler, DefaultAddHandler, DefaultDeleteHandler, DefaultEditHandler, DefaultIndexHandler, DefaultRESTIndexHandler, DefaultViewHandler, Error404Handler, ErrorHandler, ExampleDownloadHandler, ExampleUploadHandler, ExtUsersAddHandler, ExtUsersDeleteHandler, ExtUsersEditHandler, ExtUsersIndexHandler, ExtUsersViewHandler, HomeHandler, HTTPServer.DefaultHandler, HTTPServer.DefaultStreamHandler, HTTPServer.Error404UriHandler, HTTPServer.GeneralHandler, HTTPServer.IndexHandler, HTTPServer.NotImplementedHandler, HTTPServer.StaticPageHandler, LogHandler, LoginHandler, LogoutHandler, NewQRCodeHandler, NoConfigHandler, NoContent204Handler, NoContentAndConfigHandler, NoContentButRouteHandler, NoContentHandler, NotImplementedHandler, OtpHandler, PropertiesAddHandler, PropertiesDeleteHandler, PropertiesEditHandler, PropertiesIndexHandler, PropertiesViewHandler, ResetHandler, RolesAddHandler, RolesDeleteHandler, RolesEditHandler, RolesIndexHandler, RolesViewHandler, SettingsHandler, TasksAddHandler, TasksDeleteHandler, TasksEditHandler, TasksIndexHandler, TasksRESTIndexHandler, TasksViewHandler, UsersAddHandler, UsersDeleteHandler, UsersEditHandler, UsersIndexHandler, UsersViewHandler
Enclosing class:
HTTPServer

public static interface HTTPServer.UriResponder
Responder for a routed URI. The router invokes the method that matches the HTTP method of the request.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.nanohttpd.protocols.http.response.Response
    delete(HTTPServer.UriResource uriResource, Map<String,String> urlParams, org.nanohttpd.protocols.http.IHTTPSession session)
    Handles an HTTP DELETE request.
    org.nanohttpd.protocols.http.response.Response
    get(HTTPServer.UriResource uriResource, Map<String,String> urlParams, org.nanohttpd.protocols.http.IHTTPSession session)
    Handles an HTTP GET request.
    org.nanohttpd.protocols.http.response.Response
    other(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.Response
    post(HTTPServer.UriResource uriResource, Map<String,String> urlParams, org.nanohttpd.protocols.http.IHTTPSession session)
    Handles an HTTP POST request.
    org.nanohttpd.protocols.http.response.Response
    put(HTTPServer.UriResource uriResource, Map<String,String> urlParams, org.nanohttpd.protocols.http.IHTTPSession session)
    Handles an HTTP PUT request.
  • Method Details

    • get

      org.nanohttpd.protocols.http.response.Response get(HTTPServer.UriResource uriResource, Map<String,String> urlParams, org.nanohttpd.protocols.http.IHTTPSession session)
      Handles an HTTP GET request.
      Parameters:
      uriResource - the route that matched the request
      urlParams - the parameters extracted from the URI
      session - the HTTP session
      Returns:
      the response
    • put

      org.nanohttpd.protocols.http.response.Response put(HTTPServer.UriResource uriResource, Map<String,String> urlParams, org.nanohttpd.protocols.http.IHTTPSession session)
      Handles an HTTP PUT request.
      Parameters:
      uriResource - the route that matched the request
      urlParams - the parameters extracted from the URI
      session - the HTTP session
      Returns:
      the response
    • post

      org.nanohttpd.protocols.http.response.Response post(HTTPServer.UriResource uriResource, Map<String,String> urlParams, org.nanohttpd.protocols.http.IHTTPSession session)
      Handles an HTTP POST request.
      Parameters:
      uriResource - the route that matched the request
      urlParams - the parameters extracted from the URI
      session - the HTTP session
      Returns:
      the response
    • delete

      org.nanohttpd.protocols.http.response.Response delete(HTTPServer.UriResource uriResource, Map<String,String> urlParams, org.nanohttpd.protocols.http.IHTTPSession session)
      Handles an HTTP DELETE request.
      Parameters:
      uriResource - the route that matched the request
      urlParams - the parameters extracted from the URI
      session - the HTTP session
      Returns:
      the response
    • other

      org.nanohttpd.protocols.http.response.Response other(String method, HTTPServer.UriResource uriResource, Map<String,String> urlParams, org.nanohttpd.protocols.http.IHTTPSession session)
      Handles any other HTTP method.
      Parameters:
      method - the HTTP method name
      uriResource - the route that matched the request
      urlParams - the parameters extracted from the URI
      session - the HTTP session
      Returns:
      the response