@Override public WebSocketStream websocketStream(RequestOptions options, MultiMap headers, WebsocketVersion version, String subProtocols) { return new WebSocketStream(options.getPort(), options.getHost(), options.getURI(), headers, version, subProtocols, options.isSsl()); }
@Override public HttpClientRequest request(HttpMethod method, RequestOptions options) { return createRequest(method, options.getHost(), options.getPort(), options.isSsl(), options.getURI(), null); }
private HttpClient requestNow(HttpMethod method, RequestOptions options, Handler<AsyncResult<HttpClientResponse>> responseHandler) { createRequest(method, options.getHost(), options.getPort(), options.isSsl(), options.getURI(), null).handler(responseHandler).end(); return this; }
@Override public WebSocketStream websocketStream(RequestOptions options, MultiMap headers, WebsocketVersion version, String subProtocols) { return new WebSocketStream(options.getPort(), options.getHost(), options.getURI(), headers, version, subProtocols, options.isSsl()); }
@Override public HttpClientRequest request(HttpMethod method, RequestOptions options) { return createRequest(method, options.getHost(), options.getPort(), options.isSsl(), options.getURI(), null); }
private HttpClient requestNow(HttpMethod method, RequestOptions options, Handler<HttpClientResponse> responseHandler) { createRequest(method, options.getHost(), options.getPort(), options.isSsl(), options.getURI(), null).handler(responseHandler).end(); return this; }
private String getUrl(RequestOptions httpRequestData) { return String.format("%s://%s:%d%s ", httpRequestData.isSsl() ? "https" : "http", httpRequestData.getHost(), httpRequestData.getPort(), httpRequestData.getURI() ); }
private String getUrl(RequestOptions httpRequestData) { return String.format("%s://%s:%d%s ", httpRequestData.isSsl() ? "https" : "http", httpRequestData.getHost(), httpRequestData.getPort(), httpRequestData.getURI() ); }
static RequestOptions getOptions(final Record record, final String normalizedUri) { final RequestOptions options = new RequestOptions(); options.setURI(normalizedUri); // Extract host / port final JsonObject location = record.getLocation(); options.setHost(location.getString("host")); options.setPort(location.getInteger("port")); LOGGER.info("[ ZERO ] Found remote host: {0}, port: {1}, uri: {2}", options.getHost(), String.valueOf(options.getPort()), options.getURI()); return options; } }
static RequestOptions getOptions(final Record record, final String normalizedUri) { final RequestOptions options = new RequestOptions(); options.setURI(normalizedUri); // Extract host / port final JsonObject location = record.getLocation(); options.setHost(location.getString("host")); options.setPort(location.getInteger("port")); LOGGER.info("[ ZERO ] Found remote host: {0}, port: {1}, uri: {2}", options.getHost(), String.valueOf(options.getPort()), options.getURI()); return options; } }