public class ExceptionHandlerBuilder
extends java.lang.Object
Constructor and Description |
---|
ExceptionHandlerBuilder() |
Modifier and Type | Method and Description |
---|---|
ExceptionHandler |
build() |
<P extends java.lang.Throwable> |
match(java.lang.Class<P> type,
akka.japi.pf.FI.Apply<P,Route> apply)
Add a new case statement to this builder.
|
<P extends java.lang.Throwable> |
match(java.lang.Class<P> type,
akka.japi.pf.FI.TypedPredicate<P> predicate,
akka.japi.pf.FI.Apply<P,Route> apply)
Add a new case statement to this builder.
|
ExceptionHandlerBuilder |
matchAny(akka.japi.pf.FI.Apply<java.lang.Throwable,Route> apply)
Add a new case statement to this builder, that matches any argument.
|
<P extends java.lang.Throwable> |
matchEquals(P object,
akka.japi.pf.FI.Apply<P,Route> apply)
Add a new case statement to this builder.
|
public <P extends java.lang.Throwable> ExceptionHandlerBuilder match(java.lang.Class<P> type, akka.japi.pf.FI.Apply<P,Route> apply)
type
- a type to match the argument againstapply
- an action to apply to the argument if the type matchespublic <P extends java.lang.Throwable> ExceptionHandlerBuilder match(java.lang.Class<P> type, akka.japi.pf.FI.TypedPredicate<P> predicate, akka.japi.pf.FI.Apply<P,Route> apply)
type
- a type to match the argument againstpredicate
- a predicate that will be evaluated on the argument if the type matchesapply
- an action to apply to the argument if the type matches and the predicate returns truepublic <P extends java.lang.Throwable> ExceptionHandlerBuilder matchEquals(P object, akka.japi.pf.FI.Apply<P,Route> apply)
object
- the object to compare equals withapply
- an action to apply to the argument if the object compares equalpublic ExceptionHandlerBuilder matchAny(akka.japi.pf.FI.Apply<java.lang.Throwable,Route> apply)
apply
- an action to apply to the argumentpublic ExceptionHandler build()