Class ProducerMessages

    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        define serialVersionUID for interoperability
        See Also:
        Constant Field Values
      • messages

        private Vector<Message> messages
        The wrapped messages.
      • asyncSend

        private boolean asyncSend
        Indicates whether the produced messages are asynchronously send or not (without or with an acknowledgement).
    • Constructor Detail

      • ProducerMessages

        public ProducerMessages​(String dest)
        Constructs a ProducerMessages instance.
        Parameters:
        dest - Name of the destination the messages are sent to.
      • ProducerMessages

        public ProducerMessages​(String dest,
                                Message msg)
        Constructs a ProducerMessages instance carrying a single message.
        Parameters:
        dest - Name of the destination the messages are sent to.
        msg - Message to carry.
      • ProducerMessages

        public ProducerMessages()
        Constructs a ProducerMessages instance.
    • Method Detail

      • setAsyncSend

        public void setAsyncSend​(boolean b)
      • getAsyncSend

        public final boolean getAsyncSend()
      • getMessages

        public Vector<Message> getMessages()
        Returns the produced messages
        Returns:
        The produced messages.
      • addMessage

        public void addMessage​(Message msg)
        Adds a message to deliver.
        Parameters:
        msg - The message to add.
      • addMessages

        public void addMessages​(Vector<Message> msgs)
        Adds messages to deliver.
        Parameters:
        msgs - The messages to add
      • setMessages

        public void setMessages​(Vector<Message> newMsgs)
        Replace old messages vector by new newMsgs vector
        Parameters:
        newMsgs - new messages vector.
      • readFrom

        public void readFrom​(InputStream is)
                      throws IOException
        The object implements the readFrom method to restore its contents from the input stream.
        Specified by:
        readFrom in interface Streamable
        Overrides:
        readFrom in class AbstractJmsRequest
        Parameters:
        is - the stream to read data from in order to restore the object
        Throws:
        IOException - an error occurs during IO operation.