Class AbstractSmartLifecycle
java.lang.Object
org.springframework.data.gemfire.config.support.AbstractSmartLifecycle
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
,org.springframework.context.Lifecycle
,org.springframework.context.Phased
,org.springframework.context.SmartLifecycle
- Direct Known Subclasses:
ClusterConfigurationConfiguration.ClusterSchemaObjectInitializer
public abstract class AbstractSmartLifecycle
extends Object
implements org.springframework.context.ApplicationContextAware, org.springframework.context.SmartLifecycle
AbstractSmartLifecycle
is an abstract base class implementing the SpringSmartLifecycle
interface
to support custom implementations.- Since:
- 2.0.2
- See Also:
-
SmartLifecycle
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Optional<org.springframework.context.ApplicationContext>
int
getPhase()
boolean
boolean
protected org.springframework.context.ApplicationContext
void
setApplicationContext
(org.springframework.context.ApplicationContext applicationContext) protected void
setRunning
(boolean running) void
start()
void
stop()
void
-
Field Details
-
DEFAULT_PHASE
protected static final int DEFAULT_PHASE- See Also:
-
-
Constructor Details
-
AbstractSmartLifecycle
public AbstractSmartLifecycle()
-
-
Method Details
-
isAutoStartup
public boolean isAutoStartup()- Specified by:
isAutoStartup
in interfaceorg.springframework.context.SmartLifecycle
-
isRunning
public boolean isRunning()- Specified by:
isRunning
in interfaceorg.springframework.context.Lifecycle
-
setRunning
protected void setRunning(boolean running) -
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException
-
getApplicationContext
-
requireApplicationContext
protected org.springframework.context.ApplicationContext requireApplicationContext() -
getPhase
public int getPhase()- Specified by:
getPhase
in interfaceorg.springframework.context.Phased
- Specified by:
getPhase
in interfaceorg.springframework.context.SmartLifecycle
-
start
public void start()- Specified by:
start
in interfaceorg.springframework.context.Lifecycle
-
stop
public void stop()- Specified by:
stop
in interfaceorg.springframework.context.Lifecycle
-
stop
- Specified by:
stop
in interfaceorg.springframework.context.SmartLifecycle
-