Class RedisOutboundChannelAdapterSpec
java.lang.Object
org.springframework.integration.dsl.IntegrationComponentSpec<RedisOutboundChannelAdapterSpec, RedisPublishingMessageHandler>
org.springframework.integration.dsl.MessageHandlerSpec<RedisOutboundChannelAdapterSpec, RedisPublishingMessageHandler>
org.springframework.integration.redis.dsl.RedisOutboundChannelAdapterSpec
- All Implemented Interfaces:
org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.FactoryBean<RedisPublishingMessageHandler>, org.springframework.beans.factory.InitializingBean, org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle
public class RedisOutboundChannelAdapterSpec
extends org.springframework.integration.dsl.MessageHandlerSpec<RedisOutboundChannelAdapterSpec, RedisPublishingMessageHandler>
A
MessageHandlerSpec for a RedisPublishingMessageHandler.- Since:
- 7.1
-
Field Summary
Fields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
logger, PARSER, targetFields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTEFields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedRedisOutboundChannelAdapterSpec(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory) -
Method Summary
Modifier and TypeMethodDescriptionmessageConverter(org.springframework.messaging.converter.MessageConverter messageConverter) Specify the messageConverter to convert between Redis messages and Spring message payloads.serializer(org.springframework.data.redis.serializer.RedisSerializer<?> serializer) Specify the RedisSerializer to serialize data before sending to the Redis.Specify the topic to publish messages.topicExpression(String topicExpression) Configure a SpEL expression to determine the topic.topicExpression(org.springframework.expression.Expression topicExpression) Specify the topicExpression to determine the topic.topicFunction(Function<org.springframework.messaging.Message<P>, String> topicFunction) Configure aFunctionto determine the topic.Methods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
_this, afterPropertiesSet, destroy, doGet, getId, getObject, getObjectType, getPhase, id, isAutoStartup, isRunning, start, stop, stopMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.beans.factory.FactoryBean
isSingletonMethods inherited from interface org.springframework.context.SmartLifecycle
isPauseable, pause, restart
-
Constructor Details
-
RedisOutboundChannelAdapterSpec
protected RedisOutboundChannelAdapterSpec(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory)
-
-
Method Details
-
serializer
public RedisOutboundChannelAdapterSpec serializer(org.springframework.data.redis.serializer.RedisSerializer<?> serializer) Specify the RedisSerializer to serialize data before sending to the Redis.- Parameters:
serializer- the serializer- Returns:
- the spec
- See Also:
-
messageConverter
public RedisOutboundChannelAdapterSpec messageConverter(org.springframework.messaging.converter.MessageConverter messageConverter) Specify the messageConverter to convert between Redis messages and Spring message payloads.- Parameters:
messageConverter- the messageConverter- Returns:
- the spec
- See Also:
-
topic
Specify the topic to publish messages.- Parameters:
topic- the topic- Returns:
- the spec
- See Also:
-
topicExpression
public RedisOutboundChannelAdapterSpec topicExpression(org.springframework.expression.Expression topicExpression) Specify the topicExpression to determine the topic.- Parameters:
topicExpression- the topicExpression- Returns:
- the spec
- See Also:
-
topicExpression
Configure a SpEL expression to determine the topic.- Parameters:
topicExpression- the topicExpression- Returns:
- the spec
- See Also:
-
topicFunction
public <P> RedisOutboundChannelAdapterSpec topicFunction(Function<org.springframework.messaging.Message<P>, String> topicFunction) Configure aFunctionto determine the topic.- Type Parameters:
P- the payload type.- Parameters:
topicFunction- the topicFunction- Returns:
- the spec
-