Class MessageSelectingQueueChannel

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, org.springframework.integration.channel.ExecutorChannelInterceptorAware, org.springframework.integration.channel.QueueChannelOperations, org.springframework.integration.context.ExpressionCapable, org.springframework.integration.IntegrationPattern, org.springframework.integration.support.context.NamedComponent, org.springframework.integration.support.management.IntegrationManagement, org.springframework.integration.support.management.TrackableComponent, org.springframework.messaging.MessageChannel, org.springframework.messaging.PollableChannel, org.springframework.messaging.support.InterceptableChannel

    public class MessageSelectingQueueChannel
    extends org.springframework.integration.channel.QueueChannel
    Added selective consumption of messages according to a message selector implementation.
    Author:
    Christoph Deppisch
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.springframework.integration.channel.AbstractMessageChannel

        org.springframework.integration.channel.AbstractMessageChannel.ChannelInterceptorList
      • Nested classes/interfaces inherited from interface org.springframework.integration.support.management.IntegrationManagement

        org.springframework.integration.support.management.IntegrationManagement.ManagementOverrides
    • Field Summary

      • Fields inherited from class org.springframework.integration.channel.QueueChannel

        queueSemaphore
      • Fields inherited from class org.springframework.integration.channel.AbstractMessageChannel

        interceptors, meters
      • Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport

        EXPRESSION_PARSER, logger
      • Fields inherited from interface org.springframework.integration.support.management.IntegrationManagement

        METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME
      • Fields inherited from interface org.springframework.messaging.MessageChannel

        INDEFINITE_TIMEOUT
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getPollingInterval()
      Gets the pollingInterval.
      org.springframework.messaging.Message<?> receive​(org.springframework.integration.core.MessageSelector selector)
      Supports selective consumption of messages on the channel.
      org.springframework.messaging.Message<?> receive​(org.springframework.integration.core.MessageSelector selector, long timeout)
      Consume messages on the channel via message selector.
      void setPollingInterval​(long pollingInterval)
      Sets the pollingInterval.
      • Methods inherited from class org.springframework.integration.channel.QueueChannel

        clear, destroy, doReceive, doSend, getQueueSize, getRemainingCapacity, purge, registerMetricsCaptor
      • Methods inherited from class org.springframework.integration.channel.AbstractPollableChannel

        addInterceptor, addInterceptor, getIntegrationPatternType, hasExecutorInterceptors, receive, receive, removeInterceptor, removeInterceptor, setInterceptors
      • Methods inherited from class org.springframework.integration.channel.AbstractMessageChannel

        getComponentType, getFullChannelName, getIChannelInterceptorList, getInterceptors, getMetricsCaptor, getOverrides, isLoggingEnabled, onInit, send, send, setDatatypes, setLoggingEnabled, setMessageConverter, setShouldTrack
      • Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport

        afterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toString
      • Methods inherited from interface org.springframework.integration.support.management.IntegrationManagement

        getManagedName, getManagedType, getThisAs, setManagedName, setManagedType
      • Methods inherited from interface org.springframework.messaging.support.InterceptableChannel

        getInterceptors
      • Methods inherited from interface org.springframework.messaging.MessageChannel

        send, send
      • Methods inherited from interface org.springframework.integration.support.context.NamedComponent

        getBeanName, getComponentName
    • Constructor Detail

      • MessageSelectingQueueChannel

        public MessageSelectingQueueChannel​(BlockingQueue<org.springframework.messaging.Message<?>> queue)
        Create a channel with the specified queue.
      • MessageSelectingQueueChannel

        public MessageSelectingQueueChannel​(int capacity)
        Create a channel with the specified queue capacity.
      • MessageSelectingQueueChannel

        public MessageSelectingQueueChannel()
        Default constructor.
    • Method Detail

      • receive

        public org.springframework.messaging.Message<?> receive​(org.springframework.integration.core.MessageSelector selector)
        Supports selective consumption of messages on the channel. The first message to be accepted by given message selector is returned as result.
        Parameters:
        selector -
        Returns:
      • receive

        public org.springframework.messaging.Message<?> receive​(org.springframework.integration.core.MessageSelector selector,
                                                                long timeout)
        Consume messages on the channel via message selector. Timeout forces several retries with polling interval setting.
        Parameters:
        selector -
        timeout -
        Returns:
      • getPollingInterval

        public long getPollingInterval()
        Gets the pollingInterval.
        Returns:
        the pollingInterval the pollingInterval to get.
      • setPollingInterval

        public void setPollingInterval​(long pollingInterval)
        Sets the pollingInterval.
        Parameters:
        pollingInterval - the pollingInterval to set