private String serviceId(Registration registration) { return registration.getName() + ":" + registration.getAddress() + ":" + registration.getPort(); } }
public synchronized void unregister(Registration registration) { boolean removed = this.registrations.removeIf(e -> e.equals(registration)); if (removed) { fireListeners(); } }
public synchronized void unregisterAll(String sourceKey, String name) { boolean removed = this.registrations.removeIf(e -> e.getSourceKey().equals(sourceKey) && e.getName().equals(name)); if (removed) { fireListeners(); } }
@Override public List<Server> getUpdatedListOfServers() { String tag = ( this.isSecure ? "https" : "http" ); return TopologyManager.INSTANCE.registrationsForService(this.appName, tag) .stream() .map( reg-> new Server( reg.getAddress(), reg.getPort() )) .collect(Collectors.toList()); } }
public synchronized void unregisterAll(String sourceKey) { boolean removed = this.registrations.removeIf(e -> e.getSourceKey().equals(sourceKey)); if (removed) { fireListeners(); } }
void register(Registration registration) { this.topologyManagerInjector.getValue().register(registration); }
void unregister(Registration registration) { this.topologyManagerInjector.getValue().unregister(registration); }
public synchronized void register(Registration registration) { if (!this.registrations.contains(registration)) { this.registrations.add(registration); fireListeners(); } }
@Override public void stop(StopContext stopContext) { this.topologyConnectorInjector.getValue().unadvertise(this.name, this.socketBindingInjector.getValue() ); }
@Override public void start(StartContext startContext) throws StartException { this.topologyConnectorInjector.getValue().advertise(this.name, this.socketBindingInjector.getValue(), this.tags ); }
public synchronized void unregisterAll(String sourceKey, String name) { boolean removed = this.registrations.removeIf(e -> e.getSourceKey().equals(sourceKey) && e.getName().equals(name)); if (removed) { fireListeners(); } }
public synchronized void unregister(Registration registration) { boolean removed = this.registrations.removeIf(e -> e.equals(registration)); if (removed) { fireListeners(); } }
public synchronized void unregisterAll(String sourceKey) { boolean removed = this.registrations.removeIf(e -> e.getSourceKey().equals(sourceKey)); if (removed) { fireListeners(); } }
public synchronized void register(Registration registration) { if (!this.registrations.contains(registration)) { this.registrations.add(registration); fireListeners(); } }
@Override public void stop(StopContext stopContext) { this.topologyConnectorInjector.getValue().unadvertise(this.name, this.socketBindingInjector.getValue()); }
@Override public void start(StartContext startContext) throws StartException { this.topologyConnectorInjector.getValue().advertise(this.name, this.socketBindingInjector.getValue(), this.tags); }
public synchronized void unregisterAll(String sourceKey, String name) { boolean removed = this.registrations.removeIf(e -> e.getSourceKey().equals(sourceKey) && e.getName().equals(name)); if (removed) { fireListeners(); } }
public synchronized void unregister(Registration registration) { boolean removed = this.registrations.removeIf(e -> e.equals(registration)); if (removed) { fireListeners(); } }
public synchronized void unregisterAll(String sourceKey) { boolean removed = this.registrations.removeIf(e -> e.getSourceKey().equals(sourceKey)); if (removed) { fireListeners(); } }
public synchronized void register(Registration registration) { if (!this.registrations.contains(registration)) { this.registrations.add(registration); fireListeners(); } }