Browse Source

add InstanceRegisteredEvent

pull/5/head
Spencer Gibb 10 years ago
parent
commit
037ee52111
  1. 3
      src/main/java/org/springframework/cloud/client/discovery/AbstractDiscoveryLifecycle.java

3
src/main/java/org/springframework/cloud/client/discovery/AbstractDiscoveryLifecycle.java

@ -45,9 +45,12 @@ public abstract class AbstractDiscoveryLifecycle implements DiscoveryLifecycle, @@ -45,9 +45,12 @@ public abstract class AbstractDiscoveryLifecycle implements DiscoveryLifecycle,
if (ManagementServerPortUtils.isDifferent(context)) {
registerManagement();
}
context.publishEvent(new InstanceRegisteredEvent<>(this, getConfiguration()));
running = true;
}
protected abstract Object getConfiguration();
protected abstract void register();
protected void registerManagement() {}

Loading…
Cancel
Save