Class 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 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
    • Constructor Detail

      • AbstractServiceRegistrationEndpoint

        public AbstractServiceRegistrationEndpoint()
    • Method Detail

      • 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)