Package com.hexagonkt.http.handlers
Class HttpPredicate
-
- All Implemented Interfaces:
-
kotlin.Function,kotlin.Function1
public final class HttpPredicate implements Function1<Context<HttpCall>, Boolean>
-
-
Field Summary
Fields Modifier and Type Field Description private final Function1<Context<HttpCall>, Boolean>predicateprivate final Set<HttpMethod>methodsprivate final PathPatternpathPatternprivate final KClass<out Exception>exceptionprivate final HttpStatusstatus
-
Constructor Summary
Constructors Constructor Description HttpPredicate(Set<HttpMethod> methods, String pattern, KClass<out Exception> exception, HttpStatus status, Boolean prefix)HttpPredicate(Set<HttpMethod> methods, PathPattern pathPattern, KClass<out Exception> exception, HttpStatus status)
-
Method Summary
Modifier and Type Method Description final Function1<Context<HttpCall>, Boolean>getPredicate()final Set<HttpMethod>getMethods()final PathPatterngetPathPattern()final KClass<out Exception>getException()final HttpStatusgetStatus()Booleaninvoke(Context<HttpCall> context)final HttpPredicateclearMethods()final HttpPredicateaddPrefix(String prefix)final Stringdescribe()-
-
Method Detail
-
getPredicate
final Function1<Context<HttpCall>, Boolean> getPredicate()
-
getMethods
final Set<HttpMethod> getMethods()
-
getPathPattern
final PathPattern getPathPattern()
-
getException
final KClass<out Exception> getException()
-
getStatus
final HttpStatus getStatus()
-
invoke
Boolean invoke(Context<HttpCall> context)
-
clearMethods
final HttpPredicate clearMethods()
-
addPrefix
final HttpPredicate addPrefix(String prefix)
-
describe
final String describe()
-
-
-
-