Class AbstractServiceRegistrationEndpoint
java.lang.Object
io.microsphere.spring.cloud.client.service.registry.endpoint.AbstractServiceRegistrationEndpoint
- All Implemented Interfaces:
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 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
FieldsModifier and TypeFieldDescriptionprotected Stringprotected final io.microsphere.logging.Loggerprotected intprotected org.springframework.cloud.client.serviceregistry.Registrationprotected static booleanprotected org.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistrationprotected org.springframework.cloud.client.serviceregistry.ServiceRegistry -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected booleanvoidonApplicationEvent(org.springframework.boot.web.context.WebServerInitializedEvent event) voidsetRunning(boolean running) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.context.ApplicationListener
supportsAsyncExecution
-
Field Details
-
logger
protected final io.microsphere.logging.Logger logger -
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
-
-
Constructor Details
-
AbstractServiceRegistrationEndpoint
public AbstractServiceRegistrationEndpoint()
-
-
Method Details
-
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)
-