Class AsyncMessageService


public class AsyncMessageService extends CayenneService
Provides a Submission Asynchronous Message service service.
Since:
4.3.2
  • 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

      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)