-
- All Implemented Interfaces:
-
com.hexagonkt.core.handlers.Handler,com.hexagonkt.http.server.handlers.HttpHandler,com.hexagonkt.http.server.handlers.ServerHandler
public final class PathHandler implements HttpHandler, Handler<HttpServerCall>
-
-
Field Summary
Fields Modifier and Type Field Description private final HttpServerPredicateserverPredicateprivate final List<HttpHandler>handlersprivate final Function1<Context<HttpServerCall>, Context<HttpServerCall>>callbackprivate final Function1<Context<HttpServerCall>, Boolean>predicate
-
Constructor Summary
Constructors Constructor Description PathHandler(HttpHandler handlers)PathHandler(String pattern, List<HttpHandler> handlers)PathHandler(String pattern, HttpHandler handlers)PathHandler(HttpServerPredicate serverPredicate, List<HttpHandler> handlers)
-
Method Summary
Modifier and Type Method Description HttpServerPredicategetServerPredicate()final List<HttpHandler>getHandlers()HttpServerResponseprocess(HttpServerRequestPort request)HttpHandleraddPrefix(String prefix)final Map<HttpMethod, PathHandler>byMethod()final PathHandlerfilter(HttpMethod method)final Stringdescribe()-
Methods inherited from class com.hexagonkt.core.handlers.Handler
getCallback, getPredicate, process, process -
Methods inherited from class com.hexagonkt.http.server.handlers.HttpHandler
process -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
PathHandler
PathHandler(HttpHandler handlers)
-
PathHandler
PathHandler(String pattern, List<HttpHandler> handlers)
-
PathHandler
PathHandler(String pattern, HttpHandler handlers)
-
PathHandler
PathHandler(HttpServerPredicate serverPredicate, List<HttpHandler> handlers)
-
-
Method Detail
-
getServerPredicate
HttpServerPredicate getServerPredicate()
-
getHandlers
final List<HttpHandler> getHandlers()
-
process
HttpServerResponse process(HttpServerRequestPort request)
-
addPrefix
HttpHandler addPrefix(String prefix)
-
byMethod
final Map<HttpMethod, PathHandler> byMethod()
-
filter
final PathHandler filter(HttpMethod method)
-
describe
final String describe()
-
-
-
-