@Test public void portDefaultSetting() throws Exception { URI origUri = URI.create("niws: URI relUri = URI.create("/foo"); ClientConfig cfg = new ClientConfig(archaius, "port-default", "vip", origUri, relUri, null); InstanceInfo info = InstanceInfo.Builder.newBuilder() .setAppName("foo") .setPort(1) .build(); Server server = EurekaServerRegistry.toServer(cfg, info); Assert.assertEquals(server.port(), 1); }
static IpcLogEntry create(HttpClientRequest<ByteBuf> req) { IpcLogEntry entry = IPC_LOGGER.createClientEntry() .withOwner("RxHttp") .withHttpMethod(req.getMethod().name()) .withUri(URI.create(req.getUri())); for (Map.Entry<String, String> h : req.getHeaders().entries()) { entry.addRequestHeader(h.getKey(), h.getValue()); } return entry; }
RxHttp implements AutoCloseable { static IpcLogEntry create(HttpClientRequest<ByteBuf> req) { IpcLogEntry entry = IPC_LOGGER.createClientEntry() .withOwner("RxHttp") .withHttpMethod(req.getMethod().name()) .withUri(URI.create(req.getUri())); for (Map.Entry<String, String> h : req.getHeaders().entries()) { entry.addRequestHeader(h.getKey(), h.getValue()); } return entry; } }
RxHttp implements AutoCloseable { static IpcLogEntry create(HttpClientRequest<ByteBuf> req) { IpcLogEntry entry = IPC_LOGGER.createClientEntry() .withOwner("RxHttp") .withHttpMethod(req.getMethod().name()) .withUri(URI.create(req.getUri())); for (Map.Entry<String, String> h : req.getHeaders().entries()) { entry.addRequestHeader(h.getKey(), h.getValue()); } return entry; } @Inject  RxHttp(Config config, ServerRegistry serverRegistry); }
RxHttp implements AutoCloseable { static IpcLogEntry create(HttpClientRequest<ByteBuf> req) { IpcLogEntry entry = IPC_LOGGER.createClientEntry() .withOwner("RxHttp") .withHttpMethod(req.getMethod().name()) .withUri(URI.create(req.getUri())); for (Map.Entry<String, String> h : req.getHeaders().entries()) { entry.addRequestHeader(h.getKey(), h.getValue()); } return entry; } @Inject  RxHttp(Config config, ServerRegistry serverRegistry); @Deprecated void start(); @Deprecated void stop(); @Override void close(); Observable<HttpClientResponse<ByteBuf>> get(String uri); Observable<HttpClientResponse<ByteBuf>> get(URI uri); Observable<HttpClientResponse<ByteBuf>> getJson(String uri); Observable<HttpClientResponse<ByteBuf>> getJson(URI uri); Observable<HttpClientResponse<ByteBuf>> post(URI uri, String contentType, byte[] entity); Observable<HttpClientResponse<ByteBuf>> postJson(URI uri, byte[] entity); Observable<HttpClientResponse<ByteBuf>> postJson(URI uri, String entity); Observable<HttpClientResponse<ByteBuf>> postForm(URI uri); Observable<HttpClientResponse<ByteBuf>> put(URI uri, String contentType, byte[] entity); Observable<HttpClientResponse<ByteBuf>> putJson(URI uri, byte[] entity); Observable<HttpClientResponse<ByteBuf>> putJson(URI uri, String entity); Observable<HttpClientResponse<ByteBuf>> delete(String uri); Observable<HttpClientResponse<ByteBuf>> delete(URI uri); Observable<HttpClientResponse<ByteBuf>> deleteJson(String uri); Observable<HttpClientResponse<ByteBuf>> deleteJson(URI uri); Observable<HttpClientResponse<ByteBuf>> submit(HttpClientRequest<ByteBuf> req); Observable<HttpClientResponse<ByteBuf>> submit(HttpClientRequest<ByteBuf> req, String entity); Observable<HttpClientResponse<ByteBuf>> submit(HttpClientRequest<ByteBuf> req, byte[] entity); Observable<HttpClientResponse<ByteBuf>> submit(HttpClientRequest<ByteBuf> req, byte[] entity, SSLContext context); }
RxHttp implements AutoCloseable { static IpcLogEntry create(HttpClientRequest<ByteBuf> req) { IpcLogEntry entry = IPC_LOGGER.createClientEntry() .withOwner("RxHttp") .withHttpMethod(req.getMethod().name()) .withUri(URI.create(req.getUri())); for (Map.Entry<String, String> h : req.getHeaders().entries()) { entry.addRequestHeader(h.getKey(), h.getValue()); } return entry; } @Inject  RxHttp(Config config, ServerRegistry serverRegistry); @Deprecated void start(); @Deprecated void stop(); @Override void close(); Observable<HttpClientResponse<ByteBuf>> get(String uri); Observable<HttpClientResponse<ByteBuf>> get(URI uri); Observable<HttpClientResponse<ByteBuf>> getJson(String uri); Observable<HttpClientResponse<ByteBuf>> getJson(URI uri); Observable<HttpClientResponse<ByteBuf>> post(URI uri, String contentType, byte[] entity); Observable<HttpClientResponse<ByteBuf>> postJson(URI uri, byte[] entity); Observable<HttpClientResponse<ByteBuf>> postJson(URI uri, String entity); Observable<HttpClientResponse<ByteBuf>> postForm(URI uri); Observable<HttpClientResponse<ByteBuf>> put(URI uri, String contentType, byte[] entity); Observable<HttpClientResponse<ByteBuf>> putJson(URI uri, byte[] entity); Observable<HttpClientResponse<ByteBuf>> putJson(URI uri, String entity); Observable<HttpClientResponse<ByteBuf>> delete(String uri); Observable<HttpClientResponse<ByteBuf>> delete(URI uri); Observable<HttpClientResponse<ByteBuf>> deleteJson(String uri); Observable<HttpClientResponse<ByteBuf>> deleteJson(URI uri); Observable<HttpClientResponse<ByteBuf>> submit(HttpClientRequest<ByteBuf> req); Observable<HttpClientResponse<ByteBuf>> submit(HttpClientRequest<ByteBuf> req, String entity); Observable<HttpClientResponse<ByteBuf>> submit(HttpClientRequest<ByteBuf> req, byte[] entity); Observable<HttpClientResponse<ByteBuf>> submit(HttpClientRequest<ByteBuf> req, byte[] entity, SSLContext context);  }