Class EventDrivenConsumer
java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.endpoint.AbstractEndpoint
org.springframework.integration.endpoint.EventDrivenConsumer
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.InitializingBean,org.springframework.context.ApplicationContextAware,org.springframework.context.Lifecycle,org.springframework.context.Phased,org.springframework.context.SmartLifecycle,ExpressionCapable,IntegrationConsumer,NamedComponent,ManageableLifecycle,ManageableSmartLifecycle
public class EventDrivenConsumer extends AbstractEndpoint implements IntegrationConsumer
Message Endpoint that connects any
MessageHandler implementation to a SubscribableChannel.-
Field Summary
Fields inherited from class org.springframework.integration.endpoint.AbstractEndpoint
lifecycleCondition, lifecycleLockFields inherited from class org.springframework.integration.context.IntegrationObjectSupport
EXPRESSION_PARSER, logger -
Constructor Summary
Constructors Constructor Description EventDrivenConsumer(org.springframework.messaging.SubscribableChannel inputChannel, org.springframework.messaging.MessageHandler handler) -
Method Summary
Modifier and Type Method Description protected voiddoStart()Subclasses must implement this method with the start behavior.protected voiddoStop()Subclasses must implement this method with the stop behavior.org.springframework.messaging.MessageHandlergetHandler()Return the consumer's handler.org.springframework.messaging.MessageChannelgetInputChannel()Return the input channel.org.springframework.messaging.MessageChannelgetOutputChannel()Return the output channel (may be null).Methods inherited from class org.springframework.integration.endpoint.AbstractEndpoint
destroy, doStop, getPhase, getRole, isActive, isAutoStartup, isRunning, onInit, setAutoStartup, setPhase, setRole, start, stop, stopMethods inherited from class org.springframework.integration.context.IntegrationObjectSupport
afterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getComponentType, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.integration.support.context.NamedComponent
getBeanName, getComponentName, getComponentType
-
Constructor Details
-
EventDrivenConsumer
public EventDrivenConsumer(org.springframework.messaging.SubscribableChannel inputChannel, org.springframework.messaging.MessageHandler handler)
-
-
Method Details
-
getInputChannel
public org.springframework.messaging.MessageChannel getInputChannel()Description copied from interface:IntegrationConsumerReturn the input channel.- Specified by:
getInputChannelin interfaceIntegrationConsumer- Returns:
- the input channel.
-
getOutputChannel
public org.springframework.messaging.MessageChannel getOutputChannel()Description copied from interface:IntegrationConsumerReturn the output channel (may be null).- Specified by:
getOutputChannelin interfaceIntegrationConsumer- Returns:
- the output channel.
-
getHandler
public org.springframework.messaging.MessageHandler getHandler()Description copied from interface:IntegrationConsumerReturn the consumer's handler.- Specified by:
getHandlerin interfaceIntegrationConsumer- Returns:
- the handler.
-
doStart
protected void doStart()Description copied from class:AbstractEndpointSubclasses must implement this method with the start behavior. This method will be invoked while holding theAbstractEndpoint.lifecycleLock.- Specified by:
doStartin classAbstractEndpoint
-
doStop
protected void doStop()Description copied from class:AbstractEndpointSubclasses must implement this method with the stop behavior. This method will be invoked while holding theAbstractEndpoint.lifecycleLock.- Specified by:
doStopin classAbstractEndpoint
-