public abstract class AbstractSmartLifecycle extends Object implements ApplicationContextAware, SmartLifecycle
AbstractSmartLifecycle is an abstract base class implementing the SpringSmartLifecycle interface
to support custom implementations.SmartLifecycle| Modifier and Type | Field and Description |
|---|---|
protected static int |
DEFAULT_PHASE |
| Constructor and Description |
|---|
AbstractSmartLifecycle() |
| Modifier and Type | Method and Description |
|---|---|
protected Optional<ApplicationContext> |
getApplicationContext() |
int |
getPhase() |
boolean |
isAutoStartup() |
boolean |
isRunning() |
protected ApplicationContext |
requireApplicationContext() |
void |
setApplicationContext(ApplicationContext applicationContext) |
protected void |
setRunning(boolean running) |
void |
start() |
void |
stop() |
void |
stop(Runnable callback) |
protected static final int DEFAULT_PHASE
public boolean isAutoStartup()
isAutoStartup in interface SmartLifecycleprotected void setRunning(boolean running)
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException
setApplicationContext in interface ApplicationContextAwareBeansExceptionprotected Optional<ApplicationContext> getApplicationContext()
protected ApplicationContext requireApplicationContext()
public int getPhase()
getPhase in interface PhasedgetPhase in interface SmartLifecyclepublic void stop(Runnable callback)
stop in interface SmartLifecycleCopyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.