Interface Request

All Superinterfaces:
Browsable, Extensible, Identifiable, OsidObject, OsidRelationship, Temporal

public interface Request extends OsidRelationship

A Request is an entry in a Queue . It is a relationship berween a Queue and a Resource qualified by a Pool . A request is inactive if the queue is disabled.

  • Method Details

    • getRequestTransactionId

      Id getRequestTransactionId()
      Gets the Id of the transaction in which this request is a part. Requests can be made individually or as part of a transaction group to provide an atomic compound request.
      Returns:
      the request transaction Id
      Compliance:
      mandatory - This method must be implemented.
    • getRequestTransaction

      RequestTransaction getRequestTransaction() throws OperationFailedException
      Gets the Id of the transaction in which this request is a part. Requests can be made individually or as part of a transaction group to provide an atomic compound request.
      Returns:
      the request transaction
      Throws:
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getQueueId

      Id getQueueId()
      Gets the Id of the queue.
      Returns:
      the queue Id
      Compliance:
      mandatory - This method must be implemented.
    • getQueue

      Queue getQueue() throws OperationFailedException
      Gets the queue.
      Returns:
      the queue
      Throws:
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getRequestDate

      DateTime getRequestDate()
      Gets the date of the request.
      Returns:
      the request date
      Compliance:
      mandatory - This method must be implemented.
    • getRequesterId

      Id getRequesterId()
      Gets the Id of the queued resource.
      Returns:
      the resource Id
      Compliance:
      mandatory - This method must be implemented.
    • getRequester

      Resource getRequester() throws OperationFailedException
      Gets the queued resource.
      Returns:
      the resource
      Throws:
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getRequestingAgentId

      Id getRequestingAgentId()
      Gets the Id of the requesting agent.
      Returns:
      the agent Id
      Compliance:
      mandatory - This method must be implemented.
    • getRequestingAgent

      Agent getRequestingAgent() throws OperationFailedException
      Gets the requesting agent.
      Returns:
      the requesting agent
      Throws:
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • hasPool

      boolean hasPool()
      Tests if this request is qualified by a pool. An unqualified request may be allocated out of any pool in the broker.
      Returns:
      true if this request has a pool, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getPoolId

      Id getPoolId()
      Gets the Id of the pool.
      Returns:
      the pool Id
      Throws:
      IllegalStateException - hasPool() is false
      Compliance:
      mandatory - This method must be implemented.
    • getPool

      Pool getPool() throws OperationFailedException
      Gets the pool.
      Returns:
      the pool
      Throws:
      IllegalStateException - hasPool() is false
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getRequestedProvisionableIds

      IdList getRequestedProvisionableIds()
      Gets the Ids of the requested provisionables.
      Returns:
      the requested provisionable Ids
      Compliance:
      mandatory - This method must be implemented.
    • getRequestedProvisionables

      ProvisionableList getRequestedProvisionables() throws OperationFailedException
      Gets the requested provisionables.
      Returns:
      the requested provisionables
      Throws:
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • isExchange

      boolean isExchange()
      Tests if this request was created to exchange a provision.
      Returns:
      true if this request is an exchange request, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getExchangeProvisionId

      Id getExchangeProvisionId()
      Gets the Id of the provision to be exchanged if this request is provisioned.
      Returns:
      the exchange provision Id
      Throws:
      IllegalStateException - isExchange() is false
      Compliance:
      mandatory - This method must be implemented.
    • getExchangeProvision

      Provision getExchangeProvision() throws OperationFailedException
      Gets the provision to be exchanged if this request is provisioned.
      Returns:
      the exchange provision
      Throws:
      IllegalStateException - isExchange() is false
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • isProvisionResult

      boolean isProvisionResult()
      Tests if this request was created as a result of another provision.
      Returns:
      true if this request is a provision result, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getOriginProvisionId

      Id getOriginProvisionId()
      Gets the Id of the provision that resulted in this request.
      Returns:
      the origin provision Id
      Throws:
      IllegalStateException - isProvisionResult() is f alse
      Compliance:
      mandatory - This method must be implemented.
    • getOriginProvision

      Provision getOriginProvision() throws OperationFailedException
      Gets the provision that resulted in this request.
      Returns:
      the origin provision
      Throws:
      IllegalStateException - isProvisionResult() is f alse
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • hasPosition

      boolean hasPosition()
      Tests if this request has a position in the queue. A position may be indicate the rank of the request among waiting requests for the same pool.
      Returns:
      true if this request has a position, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getPosition

      long getPosition()
      Gets the position of this request in the queue. A position may be indicate the rank of the request among waiting request for the same pool.
      Returns:
      the position
      Throws:
      IllegalStateException - hasPosition() is false
      Compliance:
      mandatory - This method must be implemented.
    • hasEWA

      boolean hasEWA()
      Tests if there is an estimated waiting time for a provision out of the pool.
      Returns:
      true if this request has an estimated time, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getEWA

      Duration getEWA()
      Gets the estimated waiting time for a provision out of the pool.
      Returns:
      the estimated waiting time
      Throws:
      IllegalStateException - hasEWA() is false
      Compliance:
      mandatory - This method must be implemented.
    • getRequestRecord

      RequestRecord getRequestRecord(Type requestRecordType) throws OperationFailedException
      Gets the request record corresponding to the given Request record Type .This method is used to retrieve an object implementing the requested record. The requestRecordType may be the Type returned in getRecordTypes() or any of its parents in a Type hierarchy where hasRecordType(requestRecordType) is true .
      Parameters:
      requestRecordType - the type of request record to retrieve
      Returns:
      the request record
      Throws:
      NullArgumentException - requestRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(requestRecordType) is false
      Compliance:
      mandatory - This method must be implemented.