Class JmsStore

    • Constructor Detail

      • JmsStore

        public JmsStore()
    • Method Detail

      • getProducer

        public MessageProducer getProducer()
        Description copied from interface: MessageStore
        Returns a Message Producer for this message store.
        Returns:
        A non-null message producer that can produce messages to this message store.
      • clear

        public void clear()
        Description copied from interface: MessageStore
        Delete all the Messages in the Message Store
      • remove

        public MessageContext remove​(String messageID)
        Description copied from interface: MessageStore
        Delete and return the MessageContext with given Message id
        Parameters:
        messageID - message id of the Message
        Returns:
        MessageContext instance
      • get

        public MessageContext get​(int index)
        Description copied from interface: MessageStore
        Return the Message in given index position (this may depend on the implementation)
        Parameters:
        index - position of the message
        Returns:
        Message in given index position
      • getAll

        public List<MessageContext> getAll()
        Description copied from interface: MessageStore
        Get the All messages in the Message store without removing them from the queue
        Returns:
        List of all Messages
      • get

        public MessageContext get​(String messageId)
        Description copied from interface: MessageStore
        Get the Message with the given ID from the Message store without removing it
        Parameters:
        messageId - A message ID string
        Returns:
        Message with given ID
      • newConnection

        public javax.jms.Connection newConnection()
                                           throws javax.jms.JMSException,
                                                  StoreForwardException
        Creates a new JMS Connection.
        Returns:
        A connection to the JMS Queue used as the store of this message store.
        Throws:
        javax.jms.JMSException - on a JMS issue
        StoreForwardException - on a non JMS issue
      • newSession

        public javax.jms.Session newSession​(javax.jms.Connection connection,
                                            int mode,
                                            boolean isProducerSession)
                                     throws javax.jms.JMSException,
                                            StoreForwardException
        Creates a new JMS Session.
        Parameters:
        connection - The JMS Connection that must be used when creating the session.
        mode - Acknowledgement mode that must be used for this session.
        isProducerSession - Type of the session going to create
        Returns:
        A JMS Session.
        Throws:
        javax.jms.JMSException - on a JMS related issue
        StoreForwardException - on a non JMS related issue
      • newProducer

        public javax.jms.MessageProducer newProducer​(javax.jms.Session session)
                                              throws javax.jms.JMSException,
                                                     StoreForwardException
        Creates a new JMS Message Producer.
        Parameters:
        session - A JMS Session.
        Returns:
        A JMS Message Producer.
        Throws:
        javax.jms.JMSException
        StoreForwardException
      • newConsumer

        public javax.jms.MessageConsumer newConsumer​(javax.jms.Session session)
                                              throws javax.jms.JMSException,
                                                     StoreForwardException
        Returns a new JMS Message Consumer.
        Parameters:
        session - JMS Session to create consumer form
        Returns:
        JMS Message Consumer
        Throws:
        javax.jms.JMSException - on JMS issue when creating consumer with JMS provider
        StoreForwardException
      • newWriteConnection

        public void newWriteConnection()
                                throws StoreForwardException,
                                       javax.jms.JMSException
        Creates a new JMS Message producer connection.
        Throws:
        StoreForwardException - on a non JMS related issue
        javax.jms.JMSException - on a JMS issue
      • closeWriteConnection

        public void closeWriteConnection()
                                  throws javax.jms.JMSException
        Closes the existing JMS message producer connection.
        Throws:
        javax.jms.JMSException - on a JMS level issue
      • producerConnection

        public javax.jms.Connection producerConnection()
        Returns the existing JMS message producer connection.
        Returns:
        The current JMS Connection used to create message producers.
      • closeConnection

        public void closeConnection​(javax.jms.Connection connection)
                             throws javax.jms.JMSException
        Closes the given JMS Connection.
        Parameters:
        connection - The JMS Connection to be closed.
        Throws:
        javax.jms.JMSException - on a JMS level issue
      • reset

        public void reset​(javax.jms.Connection connection,
                          javax.jms.Session session)
                   throws javax.jms.JMSException
        Resets the JMS session for next message
        Parameters:
        connection - JMS Connection
        session - JMS Session associated with the given connection
        Throws:
        javax.jms.JMSException
      • cleanup

        public void cleanup​(javax.jms.Connection connection,
                            javax.jms.Session session)
                     throws javax.jms.JMSException
        Cleans up the JMS Connection and Session associated with a JMS client.
        Parameters:
        connection - JMS Connection
        session - JMS Session associated with the given connection
        Throws:
        javax.jms.JMSException
      • newAxis2Mc

        public org.apache.axis2.context.MessageContext newAxis2Mc()
      • newSynapseMc

        public MessageContext newSynapseMc​(org.apache.axis2.context.MessageContext msgCtx)
      • setCachedProducer

        public void setCachedProducer​(MessageProducer cachedProducer)