Interface Request
- All Superinterfaces:
Browsable, Extensible, Identifiable, OsidObject, OsidRelationship, Temporal
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 Summary
Modifier and TypeMethodDescriptiongetEWA()Gets the estimated waiting time for a provision out of the pool.Gets the provision to be exchanged if this request is provisioned.Gets theIdof the provision to be exchanged if this request is provisioned.Gets the provision that resulted in this request.Gets theIdof the provision that resulted in this request.getPool()Gets the pool.Gets theIdof the pool.longGets the position of this request in the queue.getQueue()Gets the queue.Gets theIdof the queue.Gets the date of the request.Gets theIdsof the requested provisionables.Gets the requested provisionables.Gets the queued resource.Gets theIdof the queued resource.Gets the requesting agent.Gets theIdof the requesting agent.getRequestRecord(Type requestRecordType) Gets the request record corresponding to the givenRequestrecordType.This method is used to retrieve an object implementing the requested record.Gets theIdof the transaction in which this request is a part.Gets theIdof the transaction in which this request is a part.booleanhasEWA()Tests if there is an estimated waiting time for a provision out of the pool.booleanhasPool()Tests if this request is qualified by a pool.booleanTests if this request has a position in the queue.booleanTests if this request was created to exchange a provision.booleanTests if this request was created as a result of another provision.Methods inherited from interface Browsable
getProperties, getPropertiesByRecordTypeModifier and TypeMethodDescriptionGets a list of properties.getPropertiesByRecordType(Type recordType) Gets a list of properties corresponding to the specified record type.Methods inherited from interface Extensible
getRecordTypes, hasRecordTypeModifier and TypeMethodDescriptionGets the record types available in this object.booleanhasRecordType(Type recordType) Tests if this object supports the given recordType.Methods inherited from interface Identifiable
getId, isCurrentMethods inherited from interface OsidObject
getDescription, getDisplayName, getGenusType, isOfGenusTypeModifier and TypeMethodDescriptionGets the description associated with this instance of this OSID object.Gets the preferred display name associated with this instance of this OSID object appropriate for display to the user.Gets the genus type of this object.booleanisOfGenusType(Type genusType) Tests if this object is of the given genusType.Methods inherited from interface OsidRelationship
getEndReason, getEndReasonId, hasEndReasonModifier and TypeMethodDescriptionGets a state indicating why this relationship has ended.Gets a stateIdindicating why this relationship has ended.booleanTests if a reason this relationship came to an end is known.Methods inherited from interface Temporal
getEndDate, getStartDate, isEffectiveModifier and TypeMethodDescriptionGets the end date.Gets the start date.booleanTests if the current date is within the start end end dates inclusive.
-
Method Details
-
getRequestTransactionId
Id getRequestTransactionId()Gets theIdof 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
Gets theIdof 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 theIdof the queue.- Returns:
- the queue
Id - Compliance:
mandatory- This method must be implemented.
-
getQueue
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 theIdof the queued resource.- Returns:
- the resource
Id - Compliance:
mandatory- This method must be implemented.
-
getRequester
Gets the queued resource.- Returns:
- the resource
- Throws:
OperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getRequestingAgentId
Id getRequestingAgentId()Gets theIdof the requesting agent.- Returns:
- the agent
Id - Compliance:
mandatory- This method must be implemented.
-
getRequestingAgent
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:
trueif this request has a pool,falseotherwise- Compliance:
mandatory- This method must be implemented.
-
getPoolId
Id getPoolId()Gets theIdof the pool.- Returns:
- the pool
Id - Throws:
IllegalStateException-hasPool()isfalse- Compliance:
mandatory- This method must be implemented.
-
getPool
Gets the pool.- Returns:
- the pool
- Throws:
IllegalStateException-hasPool()isfalseOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getRequestedProvisionableIds
IdList getRequestedProvisionableIds()Gets theIdsof the requested provisionables.- Returns:
- the requested provisionable
Ids - Compliance:
mandatory- This method must be implemented.
-
getRequestedProvisionables
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:
trueif this request is an exchange request,falseotherwise- Compliance:
mandatory- This method must be implemented.
-
getExchangeProvisionId
Id getExchangeProvisionId()Gets theIdof the provision to be exchanged if this request is provisioned.- Returns:
- the exchange provision
Id - Throws:
IllegalStateException-isExchange()isfalse- Compliance:
mandatory- This method must be implemented.
-
getExchangeProvision
Gets the provision to be exchanged if this request is provisioned.- Returns:
- the exchange provision
- Throws:
IllegalStateException-isExchange()isfalseOperationFailedException- 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:
trueif this request is a provision result,falseotherwise- Compliance:
mandatory- This method must be implemented.
-
getOriginProvisionId
Id getOriginProvisionId()Gets theIdof the provision that resulted in this request.- Returns:
- the origin provision
Id - Throws:
IllegalStateException-isProvisionResult()is false- Compliance:
mandatory- This method must be implemented.
-
getOriginProvision
Gets the provision that resulted in this request.- Returns:
- the origin provision
- Throws:
IllegalStateException-isProvisionResult()is falseOperationFailedException- 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()isfalse- 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:
trueif this request has an estimated time,falseotherwise- 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()isfalse- Compliance:
mandatory- This method must be implemented.
-
getRequestRecord
Gets the request record corresponding to the givenRequestrecordType.This method is used to retrieve an object implementing the requested record. TherequestRecordTypemay be theTypereturned ingetRecordTypes()or any of its parents in aTypehierarchy wherehasRecordType(requestRecordType)istrue.- Parameters:
requestRecordType- the type of request record to retrieve- Returns:
- the request record
- Throws:
NullArgumentException-requestRecordTypeisnullOperationFailedException- unable to complete requestUnsupportedException-hasRecordType(requestRecordType)isfalse- Compliance:
mandatory- This method must be implemented.
-