Package com.hexagonkt.http.handlers
Class ExceptionHandler
-
- All Implemented Interfaces:
-
com.hexagonkt.handlers.Handler,com.hexagonkt.http.handlers.HttpHandler
public final class ExceptionHandler<E extends Exception> implements HttpHandler, Handler<HttpCall>
-
-
Field Summary
Fields Modifier and Type Field Description private final HttpPredicatehandlerPredicateprivate final KClass<E>exceptionprivate final Booleanclearprivate final Function2<HttpContext, E, HttpContext>blockprivate final Function1<Context<HttpCall>, Context<HttpCall>>callbackprivate final Function1<Context<HttpCall>, Boolean>predicate
-
Constructor Summary
Constructors Constructor Description ExceptionHandler(KClass<E> exception, Boolean clear, Function2<HttpContext, E, HttpContext> block)
-
Method Summary
Modifier and Type Method Description HttpPredicategetHandlerPredicate()final KClass<E>getException()final BooleangetClear()final Function2<HttpContext, E, HttpContext>getBlock()HttpHandleraddPrefix(String prefix)-
Methods inherited from class com.hexagonkt.handlers.Handler
getCallback, getPredicate, process -
Methods inherited from class com.hexagonkt.http.handlers.HttpHandler
byMethod, filter, process, processHttp -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
ExceptionHandler
ExceptionHandler(KClass<E> exception, Boolean clear, Function2<HttpContext, E, HttpContext> block)
-
-
Method Detail
-
getHandlerPredicate
HttpPredicate getHandlerPredicate()
-
getException
final KClass<E> getException()
-
getClear
final Boolean getClear()
-
getBlock
final Function2<HttpContext, E, HttpContext> getBlock()
-
addPrefix
HttpHandler addPrefix(String prefix)
-
-
-
-