KuduClient(WebAppBase webAppBase) { if (webAppBase.defaultHostName() == null) { throw new UnsupportedOperationException("Cannot initialize kudu client before web app is created"); } String host = webAppBase.defaultHostName().toLowerCase() .replace("http://", "") .replace("https://", ""); String[] parts = host.split("\\.", 2); host = Joiner.on('.').join(parts[0], "scm", parts[1]); service = webAppBase.manager().restClient().newBuilder() .withBaseUrl("https://" + host) .withConnectionTimeout(3, TimeUnit.MINUTES) .withReadTimeout(3, TimeUnit.MINUTES) .build() .retrofit().create(KuduService.class); }
.withCredentials(credentials) .withLogLevel(LogLevel.NONE) .withReadTimeout(3, TimeUnit.MINUTES) .withNetworkInterceptor(new LoggingInterceptor(LogLevel.BODY_AND_HEADERS)); if (!interceptorManager.isNoneMode()) {
@SuppressWarnings("unchecked") @Override public T withReadTimeout(long timeout, TimeUnit unit) { this.restClientBuilder = restClientBuilder.withReadTimeout(timeout, unit); return (T) this; }
@SuppressWarnings("unchecked") @Override public T withReadTimeout(long timeout, TimeUnit unit) { this.restClientBuilder = restClientBuilder.withReadTimeout(timeout, unit); return (T) this; }
@SuppressWarnings("unchecked") @Override public T withReadTimeout(long timeout, TimeUnit unit) { this.restClientBuilder = restClientBuilder.withReadTimeout(timeout, unit); return (T) this; }