@NotThreadSafe public static final class FutureRpcResults.FutureRpcResultBuilder<I,O> extends Object implements org.opendaylight.yangtools.concepts.Builder<Future<org.opendaylight.yangtools.yang.common.RpcResult<O>>>
| Modifier and Type | Method and Description |
|---|---|
com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<O>> |
build()
Builds the Future RpcResult.
|
FutureRpcResults.FutureRpcResultBuilder<I,O> |
onEnterLogLevel(FutureRpcResults.LogLevel level)
Sets a custom on-enter SLF4J logging level.
|
FutureRpcResults.FutureRpcResultBuilder<I,O> |
onFailure(Consumer<Throwable> newOnFailureConsumer)
Sets a custom on-failure action, for a given exception.
|
FutureRpcResults.FutureRpcResultBuilder<I,O> |
onFailureLogLevel(FutureRpcResults.LogLevel level)
Sets a custom on-failure SLF4J logging level, in case of an exception.
|
FutureRpcResults.FutureRpcResultBuilder<I,O> |
onSuccess(Consumer<O> newOnSuccessFunction)
Sets a custom on-success action, for a given output.
|
FutureRpcResults.FutureRpcResultBuilder<I,O> |
onSuccessLogLevel(FutureRpcResults.LogLevel level)
Sets a custom on-success SLF4J logging level.
|
FutureRpcResults.FutureRpcResultBuilder<I,O> |
withRpcErrorMessage(Function<Throwable,String> newRpcErrorMessageFunction)
Set a custom
RpcError message function, for a given exception. |
@CheckReturnValue public com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<O>> build()
build in interface org.opendaylight.yangtools.concepts.CheckedBuilder<Future<org.opendaylight.yangtools.yang.common.RpcResult<O>>,IllegalArgumentException>RpcResult.isSuccessful(), with
details in RpcResult.getErrors(), and not the Future itself.public FutureRpcResults.FutureRpcResultBuilder<I,O> onFailure(Consumer<Throwable> newOnFailureConsumer)
public FutureRpcResults.FutureRpcResultBuilder<I,O> onFailureLogLevel(FutureRpcResults.LogLevel level)
LOG.error. Setting NONE will disable this logging.public FutureRpcResults.FutureRpcResultBuilder<I,O> onSuccessLogLevel(FutureRpcResults.LogLevel level)
LOG.debug. Setting NONE will disable this logging.public FutureRpcResults.FutureRpcResultBuilder<I,O> onEnterLogLevel(FutureRpcResults.LogLevel level)
LOG.trace. Setting NONE will disable this logging.public FutureRpcResults.FutureRpcResultBuilder<I,O> withRpcErrorMessage(Function<Throwable,String> newRpcErrorMessageFunction)
RpcError message function, for a given exception.
By default, the message is just Throwable.getMessage().public FutureRpcResults.FutureRpcResultBuilder<I,O> onSuccess(Consumer<O> newOnSuccessFunction)
Copyright © 2019 OpenDaylight. All rights reserved.