Class DiscoveryServiceAutoRegistration

java.lang.Object
io.micronaut.discovery.registration.AutoRegistration
io.micronaut.discovery.client.registration.DiscoveryServiceAutoRegistration
All Implemented Interfaces:
io.micronaut.context.event.ApplicationEventListener<io.micronaut.discovery.event.AbstractServiceInstanceEvent>, EventListener
Direct Known Subclasses:
ConsulAutoRegistration, EurekaAutoRegistration

public abstract class DiscoveryServiceAutoRegistration extends io.micronaut.discovery.registration.AutoRegistration
Abstract class for AutoRegistration with discovery services.
Since:
1.0
Author:
Graeme Rocher
  • Field Summary

    Fields inherited from class io.micronaut.discovery.registration.AutoRegistration

    LOG, registered
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    DiscoveryServiceAutoRegistration(io.micronaut.discovery.registration.RegistrationConfiguration registrationConfiguration)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected String
    getErrorMessage(Throwable e, String description)
     
    protected void
    performDeregistration(String discoveryService, io.micronaut.discovery.registration.RegistrationConfiguration registration, org.reactivestreams.Publisher<io.micronaut.http.HttpStatus> deregisterPublisher, String applicationName)
    De-register a service from the discovery client.
    protected void
    performRegistration(String discoveryService, io.micronaut.discovery.registration.RegistrationConfiguration registration, io.micronaut.discovery.ServiceInstance instance, org.reactivestreams.Publisher<io.micronaut.http.HttpStatus> registrationObservable)
    Register a new service instance in the discovery service.

    Methods inherited from class io.micronaut.discovery.registration.AutoRegistration

    deregister, onApplicationEvent, pulsate, register, validateApplicationName, validateName

    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

    • DiscoveryServiceAutoRegistration

      protected DiscoveryServiceAutoRegistration(io.micronaut.discovery.registration.RegistrationConfiguration registrationConfiguration)
      Parameters:
      registrationConfiguration - The registration configuration
  • Method Details

    • performRegistration

      protected void performRegistration(String discoveryService, io.micronaut.discovery.registration.RegistrationConfiguration registration, io.micronaut.discovery.ServiceInstance instance, org.reactivestreams.Publisher<io.micronaut.http.HttpStatus> registrationObservable)
      Register a new service instance in the discovery service.
      Parameters:
      discoveryService - The discovery service
      registration - The registration configuration
      instance - The service instance
      registrationObservable - The registration observable
    • getErrorMessage

      protected String getErrorMessage(Throwable e, String description)
      Parameters:
      e - The throwable
      description - The error's description
      Returns:
      The error message
    • performDeregistration

      protected void performDeregistration(String discoveryService, io.micronaut.discovery.registration.RegistrationConfiguration registration, org.reactivestreams.Publisher<io.micronaut.http.HttpStatus> deregisterPublisher, String applicationName)
      De-register a service from the discovery client.
      Parameters:
      discoveryService - The discovery service
      registration - The registration configuration
      deregisterPublisher - The registration publisher
      applicationName - The application name to de-register