Uses of Interface
com.sun.net.httpserver.HttpHandler
Packages that use HttpHandler
Package
Description
Provides a simple high-level Http server API, which can be used to build
embedded HTTP servers.
-
Uses of HttpHandler in com.sun.net.httpserver
Methods in com.sun.net.httpserver that return HttpHandlerModifier and TypeMethodDescriptionstatic HttpHandlerSimpleFileServer.createFileHandler(Path rootDirectory) Creates a file handler that serves files from a given directory path (and its subdirectories).abstract HttpHandlerHttpContext.getHandler()Returns the handler for this context.static HttpHandlerHttpHandlers.handleOrElse(Predicate<Request> handlerTest, HttpHandler handler, HttpHandler fallbackHandler) Complements a conditionalHttpHandlerwith another handler.static HttpHandlerReturns anHttpHandlerthat sends a response comprising the givenstatusCode,headers, andbody.Methods in com.sun.net.httpserver with parameters of type HttpHandlerModifier and TypeMethodDescriptionstatic HttpServerHttpServer.create(InetSocketAddress addr, int backlog, String path, HttpHandler handler, Filter... filters) Creates anHttpServerinstance with an initial context.static HttpsServerHttpsServer.create(InetSocketAddress addr, int backlog, String path, HttpHandler handler, Filter... filters) Creates anHttpsServerinstance with an initial context.abstract HttpContextHttpServer.createContext(String path, HttpHandler handler) Creates aHttpContext.static HttpHandlerHttpHandlers.handleOrElse(Predicate<Request> handlerTest, HttpHandler handler, HttpHandler fallbackHandler) Complements a conditionalHttpHandlerwith another handler.abstract voidHttpContext.setHandler(HttpHandler handler) Sets the handler for this context, if not already set.Constructors in com.sun.net.httpserver with parameters of type HttpHandlerModifierConstructorDescriptionChain(List<Filter> filters, HttpHandler handler) Creates aChaininstance with given filters and handler.