Class OperationRequest

java.lang.Object
com.pnfsoftware.jeb.client.api.OperationRequest

public class OperationRequest extends Object
An operation request. Reserved for internal use.

Not thread-safe.

See Also:
  • Constructor Details

    • OperationRequest

      public OperationRequest(Operation op)
      Create an operation request.
      Parameters:
      op - requested operation
      Throws:
      NullPointerException - if the operation is null
  • Method Details

    • getOperation

      public Operation getOperation()
      Get the requested operation.
      Returns:
      the operation
    • prepare

      public boolean prepare(IOperable operable)
      Mark an operable object as processing this request.
      Parameters:
      operable - operable object
      Returns:
      true if processing may proceed; false if the operable already processed or is processing this request
    • setResult

      public void setResult(boolean result)
      Set the final request result.
      Parameters:
      result - true if the operation was performed successfully
    • success

      public boolean success()
      Determine whether the request completed successfully.
      Returns:
      true if a successful result was set
    • done

      public boolean done()
      Determine whether processing of this request is complete.
      Returns:
      true if a result was set
    • proceed

      public boolean proceed()
      Determine whether processing should continue.
      Returns:
      true if no result has been set yet
    • duration

      public long duration()
      Get the request duration.
      Returns:
      elapsed time, in milliseconds