Interface MessageContext


public interface MessageContext
Contains contextual information about a Message. This object is passed to a MessageProcessor which processes Spark messages in an inbound queue.
  • Method Details

    • getMessageId

      String getMessageId()
      Retrieves this message ID.
      Returns:
      The ID that is returned from PutMessageResult.getMessageId() that uniquely identifies a message to a specific connection or local queue.
    • getMessage

      Message getMessage()
      Retrieves this Message object.
      Returns:
      The Message given to QueueService.putMessage(Message) that will contain Items and Attributes that have been put on the queue.
    • getConnectionId

      String getConnectionId()
      Retrieves the ID of the Connection record associated with this Message. This identifies the source of the Message.
      Returns:
      connection record ID, or null if the Message is from a local putMessage call
    • getQueueName

      String getQueueName()
      Retrieves the name of the queue which received this Message. For messages sent between Vaults, this is the inbound queue.
      Returns:
      name of queue which received this Message
    • getRemoteVaultId

      String getRemoteVaultId()
      Retrieve the ID of the Vault which sent this Message.
      Returns:
      ID of the source Vault, or null if the Message is from a local putMessage call
    • getRemoteQueueName

      String getRemoteQueueName()
      Retrieves the name of the queue which sent this Message. For messages sent between Vaults, this is the outbound queue.
      Returns:
      name of the queue which sent this Message, or null if the Message is from a local putMessage call
    • getErrorProvider

      ErrorProvider getErrorProvider()
      Retrieves the ErrorProvider instance associated with this Message. Used to set an error record in Vault.
      Returns:
      an instance of ErrorProvider