Class AbstractServiceRegistrationEndpoint
- java.lang.Object
-
- io.microsphere.spring.cloud.client.service.registry.endpoint.AbstractServiceRegistrationEndpoint
-
- All Implemented Interfaces:
java.util.EventListener,org.springframework.beans.factory.SmartInitializingSingleton,org.springframework.context.ApplicationListener<org.springframework.boot.web.context.WebServerInitializedEvent>
- Direct Known Subclasses:
ServiceDeregistrationEndpoint,ServiceRegistrationEndpoint
public abstract class AbstractServiceRegistrationEndpoint extends java.lang.Object implements org.springframework.beans.factory.SmartInitializingSingleton, org.springframework.context.ApplicationListener<org.springframework.boot.web.context.WebServerInitializedEvent>Abstract Endpoint for Service Registration- Since:
- 1.0.0
- Author:
- Mercy
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringapplicationNameprotected io.microsphere.logging.Loggerloggerprotected intportprotected org.springframework.cloud.client.serviceregistry.Registrationregistrationprotected static booleanrunningprotected org.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistrationserviceRegistrationprotected org.springframework.cloud.client.serviceregistry.ServiceRegistryserviceRegistry
-
Constructor Summary
Constructors Constructor Description AbstractServiceRegistrationEndpoint()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterSingletonsInstantiated()protected booleanisRunning()voidonApplicationEvent(org.springframework.boot.web.context.WebServerInitializedEvent event)voidsetRunning(boolean running)
-
-
-
Field Detail
-
logger
protected final io.microsphere.logging.Logger logger
-
applicationName
@Value("${spring.application.name}") protected java.lang.String applicationName
-
registration
protected org.springframework.cloud.client.serviceregistry.Registration registration
-
serviceRegistry
protected org.springframework.cloud.client.serviceregistry.ServiceRegistry serviceRegistry
-
serviceRegistration
protected org.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration serviceRegistration
-
port
protected int port
-
running
protected static boolean running
-
-
Method Detail
-
afterSingletonsInstantiated
public void afterSingletonsInstantiated()
- Specified by:
afterSingletonsInstantiatedin interfaceorg.springframework.beans.factory.SmartInitializingSingleton
-
onApplicationEvent
public void onApplicationEvent(org.springframework.boot.web.context.WebServerInitializedEvent event)
- Specified by:
onApplicationEventin interfaceorg.springframework.context.ApplicationListener<org.springframework.boot.web.context.WebServerInitializedEvent>
-
isRunning
protected boolean isRunning()
-
setRunning
public void setRunning(boolean running)
-
-