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.Message>
TgetFailure(io.grpc.StatusRuntimeException exception, java.lang.Class<T> failureType)static booleanhasFailure(io.grpc.StatusRuntimeException exception, java.lang.Class<? extends com.google.protobuf.Message> failureType)Determines if a StatusRuntimeException contains a failure message of a given type.static <T extends com.google.protobuf.Message>
io.grpc.StatusRuntimeExceptionnewException(io.grpc.Status status, T details, com.google.protobuf.Descriptors.Descriptor detailsDescriptor)Create StatusRuntimeException with given details.
-
-
-
Method Detail
-
hasFailure
public static boolean hasFailure(io.grpc.StatusRuntimeException exception, java.lang.Class<? extends com.google.protobuf.Message> 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.Message> 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.Message> io.grpc.StatusRuntimeException newException(io.grpc.Status status, T details, com.google.protobuf.Descriptors.Descriptor detailsDescriptor)Create StatusRuntimeException with given details.
-
-