Class EurekaAutoServiceRegistration

java.lang.Object
org.springframework.cloud.netflix.eureka.serviceregistry.EurekaAutoServiceRegistration
All Implemented Interfaces:
EventListener, org.springframework.cloud.client.serviceregistry.AutoServiceRegistration, org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>, org.springframework.context.event.SmartApplicationListener, org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle, org.springframework.core.Ordered

public class EurekaAutoServiceRegistration extends Object implements org.springframework.cloud.client.serviceregistry.AutoServiceRegistration, org.springframework.context.SmartLifecycle, org.springframework.core.Ordered, org.springframework.context.event.SmartApplicationListener
Provides an implementation of AutoServiceRegistration for registering service instances in Eureka.
Author:
Dave Syer, Spencer Gibb, Jon Schneider, Jakub Narloch, Raiyan Raiyan, Olga Maciaszek-Sharma
  • Field Summary

    Fields inherited from interface org.springframework.core.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE

    Fields inherited from interface org.springframework.context.SmartLifecycle

    DEFAULT_PHASE
  • Constructor Summary

    Constructors
    Constructor
    Description
    EurekaAutoServiceRegistration(org.springframework.context.ApplicationContext context, EurekaServiceRegistry serviceRegistry, EurekaRegistration registration)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    int
     
    boolean
     
    boolean
     
    void
    onApplicationEvent(org.springframework.boot.web.server.context.WebServerInitializedEvent event)
     
    void
    onApplicationEvent(org.springframework.context.ApplicationEvent event)
     
    void
    onApplicationEvent(org.springframework.context.event.ContextClosedEvent event)
     
    void
     
    void
     
    void
    stop(Runnable callback)
     
    boolean
    supportsEventType(Class<? extends org.springframework.context.ApplicationEvent> eventType)
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.springframework.context.ApplicationListener

    supportsAsyncExecution

    Methods inherited from interface org.springframework.context.event.SmartApplicationListener

    getListenerId, supportsSourceType

    Methods inherited from interface org.springframework.context.SmartLifecycle

    isPauseable
  • Constructor Details

    • EurekaAutoServiceRegistration

      public EurekaAutoServiceRegistration(org.springframework.context.ApplicationContext context, EurekaServiceRegistry serviceRegistry, EurekaRegistration registration)
  • Method Details

    • start

      public void start()
      Specified by:
      start in interface org.springframework.context.Lifecycle
    • stop

      public void stop()
      Specified by:
      stop in interface org.springframework.context.Lifecycle
    • isRunning

      public boolean isRunning()
      Specified by:
      isRunning in interface org.springframework.context.Lifecycle
    • getPhase

      public int getPhase()
      Specified by:
      getPhase in interface org.springframework.context.Phased
      Specified by:
      getPhase in interface org.springframework.context.SmartLifecycle
    • isAutoStartup

      public boolean isAutoStartup()
      Specified by:
      isAutoStartup in interface org.springframework.context.SmartLifecycle
    • stop

      public void stop(Runnable callback)
      Specified by:
      stop in interface org.springframework.context.SmartLifecycle
    • getOrder

      public int getOrder()
      Specified by:
      getOrder in interface org.springframework.core.Ordered
      Specified by:
      getOrder in interface org.springframework.context.event.SmartApplicationListener
    • supportsEventType

      public boolean supportsEventType(Class<? extends org.springframework.context.ApplicationEvent> eventType)
      Specified by:
      supportsEventType in interface org.springframework.context.event.SmartApplicationListener
    • onApplicationEvent

      public void onApplicationEvent(org.springframework.context.ApplicationEvent event)
      Specified by:
      onApplicationEvent in interface org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>
    • onApplicationEvent

      public void onApplicationEvent(org.springframework.boot.web.server.context.WebServerInitializedEvent event)
    • onApplicationEvent

      public void onApplicationEvent(org.springframework.context.event.ContextClosedEvent event)