Package io.temporal.nexus
Class Nexus
- java.lang.Object
-
- io.temporal.nexus.Nexus
-
public final class Nexus extends java.lang.ObjectThis class contains methods exposing Temporal APIs for Nexus Operations
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static NexusOperationContextgetOperationContext()Can be used to get information about a Nexus Operation.static java.lang.RuntimeExceptionwrap(java.lang.Throwable e)Use this to rethrow a checked exception from a Nexus Operation instead of adding the exception to a method signature.
-
-
-
Method Detail
-
getOperationContext
public static NexusOperationContext getOperationContext()
Can be used to get information about a Nexus Operation. This static method relies on a thread-local variable and works only in the original Nexus thread.
-
wrap
public static java.lang.RuntimeException wrap(java.lang.Throwable e)
Use this to rethrow a checked exception from a Nexus Operation instead of adding the exception to a method signature.- Returns:
- Never returns; always throws. Throws original exception if e is
RuntimeExceptionorError.
-
-