-
- All Implemented Interfaces:
-
com.hexagonkt.core.handlers.Handler,com.hexagonkt.http.server.handlers.HttpHandler,com.hexagonkt.http.server.handlers.ServerHandler
public final class FilterHandler implements HttpHandler, Handler<HttpServerCall>
-
-
Field Summary
Fields Modifier and Type Field Description private final HttpServerPredicateserverPredicateprivate final Function1<HttpServerContext, HttpServerContext>blockprivate final Function1<Context<HttpServerCall>, Context<HttpServerCall>>callbackprivate final Function1<Context<HttpServerCall>, Boolean>predicate
-
Constructor Summary
Constructors Constructor Description FilterHandler(Set<HttpMethod> methods, String pattern, KClass<out Exception> exception, HttpStatus status, Function1<HttpServerContext, HttpServerContext> block)FilterHandler(HttpMethod method, String pattern, Function1<HttpServerContext, HttpServerContext> block)FilterHandler(String pattern, Function1<HttpServerContext, HttpServerContext> block)FilterHandler(HttpServerPredicate serverPredicate, Function1<HttpServerContext, HttpServerContext> block)
-
Method Summary
Modifier and Type Method Description HttpServerPredicategetServerPredicate()final Function1<HttpServerContext, HttpServerContext>getBlock()HttpHandleraddPrefix(String prefix)-
Methods inherited from class com.hexagonkt.core.handlers.Handler
getCallback, getPredicate, process, process -
Methods inherited from class com.hexagonkt.http.server.handlers.HttpHandler
process, process -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
FilterHandler
FilterHandler(Set<HttpMethod> methods, String pattern, KClass<out Exception> exception, HttpStatus status, Function1<HttpServerContext, HttpServerContext> block)
-
FilterHandler
FilterHandler(HttpMethod method, String pattern, Function1<HttpServerContext, HttpServerContext> block)
-
FilterHandler
FilterHandler(String pattern, Function1<HttpServerContext, HttpServerContext> block)
-
FilterHandler
FilterHandler(HttpServerPredicate serverPredicate, Function1<HttpServerContext, HttpServerContext> block)
-
-
Method Detail
-
getServerPredicate
HttpServerPredicate getServerPredicate()
-
getBlock
final Function1<HttpServerContext, HttpServerContext> getBlock()
-
addPrefix
HttpHandler addPrefix(String prefix)
-
-
-
-