Class DiscoveryServerStartedEventPublisher

java.lang.Object
io.micronaut.servlet.http.server.DiscoveryServerStartedEventPublisher
All Implemented Interfaces:
io.micronaut.context.event.ApplicationEventListener<io.micronaut.runtime.server.event.ServerStartupEvent>, EventListener

@Requires(classes={io.micronaut.discovery.ServiceInstance.class,io.micronaut.discovery.event.ServiceReadyEvent.class}) @Requires(beans={io.micronaut.runtime.ApplicationConfiguration.class,io.micronaut.runtime.server.EmbeddedServer.class,io.micronaut.context.event.ApplicationEventPublisher.class}) @Singleton public class DiscoveryServerStartedEventPublisher extends Object implements io.micronaut.context.event.ApplicationEventListener<io.micronaut.runtime.server.event.ServerStartupEvent>
Publishes a ServiceReadyEvent when the server starts if there is an ApplicationConfiguration.getName() set.
  • Constructor Summary

    Constructors
    Constructor
    Description
    DiscoveryServerStartedEventPublisher(io.micronaut.runtime.ApplicationConfiguration applicationConfiguration, io.micronaut.runtime.server.EmbeddedServer embeddedServer, io.micronaut.context.event.ApplicationEventPublisher<io.micronaut.discovery.event.ServiceReadyEvent> applicationEventPublisher)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onApplicationEvent(io.micronaut.runtime.server.event.ServerStartupEvent event)
     

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface io.micronaut.context.event.ApplicationEventListener

    supports
  • Constructor Details

    • DiscoveryServerStartedEventPublisher

      public DiscoveryServerStartedEventPublisher(io.micronaut.runtime.ApplicationConfiguration applicationConfiguration, io.micronaut.runtime.server.EmbeddedServer embeddedServer, io.micronaut.context.event.ApplicationEventPublisher<io.micronaut.discovery.event.ServiceReadyEvent> applicationEventPublisher)
  • Method Details

    • onApplicationEvent

      public void onApplicationEvent(io.micronaut.runtime.server.event.ServerStartupEvent event)
      Specified by:
      onApplicationEvent in interface io.micronaut.context.event.ApplicationEventListener<io.micronaut.runtime.server.event.ServerStartupEvent>