public abstract class AbstractEndpoint extends IntegrationObjectSupport implements org.springframework.context.SmartLifecycle
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.
logger
Constructor and Description |
---|
AbstractEndpoint() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
doStart()
Subclasses must implement this method with the start behavior.
|
protected abstract void |
doStop()
Subclasses must implement this method with the stop behavior.
|
int |
getPhase() |
boolean |
isAutoStartup() |
boolean |
isRunning() |
void |
setAutoStartup(boolean autoStartup) |
void |
setPhase(int phase) |
void |
setTaskScheduler(org.springframework.scheduling.TaskScheduler taskScheduler) |
void |
start() |
void |
stop() |
void |
stop(java.lang.Runnable callback) |
afterPropertiesSet, getApplicationContextId, getBeanFactory, getComponentName, getComponentType, getConversionService, getIntegrationProperties, getIntegrationProperty, getTaskScheduler, onInit, setApplicationContext, setBeanFactory, setBeanName, setComponentName, setConversionService, toString
public void setAutoStartup(boolean autoStartup)
public void setPhase(int phase)
public void setTaskScheduler(org.springframework.scheduling.TaskScheduler taskScheduler)
setTaskScheduler
in class IntegrationObjectSupport
public final boolean isAutoStartup()
isAutoStartup
in interface org.springframework.context.SmartLifecycle
public final int getPhase()
getPhase
in interface org.springframework.context.Phased
public final boolean isRunning()
isRunning
in interface org.springframework.context.Lifecycle
public final void start()
start
in interface org.springframework.context.Lifecycle
public final void stop()
stop
in interface org.springframework.context.Lifecycle
public final void stop(java.lang.Runnable callback)
stop
in interface org.springframework.context.SmartLifecycle
protected abstract void doStart()
lifecycleLock
.protected abstract void doStop()
lifecycleLock
.