Class AbstractListMessage<T>

  • Type Parameters:
    T -
    All Implemented Interfaces:
    PlatformMessage, java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<T>, java.util.Collection<T>, java.util.List<T>, java.util.RandomAccess
    Direct Known Subclasses:
    DocumentList, MessageList

    public abstract class AbstractListMessage<T>
    extends java.util.ArrayList<T>
    implements PlatformMessage
    Abstract container for list based messages.
    See Also:
    Serialized Form
    • Constructor Detail

      • AbstractListMessage

        public AbstractListMessage()
        Creates an empty list.
      • AbstractListMessage

        public AbstractListMessage​(int size)
        Creates an empty list of a fixed size.
    • Method Detail

      • getProperty

        public java.lang.Object getProperty​(java.lang.String key)
        Gets an arbitrary property for the message. Some transformations of messages may result in the value being converted to a String.
        Specified by:
        getProperty in interface PlatformMessage
        Parameters:
        key - the key
        Returns:
        property value
      • setProperty

        public void setProperty​(java.lang.String key,
                                java.lang.Object value)
        Sets an arbitrary property for the message. Some transformations of messages may result in the value being converted to a String.
        Specified by:
        setProperty in interface PlatformMessage
        Parameters:
        key - the key
        value - the value
      • removeProperty

        public void removeProperty​(java.lang.String key)
        Removes a property from the message.
        Specified by:
        removeProperty in interface PlatformMessage
      • getClientId

        public java.util.UUID getClientId()
        Gets the client to which this message belongs (may have originated with the client or be a response to the client).
        Specified by:
        getClientId in interface PlatformMessage
        Returns:
        the client ID
      • setClientId

        public void setClientId​(java.util.UUID clientId)
        Sets the client to which this message belongs.
        Specified by:
        setClientId in interface PlatformMessage
        Parameters:
        clientId - the client ID
      • getMessageId

        public MessageId getMessageId()
        Gets the message id associated with the message. message ids are used for internal ordering guarantees and may change as the message propagates through the system.
        Specified by:
        getMessageId in interface PlatformMessage
        Returns:
        the message ID
      • setMessageId

        public void setMessageId​(MessageId msgId)
        Sets the message id associated with the message.
        Specified by:
        setMessageId in interface PlatformMessage
        Parameters:
        msgId - the message ID
      • getMessageHistory

        public java.util.List<MessageHistory> getMessageHistory()
        Gets the list of components that have processed this message. The returned list is unmodifiable.
        Specified by:
        getMessageHistory in interface PlatformMessage
        Returns:
        the message history
      • getWorkflowQueue

        public WorkflowQueue getWorkflowQueue()
        Gets the workflow queue. Modifying the returned value will change the workflow destinations for the message.
        Specified by:
        getWorkflowQueue in interface PlatformMessage
        Returns:
        the workflow queue, may be null.
      • getWorkflowQueue

        public WorkflowQueue getWorkflowQueue​(boolean createIfNull)
        Optionally creates a new empty queue if null. Modifying the returned value will change the workflow destinations for the message.
        Specified by:
        getWorkflowQueue in interface PlatformMessage
        Parameters:
        createIfNull - if true and the queue is not set, creates a new empty queue
        Returns:
        the workflow queue
      • setWorkflowQueue

        public void setWorkflowQueue​(WorkflowQueue workflowQueue)
        Sets the workflow queue. wfQueue will be cloned.
        Specified by:
        setWorkflowQueue in interface PlatformMessage
        Parameters:
        workflowQueue - the workflow queue
      • setWorkflowQueue

        public void setWorkflowQueue​(java.lang.String... workflows)
        Sets the workflow queue. wfQueue will be cloned.
        Specified by:
        setWorkflowQueue in interface PlatformMessage
        Parameters:
        workflows - the list of workflows
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.util.AbstractCollection<T>
      • toStringDetailed

        public java.lang.String toStringDetailed()
      • toMessageString

        public java.lang.String toMessageString()
        Gets a string-based representation of the message containing string data only.
        Specified by:
        toMessageString in interface PlatformMessage
        Returns:
        the message string
      • isRedelivered

        public boolean isRedelivered()
        Returns true if the message (or its originating message) is re-delivered Redelivery is generally due to a failure and subsequent recovery in a fault tolerant system.
        Specified by:
        isRedelivered in interface PlatformMessage
        Returns:
        true if the message is re-delivered
      • setRedelivered

        public void setRedelivered​(boolean redelivered)
        Sets the re-delivered flag.
        Specified by:
        setRedelivered in interface PlatformMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface java.util.Collection<T>
        Specified by:
        hashCode in interface java.util.List<T>
        Overrides:
        hashCode in class java.util.ArrayList<T>
      • equals

        public boolean equals​(java.lang.Object other)
        Specified by:
        equals in interface java.util.Collection<T>
        Specified by:
        equals in interface java.util.List<T>
        Overrides:
        equals in class java.util.ArrayList<T>
      • clone

        public AbstractListMessage<T> clone()
        Clones a message. The message ID is not cloned.
        Specified by:
        clone in interface PlatformMessage
        Overrides:
        clone in class java.util.ArrayList<T>
        Returns:
        the cloned index message
      • clone

        protected abstract T clone​(T tmp)