org.springframework.integration.endpoint
Class AbstractEndpoint
java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.endpoint.AbstractEndpoint
- All Implemented Interfaces:
- BeanFactoryAware, BeanNameAware, InitializingBean, Lifecycle, Phased, SmartLifecycle, NamedComponent
- Direct Known Subclasses:
- AbstractMessagingGateway, AbstractPollingEndpoint, EventDrivenConsumer, GatewayProxyFactoryBean, JmsMessageDrivenEndpoint, MessageProducerSupport, XmppMessageDrivenEndpoint, XmppRosterEventMessageDrivenEndpoint
public abstract class AbstractEndpoint
- extends IntegrationObjectSupport
- implements SmartLifecycle
The base class for Message Endpoint implementations.
This class implements Lifecycle and provides an autoStartup
property. If true
, the endpoint will start automatically upon
initialization. Otherwise, it will require an explicit invocation of its
start()
method. The default value is true
.
To require explicit startup, provide a value of false
to the setAutoStartup(boolean)
method.
- Author:
- Mark Fisher
Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport |
afterPropertiesSet, getBeanFactory, getChannelResolver, getComponentName, getComponentType, getConversionService, getTaskScheduler, onInit, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, toString, writeMessageHistory |
AbstractEndpoint
public AbstractEndpoint()
setAutoStartup
public void setAutoStartup(boolean autoStartup)
setPhase
public void setPhase(int phase)
setTaskScheduler
public void setTaskScheduler(TaskScheduler taskScheduler)
- Overrides:
setTaskScheduler
in class IntegrationObjectSupport
isAutoStartup
public final boolean isAutoStartup()
- Specified by:
isAutoStartup
in interface SmartLifecycle
getPhase
public final int getPhase()
- Specified by:
getPhase
in interface Phased
isRunning
public final boolean isRunning()
- Specified by:
isRunning
in interface Lifecycle
start
public final void start()
- Specified by:
start
in interface Lifecycle
stop
public final void stop()
- Specified by:
stop
in interface Lifecycle
stop
public final void stop(Runnable callback)
- Specified by:
stop
in interface SmartLifecycle
doStart
protected abstract void doStart()
- Subclasses must implement this method with the start behavior.
This method will be invoked while holding the
lifecycleLock
.
doStop
protected abstract void doStop()
- Subclasses must implement this method with the stop behavior.
This method will be invoked while holding the
lifecycleLock
.
Copyright © 2010. All Rights Reserved.