Class TopicConnection

    • Constructor Detail

      • TopicConnection

        public TopicConnection()
        Creates a TopicConnection instance.
    • Method Detail

      • createConnectionConsumer

        public ConnectionConsumer createConnectionConsumer​(Topic topic,
                                                           String selector,
                                                           ServerSessionPool sessionPool,
                                                           int maxMessages)
                                                    throws JMSException
        API method. Creates a connection consumer for this connection, this is an expert facility needed for applications servers.
        Specified by:
        createConnectionConsumer in interface TopicConnection
        Parameters:
        topic - the topic to access.
        selector - only messages with properties matching the message selector expression are delivered. A value of null or an empty string indicates that there is no message selector for this message consumer.
        sessionPool - the server session pool to associate with this connection consumer.
        maxMessages - the maximum number of messages that can be assigned to a server session at one time.
        Returns:
        The connection consumer.
        Throws:
        IllegalStateException - If the connection is closed.
        InvalidSelectorException - If the selector syntax is wrong.
        InvalidDestinationException - If the target destination does not exist.
        JMSException - If the method fails for any other reason.
      • createTopicSession

        public TopicSession createTopicSession​(boolean transacted,
                                               int acknowledgeMode)
                                        throws JMSException
        API method. Creates a TopicSession object.
        Specified by:
        createTopicSession in interface TopicConnection
        Parameters:
        transacted - indicates whether the session is transacted.
        acknowledgeMode - indicates whether the consumer or the client will acknowledge any messages it receives; ignored if the session is transacted. Legal values are Session.AUTO_ACKNOWLEDGE, Session.CLIENT_ACKNOWLEDGE, and Session.DUPS_OK_ACKNOWLEDGE.
        Returns:
        A newly created session.
        Throws:
        IllegalStateException - If the connection is closed.
        JMSException - In case of an invalid acknowledge mode.