Class AmqpConnection

    • Constructor Detail

      • AmqpConnection

        public AmqpConnection​(AmqpProvider provider,
                              JmsConnectionInfo info,
                              org.apache.qpid.proton.engine.Connection protonConnection)
    • Method Detail

      • unsubscribe

        public void unsubscribe​(String subscriptionName,
                                AsyncResult request)
      • addChildResource

        public void addChildResource​(AmqpResource resource)
        Description copied from interface: AmqpResourceParent
        Adds the given resource as a child of this resource so that it's lifetime becomes managed by that of its parent.
        Specified by:
        addChildResource in interface AmqpResourceParent
        Parameters:
        resource - The AmqpResource that is a child of this one.
      • removeChildResource

        public void removeChildResource​(AmqpResource resource)
        Description copied from interface: AmqpResourceParent
        Removes the given resource from the registered child resources managed by this one.
        Specified by:
        removeChildResource in interface AmqpResourceParent
        Parameters:
        resource - The AmqpResource that is no longer a child of this one.
      • getRemoteURI

        public URI getRemoteURI()
      • getQueuePrefix

        public String getQueuePrefix()
      • setQueuePrefix

        public void setQueuePrefix​(String queuePrefix)
      • getTopicPrefix

        public String getTopicPrefix()
      • setTopicPrefix

        public void setTopicPrefix​(String topicPrefix)
      • getSession

        public AmqpSession getSession​(JmsSessionId sessionId)
        Retrieve the indicated Session instance from the list of active sessions.
        Parameters:
        sessionId - The JmsSessionId that's associated with the target session.
        Returns:
        the AmqpSession associated with the given id.
      • getConnectionSession

        public AmqpConnectionSession getConnectionSession()
        Retrieves the AmqpConnectionSession owned by this AmqpConnection.
        Returns:
        the AmqpConnectionSession owned by this AmqpConnection.
      • isObjectMessageUsesAmqpTypes

        public boolean isObjectMessageUsesAmqpTypes()
        Returns:
        true if new ObjectMessage instance should default to using AMQP Typed bodies.
      • setObjectMessageUsesAmqpTypes

        public void setObjectMessageUsesAmqpTypes​(boolean objectMessageUsesAmqpTypes)
        Configures the body type used in ObjectMessage instances that are sent from this connection.
        Parameters:
        objectMessageUsesAmqpTypes - the objectMessageUsesAmqpTypes value to set.
      • getAnonymousProducerCacheSize

        public int getAnonymousProducerCacheSize()
        Returns:
        the configured max number of cached anonymous fallback producers to keep.
      • getAnonymousProducerCacheTimeout

        public int getAnonymousProducerCacheTimeout()
        Returns:
        The configured time before a cache anonymous producer link is close due to inactivity.
      • getAmqpMessageFactory

        public AmqpJmsMessageFactory getAmqpMessageFactory()
        Returns:
        the AMQP based JmsMessageFactory for this Connection.
      • getProperties

        public AmqpConnectionProperties getProperties()
        Returns the connection properties for an established connection which defines the various capabilities and configuration options of the remote connection. Prior to the establishment of a connection this method returns null.
        Returns:
        the properties available for this connection or null if not connected.
      • schedule

        public ScheduledFuture<?> schedule​(Runnable task,
                                           long delay)
        Allows a connection resource to schedule a task for future execution.
        Parameters:
        task - The Runnable task to be executed after the given delay.
        delay - The delay in milliseconds to schedule the given task for execution.
        Returns:
        a ScheduledFuture instance that can be used to cancel the task.
      • scheduleWithFixedDelay

        public ScheduledFuture<?> scheduleWithFixedDelay​(Runnable task,
                                                         long delay)
        Allows a connection resource to schedule a task for future execution which will start after the given delay and then repeat with a fixed delay between the end of one execution of the task and the beginning of the next execution.
        Parameters:
        task - The Runnable task to be executed after the given delay.
        delay - The delay in milliseconds to schedule the given task for execution.
        Returns:
        a ScheduledFuture instance that can be used to cancel the task.