Interface RequestLogLevelMapper
- All Superinterfaces:
Function<RequestOnlyLog,
LogLevel>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@UnstableApi
@FunctionalInterface
public interface RequestLogLevelMapper
extends Function<RequestOnlyLog,LogLevel>
-
Method Summary
Modifier and TypeMethodDescriptiondefault <V> Function<RequestOnlyLog,
V> Deprecated.Do not use this method.apply
(RequestOnlyLog log) Returns aLogLevel
for the givenRequestOnlyLog
.compose
(Function<? super V, ? extends RequestOnlyLog> before) Deprecated.Do not use this method.static RequestLogLevelMapper
Creates a newRequestLogLevelMapper
which always returns the specifiedLogLevel
.static RequestLogLevelMapper
Creates a newRequestLogLevelMapper
which returns the specifiedLogLevel
if the given class ofRequestOnlyLog.requestCause()
is assignable from the specifiedThrowable
class.default RequestLogLevelMapper
orElse
(RequestLogLevelMapper other) Returns a composedRequestLogLevelMapper
which represents a logical OR of thisRequestLogLevelMapper
and the givenother
.
-
Method Details
-
of
Creates a newRequestLogLevelMapper
which always returns the specifiedLogLevel
. -
of
Creates a newRequestLogLevelMapper
which returns the specifiedLogLevel
if the given class ofRequestOnlyLog.requestCause()
is assignable from the specifiedThrowable
class. -
apply
Returns aLogLevel
for the givenRequestOnlyLog
. Returningnull
lets the next handler specified withorElse(RequestLogLevelMapper)
map theRequestOnlyLog
.- Specified by:
apply
in interfaceFunction<RequestOnlyLog,
LogLevel>
-
orElse
Returns a composedRequestLogLevelMapper
which represents a logical OR of thisRequestLogLevelMapper
and the givenother
. If thisapply(RequestOnlyLog)
returnsnull
, then the otherRequestLogLevelMapper
will be applied. -
compose
@Deprecated default <V> Function<V,LogLevel> compose(Function<? super V, ? extends RequestOnlyLog> before) Deprecated.Do not use this method.Returns a composed function that first applies the before function to its input, and then applies this function to the result. If evaluation of either function throws an exception, it is relayed to the caller of the composed function.- Specified by:
compose
in interfaceFunction<RequestOnlyLog,
LogLevel>
-
andThen
@Deprecated default <V> Function<RequestOnlyLog,V> andThen(Function<? super LogLevel, ? extends V> after) Deprecated.Do not use this method.Returns a composed function that first applies this function to its input, and then applies the after function to the result. If evaluation of either function throws an exception, it is relayed to the caller of the composed function.- Specified by:
andThen
in interfaceFunction<RequestOnlyLog,
LogLevel>
-