Class AbstractRabbitListenerEndpoint

    • Constructor Detail

      • AbstractRabbitListenerEndpoint

        public AbstractRabbitListenerEndpoint()
    • Method Detail

      • getBeanResolver

        protected BeanResolver getBeanResolver()
      • setId

        public void setId​(java.lang.String id)
      • setQueues

        public void setQueues​(Queue... queues)
        Set the queues to use. Either the Queue instances or the queue names should be provided, but not both.
        Parameters:
        queues - to set.
        See Also:
        setQueueNames(java.lang.String...)
      • getQueues

        public java.util.Collection<Queue> getQueues()
        Returns:
        the queues for this endpoint.
      • getQueueNames

        public java.util.Collection<java.lang.String> getQueueNames()
        Returns:
        the queue names for this endpoint.
      • setQueueNames

        public void setQueueNames​(java.lang.String... queueNames)
        Set the queue names to use. Either the Queue instances or the queue names should be provided, but not both.
        Parameters:
        queueNames - to set.
        See Also:
        setQueues(org.springframework.amqp.core.Queue...)
      • setExclusive

        public void setExclusive​(boolean exclusive)
        Set if a single consumer in the container will have exclusive use of the queues, preventing other consumers from receiving messages from the queue(s).
        Parameters:
        exclusive - the exclusive boolean flag.
      • isExclusive

        public boolean isExclusive()
        Returns:
        the exclusive boolean flag.
      • setPriority

        public void setPriority​(java.lang.Integer priority)
        Set the priority of this endpoint.
        Parameters:
        priority - the priority value.
      • getPriority

        public java.lang.Integer getPriority()
        Returns:
        the priority of this endpoint or null if no priority is set.
      • setConcurrency

        public void setConcurrency​(java.lang.String concurrency)
        Set the concurrency of this endpoint; usually overrides any concurrency settings on the container factory. Contents depend on container implementation.
        Parameters:
        concurrency - the concurrency.
        Since:
        2.0
      • getConcurrency

        public java.lang.String getConcurrency()
        The concurrency of this endpoint; Not used by this abstract class; used by subclasses to set the concurrency appropriate for the container type.
        Specified by:
        getConcurrency in interface RabbitListenerEndpoint
        Returns:
        the concurrency.
        Since:
        2.0
      • getAdmin

        public AmqpAdmin getAdmin()
        Returns:
        the AmqpAdmin instance to use or null if none is configured.
      • getGroup

        public java.lang.String getGroup()
        Specified by:
        getGroup in interface RabbitListenerEndpoint
        Returns:
        the group of this endpoint or null if not in a group.
      • setGroup

        public void setGroup​(java.lang.String group)
        Set the group for the corresponding listener container.
        Parameters:
        group - the group.
        Since:
        1.5
      • setAutoStartup

        public void setAutoStartup​(java.lang.Boolean autoStartup)
        Override the default autoStartup property.
        Parameters:
        autoStartup - the autoStartup.
        Since:
        2.0
      • getMessageConverter

        public MessageConverter getMessageConverter()
        Description copied from interface: RabbitListenerEndpoint
        Used by the container factory to check if this endpoint supports the preferred way for a container factory to pass a message converter to the endpoint's adapter. If null is returned, the factory will fall back to the legacy method of passing the converter via the container.
        Specified by:
        getMessageConverter in interface RabbitListenerEndpoint
        Returns:
        the converter.
      • setTaskExecutor

        public void setTaskExecutor​(TaskExecutor taskExecutor)
        Override the default task executor.
        Parameters:
        taskExecutor - the executor.
        Since:
        2.2
      • isBatchListener

        public boolean isBatchListener()
      • setReplyPostProcessor

        public void setReplyPostProcessor​(ReplyPostProcessor replyPostProcessor)
        Set a ReplyPostProcessor to post process a response message before it is sent.
        Parameters:
        replyPostProcessor - the post processor.
        Since:
        2.2.5
      • setReplyContentType

        public void setReplyContentType​(java.lang.String replyContentType)
        Set the reply content type.
        Parameters:
        replyContentType - the content type.
        Since:
        2.3
      • setConverterWinsContentType

        public void setConverterWinsContentType​(boolean converterWinsContentType)
        Set whether the content type set by a converter prevails or not.
        Parameters:
        converterWinsContentType - false to always apply the reply content type.
        Since:
        2.3
      • setupListenerContainer

        public void setupListenerContainer​(MessageListenerContainer listenerContainer)
        Description copied from interface: RabbitListenerEndpoint
        Setup the specified message listener container with the model defined by this endpoint.

        This endpoint must provide the requested missing option(s) of the specified container to make it usable. Usually, this is about setting the queues and the messageListener to use but an implementation may override any default setting that was already set.

        Specified by:
        setupListenerContainer in interface RabbitListenerEndpoint
        Parameters:
        listenerContainer - the listener container to configure
      • getEndpointDescription

        protected java.lang.StringBuilder getEndpointDescription()
        Returns:
        a description for this endpoint.

        Available to subclasses, for inclusion in their toString() result.

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object