public interface IRequestQueue
Modifier and Type | Method and Description |
---|---|
void |
approveRequest(IRequest request)
Approves a request.
|
void |
cancelRequest(IRequest request)
Cancels a request.
|
IRequest |
cloneAndMarkPending(IRequest r)
Clones a request object and mark it pending.
|
IRequest |
cloneRequest(IRequest r)
Clones a request object.
|
IRequest |
findRequest(RequestId id)
Gets the Request corresponding to id.
|
RequestId |
findRequestBySourceId(java.lang.String id)
Locates a request from the SourceId.
|
IRequestList |
findRequestsBySourceId(java.lang.String id)
Locates all requests with a particular SourceId.
|
java.math.BigInteger |
getLastRequestIdInRange(java.math.BigInteger reqId_low_bound,
java.math.BigInteger reqId_upper_bound) |
IRequestVirtualList |
getPagedRequests(int pageSize)
Gets a pageable list of IRequest entries in this queue.
|
IRequestVirtualList |
getPagedRequestsByFilter(RequestId fromId,
boolean jumpToEnd,
java.lang.String filter,
int pageSize,
java.lang.String sortKey)
Gets a pageable list of IRequest entries in this queue.
|
IRequestVirtualList |
getPagedRequestsByFilter(RequestId fromId,
java.lang.String filter,
int pageSize,
java.lang.String sortKey)
Gets a pageable list of IRequest entries in this queue.
|
IRequestVirtualList |
getPagedRequestsByFilter(java.lang.String filter,
int pageSize,
java.lang.String sortKey)
Gets a pageable list of IRequest entries in this queue.
|
INotify |
getPendingNotify()
Retrieves the notifier for pending request.
|
java.lang.String |
getPublishingStatus() |
IRepository |
getRequestRepository()
Gets request repository.
|
IRequestScheduler |
getRequestScheduler()
Gets request scheduler.
|
IRequestList |
listRequests()
Returns an enumerator that lists all RequestIds in the
queue.
|
IRequestList |
listRequestsByFilter(java.lang.String filter)
Returns an enumerator that lists all RequestIds for requests
that match the filter.
|
IRequestList |
listRequestsByFilter(java.lang.String filter,
int maxSize)
Returns an enumerator that lists all RequestIds for requests
that match the filter.
|
IRequestList |
listRequestsByFilter(java.lang.String filter,
int maxSize,
int timeLimit)
Returns an enumerator that lists all RequestIds for requests
that match the filter.
|
IRequestList |
listRequestsByStatus(RequestStatus status)
Returns an enumerator that lists all RequestIds for requests
that are in the given status.
|
void |
markAsServiced(IRequest r)
Marks as serviced after destination authority has serviced request.
|
void |
markRequestPending(IRequest req)
Puts a new request into the PENDING state.
|
IRequest |
newRequest(java.lang.String requestType)
Creates a new request object.
|
void |
processRequest(IRequest req)
Begins processing for this request.
|
void |
recover()
Resends requests
|
void |
rejectRequest(IRequest request)
Rejects a request.
|
void |
releaseRequest(IRequest r)
Releases the LOCK on a request obtained from findRequest() or
newRequest()
|
void |
removeAllObjects()
Removes all objects with this repository.
|
void |
resetSerialNumber(java.math.BigInteger serial)
Resets serial number.
|
void |
setPublishingStatus(java.lang.String status) |
void |
setRequestScheduler(IRequestScheduler scheduler)
Sets request scheduler.
|
void |
updateRequest(IRequest request)
Updates the request in the permanent data store.
|
IRequest newRequest(java.lang.String requestType) throws EBaseException
The request is LOCKED. The caller MUST release the request object by calling releaseRequest().
TODO: provide other required values (such as type and sourceId)
requestType
- request typeEBaseException
- failed to create new requestIRequest cloneRequest(IRequest r) throws EBaseException
The cloned request that is returned is LOCKED. The caller MUST release the request object by calling releaseRequest().
r
- request to be clonedEBaseException
- failed to clone requestIRequest findRequest(RequestId id) throws EBaseException
Errors may be generated for other conditions.
id
- request idEBaseException
- failed to access request queuevoid processRequest(IRequest req) throws EBaseException
req
- request to be processedEBaseException
- failed to process requestvoid setRequestScheduler(IRequestScheduler scheduler)
scheduler
- request schedulerIRequestScheduler getRequestScheduler()
void markRequestPending(IRequest req) throws EBaseException
This call might be used by agent servlets that want to copy a previous request, and resubmit it. By putting it into PENDING state, the normal agent screens can be used for further processing.
req
- the request to mark PENDINGEBaseException
- failed to mark request as pendingIRequest cloneAndMarkPending(IRequest r) throws EBaseException
The cloned request that is returned is LOCKED. The caller MUST release the request object by calling releaseRequest().
r
- request to be clonedEBaseException
- failed to clone or mark requestvoid approveRequest(IRequest request) throws EBaseException
This call will fail if: the request is not in PENDING state the policy modules do not accept the request
If the policy modules reject the request, then the request will remain in the PENDING state. Messages from the policy module can be display to the agent to indicate the source of the problem.
The request processing code adds an AgentApproval to this request that contains the authentication id of the agent. This data is retrieved from the Session object (qv).
request
- the request that is being approvedEBaseException
- failed to approve requestvoid rejectRequest(IRequest request) throws EBaseException
This call will fail if: the request is not in PENDING state
The agent servlet (or other application) may wish to store AgentMessage values to indicate the reason for the action
request
- the request that is being rejectedEBaseException
- failed to reject requestvoid cancelRequest(IRequest request) throws EBaseException
This call will fail if: the request is not in PENDING state
The agent servlet (or other application) may wish to store AgentMessage values to indicate the reason for the action
request
- the request that is being canceledEBaseException
- failed to cancel requestvoid updateRequest(IRequest request) throws EBaseException
This call can be made after changing a value like source id or owner, to force the new value to be written.
The request must be locked to make this call.
request
- the request that is being updatedEBaseException
- failed to update requestIRequestList listRequests()
NOTE: This interface will not be useful for large databases. This needs to be replace by a VLV (paged) search object.
IRequestList listRequestsByStatus(RequestStatus status)
NOTE: This interface will not be useful for large databases. This needs to be replace by a VLV (paged) search object.
status
- request statusIRequestList listRequestsByFilter(java.lang.String filter)
NOTE: This interface will not be useful for large databases. This needs to be replace by a VLV (paged) search object.
filter
- search filterIRequestList listRequestsByFilter(java.lang.String filter, int maxSize)
NOTE: This interface will not be useful for large databases. This needs to be replace by a VLV (paged) search object.
filter
- search filtermaxSize
- max size to returnIRequestList listRequestsByFilter(java.lang.String filter, int maxSize, int timeLimit)
NOTE: This interface will not be useful for large databases. This needs to be replace by a VLV (paged) search object.
filter
- search filtermaxSize
- max size to returntimeLimit
- timeout value for the searchRequestId findRequestBySourceId(java.lang.String id)
id
- a unique identifier for the record that is based on the source
of the request, and possibly an identify assigned by the source.IRequestList findRequestsBySourceId(java.lang.String id)
id
- an identifier for the record that is based on the source
of the requestvoid releaseRequest(IRequest r)
r
- requestvoid markAsServiced(IRequest r)
r
- requestvoid recover()
IRequestVirtualList getPagedRequests(int pageSize)
pageSize
- page sizeIRequestVirtualList getPagedRequestsByFilter(java.lang.String filter, int pageSize, java.lang.String sortKey)
filter
- search filterpageSize
- page sizesortKey
- the attributes to sort byIRequestVirtualList getPagedRequestsByFilter(RequestId fromId, java.lang.String filter, int pageSize, java.lang.String sortKey)
fromId
- request id to start withfilter
- search filterpageSize
- page sizesortKey
- the attributes to sort byIRequestVirtualList getPagedRequestsByFilter(RequestId fromId, boolean jumpToEnd, java.lang.String filter, int pageSize, java.lang.String sortKey)
fromId
- request id to start withjumpToEnd
- jump to end of list (set fromId to null)filter
- search filterpageSize
- page sizesortKey
- the attributes to sort byINotify getPendingNotify()
java.math.BigInteger getLastRequestIdInRange(java.math.BigInteger reqId_low_bound, java.math.BigInteger reqId_upper_bound)
void resetSerialNumber(java.math.BigInteger serial) throws EBaseException
EBaseException
void removeAllObjects() throws EBaseException
EBaseException
IRepository getRequestRepository()
java.lang.String getPublishingStatus()
void setPublishingStatus(java.lang.String status)