public class DefaultPollableMessageSource extends Object implements PollableMessageSource, org.springframework.context.Lifecycle, org.springframework.retry.RetryListener
PollableMessageSource.| Modifier and Type | Field and Description |
|---|---|
protected static ThreadLocal<org.springframework.core.AttributeAccessor> |
attributesHolder |
| Constructor and Description |
|---|
DefaultPollableMessageSource(org.springframework.messaging.converter.SmartMessageConverter messageConverter) |
| Modifier and Type | Method and Description |
|---|---|
void |
addInterceptor(org.springframework.messaging.support.ChannelInterceptor interceptor) |
void |
addInterceptor(int index,
org.springframework.messaging.support.ChannelInterceptor interceptor) |
<T,E extends Throwable> |
close(org.springframework.retry.RetryContext context,
org.springframework.retry.RetryCallback<T,E> callback,
Throwable throwable) |
boolean |
isRunning() |
<T,E extends Throwable> |
onError(org.springframework.retry.RetryContext context,
org.springframework.retry.RetryCallback<T,E> callback,
Throwable throwable) |
<T,E extends Throwable> |
open(org.springframework.retry.RetryContext context,
org.springframework.retry.RetryCallback<T,E> callback) |
boolean |
poll(org.springframework.messaging.MessageHandler handler)
Poll the consumer.
|
boolean |
poll(org.springframework.messaging.MessageHandler handler,
org.springframework.core.ParameterizedTypeReference<?> type)
Poll the consumer and convert the payload to the type.
|
void |
setAttributesProvider(BiConsumer<org.springframework.core.AttributeAccessor,org.springframework.messaging.Message<?>> attributesProvider) |
void |
setErrorChannel(org.springframework.messaging.MessageChannel errorChannel) |
void |
setErrorMessageStrategy(org.springframework.integration.support.ErrorMessageStrategy errorMessageStrategy) |
void |
setRecoveryCallback(org.springframework.retry.RecoveryCallback<Object> recoveryCallback) |
void |
setRetryTemplate(org.springframework.retry.support.RetryTemplate retryTemplate) |
void |
setSource(org.springframework.integration.core.MessageSource<?> source) |
void |
start() |
void |
stop() |
protected static final ThreadLocal<org.springframework.core.AttributeAccessor> attributesHolder
public DefaultPollableMessageSource(@Nullable
org.springframework.messaging.converter.SmartMessageConverter messageConverter)
messageConverter - instance of SmartMessageConverter. Can be null.public void setSource(org.springframework.integration.core.MessageSource<?> source)
public void setRetryTemplate(org.springframework.retry.support.RetryTemplate retryTemplate)
public void setRecoveryCallback(org.springframework.retry.RecoveryCallback<Object> recoveryCallback)
public void setErrorChannel(org.springframework.messaging.MessageChannel errorChannel)
public void setErrorMessageStrategy(org.springframework.integration.support.ErrorMessageStrategy errorMessageStrategy)
public void setAttributesProvider(BiConsumer<org.springframework.core.AttributeAccessor,org.springframework.messaging.Message<?>> attributesProvider)
public void addInterceptor(org.springframework.messaging.support.ChannelInterceptor interceptor)
public void addInterceptor(int index,
org.springframework.messaging.support.ChannelInterceptor interceptor)
public boolean isRunning()
isRunning in interface org.springframework.context.Lifecyclepublic void start()
start in interface org.springframework.context.Lifecyclepublic void stop()
stop in interface org.springframework.context.Lifecyclepublic boolean poll(org.springframework.messaging.MessageHandler handler)
PollableSourcepoll in interface PollableSource<org.springframework.messaging.MessageHandler>handler - the handler.public boolean poll(org.springframework.messaging.MessageHandler handler,
org.springframework.core.ParameterizedTypeReference<?> type)
PollableSourcepoll in interface PollableSource<org.springframework.messaging.MessageHandler>handler - the handler.type - the type.public <T,E extends Throwable> boolean open(org.springframework.retry.RetryContext context, org.springframework.retry.RetryCallback<T,E> callback)
open in interface org.springframework.retry.RetryListenerpublic <T,E extends Throwable> void close(org.springframework.retry.RetryContext context, org.springframework.retry.RetryCallback<T,E> callback, Throwable throwable)
close in interface org.springframework.retry.RetryListenerCopyright © 2018 Pivotal Software, Inc.. All rights reserved.