Package com.consol.citrus.channel
Class MessageSelectingQueueChannel
- java.lang.Object
-
- org.springframework.integration.context.IntegrationObjectSupport
-
- org.springframework.integration.channel.AbstractMessageChannel
-
- org.springframework.integration.channel.AbstractPollableChannel
-
- org.springframework.integration.channel.QueueChannel
-
- com.consol.citrus.channel.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.QueueChannelAdded selective consumption of messages according to a message selector implementation.- Author:
- Christoph Deppisch
-
-
Field Summary
-
Fields inherited from class org.springframework.integration.channel.AbstractMessageChannel
interceptors, meters
-
Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport
EXPRESSION_PARSER, logger
-
-
Constructor Summary
Constructors Constructor Description MessageSelectingQueueChannel()Default constructor.MessageSelectingQueueChannel(int capacity)Create a channel with the specified queue capacity.MessageSelectingQueueChannel(BlockingQueue<org.springframework.messaging.Message<?>> queue)Create a channel with the specified queue.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetPollingInterval()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.voidsetPollingInterval(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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.springframework.integration.support.management.IntegrationManagement
getManagedName, getManagedType, getThisAs, setManagedName, setManagedType
-
-
-
-
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
-
-