|
Cumulus4j API (1.1.0) |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.cumulus4j.store.crypto.keymanager.messagebroker.pmf.PendingRequest
public class PendingRequest
Persistent container holding a Request
and optionally
the corresponding Response
. Used by MessageBrokerPMF
to transmit messages via a backing-database.
Nested Class Summary | |
---|---|
static class |
PendingRequest.FetchGroup
Fetch-groups for PendingRequest . |
Constructor Summary | |
---|---|
protected |
PendingRequest()
Internal constructor only used by JDO. |
|
PendingRequest(Request request)
Create an instance of PendingRequest for the given request . |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
Date |
getCreationTimestamp()
Get the timestamp when this PendingRequest was instantiated. |
String |
getCryptoSessionIDPrefix()
Get the cryptoSessionIDPrefix of the Request that was passed to
PendingRequest(Request) . |
Date |
getLastStatusChangeTimestamp()
Get the timestamp when the status was changed
the last time. |
static PendingRequest |
getOldestPendingRequest(PersistenceManager pm,
String cryptoSessionIDPrefix,
PendingRequestStatus status)
Get the oldest PendingRequest matching the given criteria. |
static PendingRequest |
getPendingRequest(PersistenceManager pm,
String requestID)
Get the PendingRequest uniquely identified by the given requestID . |
static Collection<PendingRequest> |
getPendingRequestsWithLastStatusChangeTimestampOlderThanTimestamp(PersistenceManager pm,
Date timestamp)
|
Request |
getRequest()
Get the Request that was passed to PendingRequest(Request) . |
String |
getRequestID()
Get the requestID of the Request that was passed to
PendingRequest(Request) . |
Response |
getResponse()
Get the Response previously set or null , if none is set, yet. |
PendingRequestStatus |
getStatus()
Get the current status. |
int |
hashCode()
|
void |
setResponse(Response response)
Set the Response . |
void |
setStatus(PendingRequestStatus status)
Set the current status. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected PendingRequest()
public PendingRequest(Request request)
PendingRequest
for the given request
.
request
- the request to be processed and thus temporarily stored in the database;
must not be null
.Method Detail |
---|
public static Collection<PendingRequest> getPendingRequestsWithLastStatusChangeTimestampOlderThanTimestamp(PersistenceManager pm, Date timestamp)
public static PendingRequest getOldestPendingRequest(PersistenceManager pm, String cryptoSessionIDPrefix, PendingRequestStatus status)
PendingRequest
matching the given criteria.
pm
- the PersistenceManager
for accessing the message-transfer-database. Must not be null
.cryptoSessionIDPrefix
- the cryptoSessionIDPrefix
used
as criterion to filter the candidate-PendingRequest
s. Must not be null
.status
- the status
used as criterion to filter the candidate-PendingRequest
s.
Must not be null
.
PendingRequest
matching the given criteria or null
if there is
no PendingRequest
in the datastore which matches the criteria.public static PendingRequest getPendingRequest(PersistenceManager pm, String requestID)
PendingRequest
uniquely identified by the given requestID
.
If no such PendingRequest
exists, return null
.
pm
- the PersistenceManager
for accessing the message-transfer-database. Must not be null
.requestID
- the unique identifier of the PendingRequest
to obtain. Must not be null
.
PendingRequest
identified by the given requestID
or null
, if
no such object exists in the datastore.public String getRequestID()
requestID
of the Request
that was passed to
PendingRequest(Request)
. This property is the primary key of this class.
requestID
.public String getCryptoSessionIDPrefix()
cryptoSessionIDPrefix
of the Request
that was passed to
PendingRequest(Request)
.
cryptoSessionIDPrefix
.public PendingRequestStatus getStatus()
null
, if the instance was not yet
persisted.setStatus(PendingRequestStatus)
public void setStatus(PendingRequestStatus status)
lastStatusChangeTimestamp
.
status
- the new status; must not be null
(because of NullValue.EXCEPTION
).getStatus()
public Request getRequest()
Request
that was passed to PendingRequest(Request)
.
null
.public Response getResponse()
Response
previously set
or null
, if none is set, yet.
null
.public void setResponse(Response response)
Response
.
response
- the response.public Date getCreationTimestamp()
PendingRequest
was instantiated.
PendingRequest
created.public Date getLastStatusChangeTimestamp()
status
was changed
the last time.
status
-change.public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
|
Cumulus4j API (1.1.0) |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |