public abstract class AbstractDiscoveryLifecycle extends Object implements DiscoveryLifecycle, org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener<org.springframework.boot.context.embedded.EmbeddedServletContainerInitializedEvent>
| Constructor and Description |
|---|
AbstractDiscoveryLifecycle() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
deregister()
De-register the local service with the DiscoveryClient
|
protected void |
deregisterManagement()
De-register the local management service with the DiscoveryClient
|
void |
destroy() |
protected String |
getAppName() |
protected abstract Object |
getConfiguration() |
protected abstract int |
getConfiguredPort() |
protected org.springframework.context.ApplicationContext |
getContext() |
protected org.springframework.core.env.Environment |
getEnvironment() |
protected Integer |
getManagementPort() |
protected String |
getManagementServiceId() |
protected String |
getManagementServiceName() |
int |
getOrder() |
int |
getPhase() |
protected AtomicInteger |
getPort() |
boolean |
isAutoStartup() |
protected abstract boolean |
isEnabled() |
boolean |
isRunning() |
void |
onApplicationEvent(org.springframework.boot.context.embedded.EmbeddedServletContainerInitializedEvent event) |
protected abstract void |
register()
Register the local service with the DiscoveryClient
|
protected void |
registerManagement()
Register the local management service with the DiscoveryClient
|
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
protected abstract void |
setConfiguredPort(int port) |
protected boolean |
shouldRegisterManagement() |
void |
start() |
void |
stop() |
void |
stop(Runnable callback) |
protected org.springframework.context.ApplicationContext getContext()
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionprotected org.springframework.core.env.Environment getEnvironment()
protected AtomicInteger getPort()
public boolean isAutoStartup()
isAutoStartup in interface org.springframework.context.SmartLifecyclepublic void stop(Runnable callback)
stop in interface org.springframework.context.SmartLifecyclepublic void start()
start in interface org.springframework.context.Lifecycleprotected abstract int getConfiguredPort()
protected abstract void setConfiguredPort(int port)
protected boolean shouldRegisterManagement()
protected abstract Object getConfiguration()
protected abstract void register()
protected void registerManagement()
protected abstract void deregister()
protected void deregisterManagement()
protected abstract boolean isEnabled()
protected String getManagementServiceId()
protected String getManagementServiceName()
protected Integer getManagementPort()
protected String getAppName()
public void stop()
stop in interface org.springframework.context.Lifecycle@PreDestroy public void destroy()
public boolean isRunning()
isRunning in interface org.springframework.context.Lifecyclepublic int getOrder()
getOrder in interface org.springframework.core.Orderedpublic int getPhase()
getPhase in interface org.springframework.context.Phasedpublic void onApplicationEvent(org.springframework.boot.context.embedded.EmbeddedServletContainerInitializedEvent event)
onApplicationEvent in interface org.springframework.context.ApplicationListener<org.springframework.boot.context.embedded.EmbeddedServletContainerInitializedEvent>Copyright © 2017 Pivotal Software, Inc.. All rights reserved.