Class SimulatedTimeoutException

  • All Implemented Interfaces:
    java.io.Serializable

    public final class SimulatedTimeoutException
    extends java.lang.RuntimeException
    SimulatedTimeoutException can be thrown from an activity or child workflow implementation to simulate a timeout. To be used only in unit tests. If thrown from an activity the workflow code is going to receive it as ActivityTimeoutException. If thrown from a child workflow the workflow code is going to receive it as ChildWorkflowTimedOutException.
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object getDetails()  
      TimeoutType getTimeoutType()  
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • SimulatedTimeoutException

        public SimulatedTimeoutException​(TimeoutType timeoutType,
                                         java.lang.Object details)
        Creates an instance with specific timeoutType and details. Use this constructor to simulate an activity timeout.
        Parameters:
        timeoutType - timeout type to simulate
        details - details included into the timeout exception.
      • SimulatedTimeoutException

        public SimulatedTimeoutException()
        Creates an instance with no details and START_TO_CLOSE timeout. Use this constructor to simulate a child workflow timeout.
      • SimulatedTimeoutException

        public SimulatedTimeoutException​(TimeoutType timeoutType)
        Creates an instance with specific timeoutType and empty details. Use this constructor to simulate an activity timeout.
        Parameters:
        timeoutType - timeout type to simulate
    • Method Detail

      • getDetails

        public java.lang.Object getDetails()