Class Nexus


  • public final class Nexus
    extends java.lang.Object
    This class contains methods exposing Temporal APIs for Nexus Operations
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static NexusOperationContext getOperationContext()
      Can be used to get information about a Nexus Operation.
      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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 RuntimeException or Error.