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 Details

    • logger

      protected final io.microsphere.logging.Logger logger
    • applicationName

      @Value("${spring.application.name}") protected 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
  • Constructor Details

    • AbstractServiceRegistrationEndpoint

      public AbstractServiceRegistrationEndpoint()
  • Method Details

    • afterSingletonsInstantiated

      public void afterSingletonsInstantiated()
      Specified by:
      afterSingletonsInstantiated in interface org.springframework.beans.factory.SmartInitializingSingleton
    • onApplicationEvent

      public void onApplicationEvent(org.springframework.boot.web.context.WebServerInitializedEvent event)
      Specified by:
      onApplicationEvent in interface org.springframework.context.ApplicationListener<org.springframework.boot.web.context.WebServerInitializedEvent>
    • isRunning

      protected boolean isRunning()
    • setRunning

      public void setRunning(boolean running)