Class AsyncMessageService
java.lang.Object
com.avoka.fc.core.service.BaseService
com.avoka.fc.core.service.CayenneService
com.avoka.fc.core.service.submission.AsyncMessageService
Provides a Submission Asynchronous Message service service.
- Since:
- 4.3.2
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateRequestMsg
(Submission submission, String topic, String requestMsg, Date expiryTime) Create a request message with the status of 'Ready'.void
setExpiredStatus
(SubmissionAsyncMsg asyncMsg) Set the expired status on the given message.void
setExpiredStatus
(List<SubmissionAsyncMsg> asyncMsgList) Set the expired status on the given list of messages.void
setReceivedStatus
(SubmissionAsyncMsg asyncMsg) Set the message received status.void
setResponseMsg
(SubmissionAsyncMsg asyncMsg, String responseMsg) Set the message response and update status to "Completed".Methods inherited from class com.avoka.fc.core.service.CayenneService
commitChanges, deleteObject, deleteObjects, findObject, getDataContext, getDataDomain, getObjectForPK, getObjectStore, newObject, performNamedQuery, performNamedQuery, performNamedQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performQuery, performQuery, refetchEntity, refetchObject, registerNewObject, rollbackChanges, toMap, toMap
Methods inherited from class com.avoka.fc.core.service.BaseService
getLogger
-
Constructor Details
-
AsyncMessageService
public AsyncMessageService()
-
-
Method Details
-
createRequestMsg
public SubmissionAsyncMsg createRequestMsg(Submission submission, String topic, String requestMsg, Date expiryTime) Create a request message with the status of 'Ready'.- Parameters:
submission
- the parent submission (required)topic
- the message topic (required)requestMsg
- the request message (required)expiryTime
- the time the message will expire (optional)- Returns:
- a new submission async messsage
-
setReceivedStatus
Set the message received status.- Parameters:
asyncMsg
- the submission async message (required)
-
setResponseMsg
Set the message response and update status to "Completed". Note if the message has already been automatically expired the message status will remain "Expired".- Parameters:
asyncMsg
- the submission async message (required)responseMsg
- the response message (required)
-
setExpiredStatus
Set the expired status on the given message.- Parameters:
asyncMsg
- the submission async message (required)
-
setExpiredStatus
Set the expired status on the given list of messages.- Parameters:
asyncMsgList
- the submission async message list (required)
-