Class RedisStoreMessageSource
java.lang.Object
org.springframework.integration.util.AbstractExpressionEvaluator
org.springframework.integration.endpoint.AbstractMessageSource<RedisStore>
org.springframework.integration.redis.inbound.RedisStoreMessageSource
- All Implemented Interfaces:
- Aware,- BeanFactoryAware,- BeanNameAware,- DisposableBean,- InitializingBean,- MessageSource<RedisStore>,- IntegrationPattern,- NamedComponent,- IntegrationInboundManagement,- IntegrationManagement
Inbound channel adapter which returns a Message representing a view into
 a Redis store. The type of store depends on the 
collectionType attribute.
 Default is LIST. This adapter supports 5 types of collections identified by
 RedisCollectionFactoryBean.CollectionType- Since:
- 2.2
- Author:
- Oleg Zhurakousky, Gary Russell, Artem Bilan
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.springframework.integration.support.management.IntegrationManagementIntegrationManagement.ManagementOverrides
- 
Field SummaryFields inherited from class org.springframework.integration.util.AbstractExpressionEvaluatorEXPRESSION_PARSER, loggerFields inherited from interface org.springframework.integration.support.management.IntegrationManagementMETER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME
- 
Constructor SummaryConstructorsConstructorDescriptionRedisStoreMessageSource(RedisConnectionFactory connectionFactory, Expression keyExpression) Create an instance with the providedRedisConnectionFactoryand SpEL expression which should resolve to a 'key' name of the collection to be used.RedisStoreMessageSource(RedisTemplate<String, ?> redisTemplate, Expression keyExpression) Create an instance with the providedRedisTemplateand SpEL expression which should resolve to a 'key' name of the collection to be used.
- 
Method SummaryModifier and TypeMethodDescriptionprotected RedisStoreReturn a Message with the view into aRedisStoreidentified bykeyExpressionprotected voidonInit()voidsetCollectionType(RedisCollectionFactoryBean.CollectionType collectionType) Methods inherited from class org.springframework.integration.endpoint.AbstractMessageSourcebuildMessage, destroy, getBeanName, getComponentName, getManagedName, getManagedType, getOverrides, isLoggingEnabled, receive, registerMetricsCaptor, setBeanName, setHeaderExpressions, setLoggingEnabled, setManagedName, setManagedTypeMethods inherited from class org.springframework.integration.util.AbstractExpressionEvaluatorafterPropertiesSet, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, getBeanFactory, getEvaluationContext, getEvaluationContext, getMessageBuilderFactory, setBeanFactory, setConversionService, setSimpleEvaluationContextMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.integration.support.management.IntegrationManagementgetThisAs, isObserved, registerObservationRegistryMethods inherited from interface org.springframework.integration.core.MessageSourcegetIntegrationPatternType
- 
Constructor Details- 
RedisStoreMessageSourceCreate an instance with the providedRedisTemplateand SpEL expression which should resolve to a 'key' name of the collection to be used. It assumes thatRedisTemplateis fully initialized and ready to be used. The 'keyExpression' will be evaluated on every call to theAbstractMessageSource.receive()method.- Parameters:
- redisTemplate- The Redis template.
- keyExpression- The key expression.
 
- 
RedisStoreMessageSourceCreate an instance with the providedRedisConnectionFactoryand SpEL expression which should resolve to a 'key' name of the collection to be used. It will create and initialize an instance ofStringRedisTemplatethat usesStringRedisSerializerfor all serialization. The 'keyExpression' will be evaluated on every call to theAbstractMessageSource.receive()method.- Parameters:
- connectionFactory- The connection factory.
- keyExpression- The key expression.
 
 
- 
- 
Method Details- 
setCollectionType
- 
onInitprotected void onInit()- Overrides:
- onInitin class- AbstractExpressionEvaluator
 
- 
doReceiveReturn a Message with the view into aRedisStoreidentified bykeyExpression- Specified by:
- doReceivein class- AbstractMessageSource<RedisStore>
- Returns:
- The value returned.
 
- 
getComponentType
 
-