public class SubscribableRedisChannel
extends org.springframework.integration.channel.AbstractMessageChannel
implements org.springframework.messaging.SubscribableChannel, org.springframework.context.SmartLifecycle, org.springframework.beans.factory.DisposableBean
Constructor and Description |
---|
SubscribableRedisChannel(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory,
java.lang.String topicName) |
Modifier and Type | Method and Description |
---|---|
void |
destroy() |
protected boolean |
doSend(org.springframework.messaging.Message<?> message,
long arg1) |
int |
getPhase() |
boolean |
isAutoStartup() |
boolean |
isRunning() |
void |
onInit() |
void |
setMaxSubscribers(int maxSubscribers)
Specify the maximum number of subscribers supported by the
channel's dispatcher.
|
void |
setMessageConverter(org.springframework.messaging.converter.MessageConverter messageConverter) |
void |
setSerializer(org.springframework.data.redis.serializer.RedisSerializer<?> serializer) |
void |
setTaskExecutor(java.util.concurrent.Executor taskExecutor) |
void |
start() |
void |
stop() |
void |
stop(java.lang.Runnable callback) |
boolean |
subscribe(org.springframework.messaging.MessageHandler handler) |
boolean |
unsubscribe(org.springframework.messaging.MessageHandler handler) |
addInterceptor, addInterceptor, getChannelInterceptors, getComponentType, getFullChannelName, getInterceptors, removeInterceptor, removeInterceptor, send, send, setConversionService, setDatatypes, setInterceptors, setShouldTrack
afterPropertiesSet, getApplicationContext, getApplicationContextId, getBeanFactory, getComponentName, getConversionService, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setComponentName, setMessageBuilderFactory, setTaskScheduler, toString
public SubscribableRedisChannel(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory, java.lang.String topicName)
public void setTaskExecutor(java.util.concurrent.Executor taskExecutor)
public void setMessageConverter(org.springframework.messaging.converter.MessageConverter messageConverter)
setMessageConverter
in class org.springframework.integration.channel.AbstractMessageChannel
public void setSerializer(org.springframework.data.redis.serializer.RedisSerializer<?> serializer)
public void setMaxSubscribers(int maxSubscribers)
maxSubscribers
- The maximum number of subscribers allowed.public boolean subscribe(org.springframework.messaging.MessageHandler handler)
subscribe
in interface org.springframework.messaging.SubscribableChannel
public boolean unsubscribe(org.springframework.messaging.MessageHandler handler)
unsubscribe
in interface org.springframework.messaging.SubscribableChannel
protected boolean doSend(org.springframework.messaging.Message<?> message, long arg1)
doSend
in class org.springframework.integration.channel.AbstractMessageChannel
public void onInit() throws java.lang.Exception
onInit
in class org.springframework.integration.channel.AbstractMessageChannel
java.lang.Exception
public boolean isAutoStartup()
isAutoStartup
in interface org.springframework.context.SmartLifecycle
public int getPhase()
getPhase
in interface org.springframework.context.Phased
public boolean isRunning()
isRunning
in interface org.springframework.context.Lifecycle
public void start()
start
in interface org.springframework.context.Lifecycle
public void stop()
stop
in interface org.springframework.context.Lifecycle
public void stop(java.lang.Runnable callback)
stop
in interface org.springframework.context.SmartLifecycle
public void destroy() throws java.lang.Exception
destroy
in interface org.springframework.beans.factory.DisposableBean
java.lang.Exception