public abstract class AutoRegistration extends Object implements ApplicationEventListener<AbstractServiceInstanceEvent>
Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
LOG |
Modifier | Constructor and Description |
---|---|
protected |
AutoRegistration(RegistrationConfiguration registrationConfiguration)
Initialize given configurations.
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
deregister(ServiceInstance instance)
Deregister the
ServiceInstance from service discovery services. |
void |
onApplicationEvent(AbstractServiceInstanceEvent event)
Handle an application event.
|
protected abstract void |
pulsate(ServiceInstance instance,
HealthStatus status)
This method will be invoked each time a
HeartbeatEvent occurs allowing the implementation to perform any necessary callbacks to the service discovery server. |
protected abstract void |
register(ServiceInstance instance)
Register the
ServiceInstance with discovery services. |
protected void |
validateApplicationName(String name)
Validate the given application name.
|
protected void |
validateName(String name,
String typeDescription)
Validate the given application name.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
supports
protected AutoRegistration(RegistrationConfiguration registrationConfiguration)
registrationConfiguration
- Common configurations for registrationpublic void onApplicationEvent(AbstractServiceInstanceEvent event)
ApplicationEventListener
onApplicationEvent
in interface ApplicationEventListener<AbstractServiceInstanceEvent>
event
- the event to respond toprotected abstract void pulsate(ServiceInstance instance, HealthStatus status)
HeartbeatEvent
occurs allowing the implementation to perform any necessary callbacks to the service discovery server.instance
- The instancestatus
- The HealthStatus
protected abstract void deregister(ServiceInstance instance)
ServiceInstance
from service discovery services.instance
- The ServiceInstance
protected abstract void register(ServiceInstance instance)
ServiceInstance
with discovery services.instance
- The ServiceInstance
protected void validateApplicationName(String name)
name
- The application name