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.ApplicationContextAware
org.springframework.beans.BeansException
protected org.springframework.core.env.Environment getEnvironment()
protected AtomicInteger getPort()
public boolean isAutoStartup()
isAutoStartup
in interface org.springframework.context.SmartLifecycle
public void stop(Runnable callback)
stop
in interface org.springframework.context.SmartLifecycle
public void start()
start
in interface org.springframework.context.Lifecycle
protected 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.Lifecycle
public int getOrder()
getOrder
in interface org.springframework.core.Ordered
public int getPhase()
getPhase
in interface org.springframework.context.Phased
public void onApplicationEvent(org.springframework.boot.context.embedded.EmbeddedServletContainerInitializedEvent event)
onApplicationEvent
in interface org.springframework.context.ApplicationListener<org.springframework.boot.context.embedded.EmbeddedServletContainerInitializedEvent>
Copyright © 2016 Pivotal Software, Inc.. All rights reserved.