Class AsyncMessageService
- java.lang.Object
-
- com.avoka.fc.core.service.BaseService
-
- com.avoka.fc.core.service.CayenneService
-
- com.avoka.fc.core.service.submission.AsyncMessageService
-
public class AsyncMessageService extends CayenneService
Provides a Submission Asynchronous Message service service.- Since:
- 4.3.2
-
-
Constructor Summary
Constructors Constructor Description AsyncMessageService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SubmissionAsyncMsg
createRequestMsg(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
-
-
-
-
Method Detail
-
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
public void setReceivedStatus(SubmissionAsyncMsg asyncMsg)
Set the message received status.- Parameters:
asyncMsg
- the submission async message (required)
-
setResponseMsg
public void setResponseMsg(SubmissionAsyncMsg asyncMsg, String responseMsg)
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
public void setExpiredStatus(SubmissionAsyncMsg asyncMsg)
Set the expired status on the given message.- Parameters:
asyncMsg
- the submission async message (required)
-
setExpiredStatus
public void setExpiredStatus(List<SubmissionAsyncMsg> asyncMsgList)
Set the expired status on the given list of messages.- Parameters:
asyncMsgList
- the submission async message list (required)
-
-