public abstract class AbstractDiscoveryLifecycle extends Object implements DiscoveryLifecycle, org.springframework.context.ApplicationContextAware
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 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() |
boolean |
isAutoStartup() |
protected abstract boolean |
isEnabled() |
boolean |
isRunning() |
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 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()
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 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
Copyright © 2015 Pivotal Software, Inc.. All rights reserved.