Interface SignalHandle


public interface SignalHandle
Handle to resolve or reject a named signal on a target invocation. Acquired via InvocationHandle.signal(String).

Unlike awakeables, signals are identified by (invocationId, name) and do not need to be pre-registered: the resolution can arrive before or after the handler starts waiting on the signal.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    reject(String reason)
    Reject the signal with the given reason.
    <T> void
    resolve(TypeTag<T> typeTag, T payload)
    Resolve the signal with the given value.
    default <T> void
    resolve(Class<T> clazz, T payload)
    Resolve the signal with the given value.
  • Method Details

    • resolve

      <T> void resolve(TypeTag<T> typeTag, T payload)
      Resolve the signal with the given value.
      Parameters:
      typeTag - used to serialize the result payload.
      payload - the result payload. MUST NOT be null.
    • resolve

      default <T> void resolve(Class<T> clazz, T payload)
      Resolve the signal with the given value.
      Parameters:
      clazz - used to serialize the result payload.
      payload - the result payload. MUST NOT be null.
    • reject

      void reject(String reason)
      Reject the signal with the given reason. The handler awaiting the signal will receive a terminal error with reason as the message.
      Parameters:
      reason - the rejection reason. MUST NOT be null.