Class SourcePollingChannelAdapter
java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.endpoint.AbstractEndpoint
org.springframework.integration.endpoint.AbstractPollingEndpoint
org.springframework.integration.endpoint.SourcePollingChannelAdapter
- All Implemented Interfaces:
Aware,BeanClassLoaderAware,BeanFactoryAware,BeanNameAware,DisposableBean,InitializingBean,ApplicationContextAware,Lifecycle,Phased,SmartLifecycle,ComponentSourceAware,ExpressionCapable,NamedComponent,IntegrationManagement,ManageableLifecycle,ManageableSmartLifecycle,TrackableComponent
public class SourcePollingChannelAdapter
extends AbstractPollingEndpoint
implements TrackableComponent, IntegrationManagement
A Channel Adapter implementation for connecting a
MessageSource to a MessageChannel.- Author:
- Mark Fisher, Oleg Zhurakousky, Gary Russell, Artem Bilan, Christian Tzolov
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.integration.support.management.IntegrationManagement
IntegrationManagement.ManagementOverrides -
Field Summary
Fields inherited from class org.springframework.integration.endpoint.AbstractPollingEndpoint
DEFAULT_POLLING_PERIODFields inherited from class org.springframework.integration.endpoint.AbstractEndpoint
lifecycleLockFields inherited from class org.springframework.integration.context.IntegrationObjectSupport
EXPRESSION_PARSER, loggerFields inherited from interface org.springframework.integration.support.management.IntegrationManagement
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAMEFields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddonePollingTask(@Nullable Message<?> message) Stop an observation (and close its scope) previously started from themessageReceived(IntegrationResourceHolder, Message).protected voiddoStart()Subclasses must implement this method with the start behavior.protected voiddoStop()Subclasses must implement this method with the stop behavior.Return this endpoint's source.protected Objectprotected StringReturn the key under which the resource will be made available as an attribute on theIntegrationResourceHolder.protected ObjectReturn a resource (MessageSource etc.) to bind when using transaction synchronization.protected voidhandleMessage(Message<?> messageArg) Handle a message.booleanTrue if this implementation is going to deal with a registry other than theObservationRegistry.NOOPinstance.protected booleanprotected voidmessageReceived(@Nullable IntegrationResourceHolder holder, Message<?> message) Start an observation (and open scope) for the received message.protected voidonInit()Subclasses may implement this for initialization logic.protected @Nullable Message<?> Obtain the next message (if one is available).voidregisterObservationRegistry(io.micrometer.observation.ObservationRegistry observationRegistry) Inject anObservationRegistry.voidsetObservationConvention(@Nullable MessageReceiverObservationConvention observationConvention) Set a customMessageReceiverObservationConventionforIntegrationObservation.HANDLER.voidsetOutputChannel(MessageChannel outputChannel) Specify theMessageChannelwhere Messages should be sent.void