Interface Continuation


public interface Continuation
Represents transport-neutral suspended invocation instances or continuations
  • Method Summary

    Modifier and Type
    Method
    Description
    Get arbitrary object associated with the continuation for context
    boolean
    Is this a newly created Continuation.
    boolean
    Get the pending status
    boolean
     
    boolean
    Get the resumed status
    boolean
    Get the timeout status
    void
    Reset the continuation
    void
    Resume a suspended request
    void
    Sets arbitrary object associated with the continuation for context
    boolean
    suspend(long timeout)
    This method will suspend the request for the timeout or until resume is called
  • Method Details

    • suspend

      boolean suspend(long timeout)
      This method will suspend the request for the timeout or until resume is called
      Parameters:
      timeout - the suspend timeout, timeout of 0 will suspend the request indefinitely.
      Returns:
      true if suspend was successful.
    • resume

      void resume()
      Resume a suspended request
    • reset

      void reset()
      Reset the continuation
    • isNew

      boolean isNew()
      Is this a newly created Continuation.
      Returns:
      true if the continuation has just been created and has not yet suspended the request.
    • isPending

      boolean isPending()
      Get the pending status
      Returns:
      true if the continuation has been suspended.
    • isResumed

      boolean isResumed()
      Get the resumed status
      Returns:
      true if the continuation is has been resumed.
    • isTimeout

      boolean isTimeout()
      Get the timeout status
      Returns:
      true if the continuation is has been timeout.
    • getObject

      Object getObject()
      Get arbitrary object associated with the continuation for context
      Returns:
      An arbitrary object associated with the continuation
    • setObject

      void setObject(Object o)
      Sets arbitrary object associated with the continuation for context
      Parameters:
      o - An arbitrary object to associate with the continuation
    • isReadyForWrite

      boolean isReadyForWrite()