Package org.opennms.plugins.cloud.grpc
Class GrpcExceptionHandler
- java.lang.Object
-
- org.opennms.plugins.cloud.grpc.GrpcExceptionHandler
-
public class GrpcExceptionHandler extends java.lang.ObjectTries to distinguish between - recoverable Exceptions: will be propgated to OpenNMS and - non recoverable Exceptions: will be logged dropped see also: https://www.grpc.io/docs/guides/error/
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> voidexecuteRpcCall(java.util.function.Supplier<T> callToExecute)static <T,R>
RexecuteRpcCall(java.util.function.Supplier<T> callToExecute, java.util.function.Function<T,R> mapper, java.util.function.Supplier<R> defaultFunction)
-
-
-
Method Detail
-
executeRpcCall
public static <T,R> R executeRpcCall(java.util.function.Supplier<T> callToExecute, java.util.function.Function<T,R> mapper, java.util.function.Supplier<R> defaultFunction) throws org.opennms.integration.api.v1.timeseries.StorageException- Throws:
org.opennms.integration.api.v1.timeseries.StorageException
-
executeRpcCall
public static <T> void executeRpcCall(java.util.function.Supplier<T> callToExecute) throws org.opennms.integration.api.v1.timeseries.StorageException- Throws:
org.opennms.integration.api.v1.timeseries.StorageException
-
-