Eureka1RegistrationRequestHandler(Eureka1RegistryProxy registryProxy, EurekaHttpServer httpServer) { this.registryProxy = registryProxy; httpServer.connectHttpEndpoint(ROOT_PATH, this); }
public int getHttpServerPort() { // Since server might be started on the ephemeral port, we need to get it directly from RxNetty server return injector.getInstance(EurekaHttpServer.class).serverPort(); }
@Inject public HealthConnectionHandler(final EurekaHealthStatusAggregatorImpl aggregatedHealth, EurekaHttpServer httpServer) { updateObservable = aggregatedHealth.components() .flatMap(new Func1<List<HealthStatusProvider<?>>, Observable<HealthStatusUpdate<?>>>() { @Override public Observable<HealthStatusUpdate<?>> call(List<HealthStatusProvider<?>> healthStatusProviders) { List<Observable<HealthStatusUpdate<?>>> updatesObservables = new ArrayList<>(); for (HealthStatusProvider<?> provider : healthStatusProviders) { Observable statusUpdateObservable = provider.healthStatus(); updatesObservables.add(statusUpdateObservable); } Observable aggregatedObservable = aggregatedHealth.healthStatus(); updatesObservables.add(aggregatedObservable); return Observable.merge(updatesObservables); } }); httpServer.connectWebSocketEndpoint("/health", this); }
@Override public Observable<Void> call(HealthStatusUpdate<?> healthStatusUpdate) { return connection.writeAndFlush(new TextWebSocketFrame(format(healthStatusUpdate))); } });
@Inject public Eureka1RedirectRequestHandler(ExtensionContext context, EurekaHttpServer httpServer) { this.context = context; httpServer.connectHttpEndpoint(ROOT_PATH, this); }
@Override public InstanceInfo.Builder call(HashSet<ServicePort> ports) { ports.add(new ServicePort(Names.EUREKA_HTTP, httpServer.serverPort(), false)); ports.add(new ServicePort(Names.REGISTRATION, registrationServer.serverPort(), false)); ports.add(new ServicePort(Names.REPLICATION, replicationServer.serverPort(), false)); ports.add(new ServicePort(Names.DISCOVERY, discoveryServer.serverPort(), false)); return new InstanceInfo.Builder().withPorts(ports); } })
@Inject public Eureka1RootRequestHandler(EurekaHttpServer httpServer, Eureka1RegistrationRequestHandler registrationRequestHandler, Eureka1QueryRequestHandler queryRequestHandler) { this.registrationRequestHandler = registrationRequestHandler; this.queryRequestHandler = queryRequestHandler; httpServer.connectHttpEndpoint(ROOT_PATH, this); }
@Inject public WriteServerRootResource(EurekaHttpServer httpServer) { httpServer.connectHttpEndpoint("/eureka2", this); }