public class SubscribableRedisChannel extends AbstractMessageChannel implements SubscribableChannel, SmartLifecycle, DisposableBean
AbstractMessageChannel.ChannelInterceptorListinterceptorsEXPRESSION_PARSER, loggerINDEFINITE_TIMEOUT| Constructor and Description |
|---|
SubscribableRedisChannel(RedisConnectionFactory connectionFactory,
String topicName) |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy() |
protected boolean |
doSend(Message<?> message,
long arg1)
Subclasses must implement this method.
|
int |
getPhase() |
boolean |
isAutoStartup() |
boolean |
isRunning() |
void |
onInit()
Subclasses may implement this for initialization logic.
|
void |
setMaxSubscribers(int maxSubscribers)
Specify the maximum number of subscribers supported by the
channel's dispatcher.
|
void |
setMessageConverter(MessageConverter messageConverter)
Specify the
MessageConverter to use when trying to convert to
one of this channel's supported datatypes (in order) for a Message whose payload
does not already match. |
void |
setSerializer(RedisSerializer<?> serializer) |
void |
setTaskExecutor(Executor taskExecutor) |
void |
start() |
void |
stop() |
void |
stop(Runnable callback) |
boolean |
subscribe(MessageHandler handler) |
boolean |
unsubscribe(MessageHandler handler) |
addInterceptor, addInterceptor, configureMetrics, getChannelInterceptors, getComponentType, getErrorRate, getFullChannelName, getInterceptors, getMaxSendDuration, getMeanErrorRate, getMeanErrorRatio, getMeanSendDuration, getMeanSendRate, getMetrics, getMinSendDuration, getSendCount, getSendCountLong, getSendDuration, getSendErrorCount, getSendErrorCountLong, getSendRate, getStandardDeviationSendDuration, getTimeSinceLastSend, isCountsEnabled, isLoggingEnabled, isStatsEnabled, removeInterceptor, removeInterceptor, reset, send, send, setCountsEnabled, setDatatypes, setInterceptors, setLoggingEnabled, setShouldTrack, setStatsEnabledafterPropertiesSet, extractTypeIfPossible, getApplicationContext, getApplicationContextId, getBeanFactory, getChannelResolver, getComponentName, getConversionService, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setTaskScheduler, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitsend, sendgetComponentNamepublic SubscribableRedisChannel(RedisConnectionFactory connectionFactory, String topicName)
public void setTaskExecutor(Executor taskExecutor)
public void setMessageConverter(MessageConverter messageConverter)
AbstractMessageChannelMessageConverter to use when trying to convert to
one of this channel's supported datatypes (in order) for a Message whose payload
does not already match.
Note: only the MessageConverter.fromMessage(Message, Class)
method is used. If the returned object is not a Message, the inbound
headers will be copied; if the returned object is a Message, it is
expected that the converter will have fully populated the headers; no
further action is performed by the channel. If null is returned,
conversion to the next datatype (if any) will be attempted.
Defaults to a DefaultDatatypeChannelMessageConverter.
setMessageConverter in class AbstractMessageChannelmessageConverter - The message converter.public void setSerializer(RedisSerializer<?> serializer)
public void setMaxSubscribers(int maxSubscribers)
maxSubscribers - The maximum number of subscribers allowed.public boolean subscribe(MessageHandler handler)
subscribe in interface SubscribableChannelpublic boolean unsubscribe(MessageHandler handler)
unsubscribe in interface SubscribableChannelprotected boolean doSend(Message<?> message, long arg1)
AbstractMessageChanneldoSend in class AbstractMessageChannelmessage - The message.arg1 - The timeout.public void onInit()
throws Exception
IntegrationObjectSupportonInit in class AbstractMessageChannelException - Any exception.public boolean isAutoStartup()
isAutoStartup in interface SmartLifecyclepublic void stop(Runnable callback)
stop in interface SmartLifecyclepublic void destroy()
throws Exception
destroy in interface DisposableBeanException