Package io.temporal.serviceclient
Class StatusUtils
- java.lang.Object
-
- io.temporal.serviceclient.StatusUtils
-
public class StatusUtils extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description StatusUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T extends com.google.protobuf.GeneratedMessageV3>
TgetFailure(io.grpc.StatusRuntimeException exception, java.lang.Class<T> failureType)
static boolean
hasFailure(io.grpc.StatusRuntimeException exception, java.lang.Class<? extends com.google.protobuf.GeneratedMessageV3> failureType)
Determines if a StatusRuntimeException contains a failure message of a given type.static <T extends com.google.protobuf.GeneratedMessageV3>
io.grpc.StatusRuntimeExceptionnewException(io.grpc.Status status, T details)
Create StatusRuntimeException with given details.
-
-
-
Method Detail
-
hasFailure
public static boolean hasFailure(io.grpc.StatusRuntimeException exception, java.lang.Class<? extends com.google.protobuf.GeneratedMessageV3> failureType)
Determines if a StatusRuntimeException contains a failure message of a given type.- Returns:
- true if the given failure is found, false otherwise
-
getFailure
public static <T extends com.google.protobuf.GeneratedMessageV3> T getFailure(io.grpc.StatusRuntimeException exception, java.lang.Class<T> failureType)
- Returns:
- a failure of a given type from the StatusRuntimeException object
-
newException
public static <T extends com.google.protobuf.GeneratedMessageV3> io.grpc.StatusRuntimeException newException(io.grpc.Status status, T details)
Create StatusRuntimeException with given details.
-
-