-
- All Implemented Interfaces:
-
com.hexagonkt.core.handlers.Handler,com.hexagonkt.http.server.handlers.HttpHandler,com.hexagonkt.http.server.handlers.ServerHandler
public final class OnHandler implements HttpHandler, Handler<HttpServerCall>
-
-
Field Summary
Fields Modifier and Type Field Description private final HttpServerPredicateserverPredicateprivate final SuspendFunction1<HttpServerContext, HttpServerContext>blockprivate final SuspendFunction1<Context<HttpServerCall>, Context<HttpServerCall>>callbackprivate final SuspendFunction1<Context<HttpServerCall>, Boolean>predicate
-
Constructor Summary
Constructors Constructor Description OnHandler(Set<HttpMethod> methods, String pattern, KClass<out Exception> exception, HttpStatus status, SuspendFunction1<HttpServerContext, HttpServerContext> block)OnHandler(HttpMethod method, String pattern, SuspendFunction1<HttpServerContext, HttpServerContext> block)OnHandler(String pattern, SuspendFunction1<HttpServerContext, HttpServerContext> block)OnHandler(HttpServerPredicate serverPredicate, SuspendFunction1<HttpServerContext, HttpServerContext> block)
-
Method Summary
Modifier and Type Method Description HttpServerPredicategetServerPredicate()final SuspendFunction1<HttpServerContext, HttpServerContext>getBlock()SuspendFunction1<Context<HttpServerCall>, Context<HttpServerCall>>getCallback()SuspendFunction1<Context<HttpServerCall>, Boolean>getPredicate()HttpHandleraddPrefix(String prefix)-
-
Constructor Detail
-
OnHandler
OnHandler(Set<HttpMethod> methods, String pattern, KClass<out Exception> exception, HttpStatus status, SuspendFunction1<HttpServerContext, HttpServerContext> block)
-
OnHandler
OnHandler(HttpMethod method, String pattern, SuspendFunction1<HttpServerContext, HttpServerContext> block)
-
OnHandler
OnHandler(String pattern, SuspendFunction1<HttpServerContext, HttpServerContext> block)
-
OnHandler
OnHandler(HttpServerPredicate serverPredicate, SuspendFunction1<HttpServerContext, HttpServerContext> block)
-
-
Method Detail
-
getServerPredicate
HttpServerPredicate getServerPredicate()
-
getBlock
final SuspendFunction1<HttpServerContext, HttpServerContext> getBlock()
-
getCallback
SuspendFunction1<Context<HttpServerCall>, Context<HttpServerCall>> getCallback()
-
getPredicate
SuspendFunction1<Context<HttpServerCall>, Boolean> getPredicate()
-
addPrefix
HttpHandler addPrefix(String prefix)
-
-
-
-