From b62085db6820b83f029d322523e3e2b83bddff8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20H=C3=BCbner?= Date: Tue, 26 Jul 2022 17:49:50 +0200 Subject: [PATCH] Version 0.5.1 --- CHANGELOG.md | 4 ++ VERSION | 2 +- pom.xml | 4 +- .../client/connection/AbstractAPIHandler.java | 54 +++++++++---------- 4 files changed, 34 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa57280..bb33fd4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# v0.5.1 + +Library update. Use arago java-project 0.4.2. + # v0.5.0 Refactorings diff --git a/VERSION b/VERSION index 8f0916f..4b9fcbe 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.5.0 +0.5.1 diff --git a/pom.xml b/pom.xml index 5bec28a..f72595a 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ co.arago.hiro.client hiro-client-java - 0.5.0 + 0.5.1 arago GmbH @@ -51,7 +51,7 @@ 11 11 - 0.4.0 + 0.4.2 3.0.1 diff --git a/src/main/java/co/arago/hiro/client/connection/AbstractAPIHandler.java b/src/main/java/co/arago/hiro/client/connection/AbstractAPIHandler.java index 06c61e8..87fedb5 100644 --- a/src/main/java/co/arago/hiro/client/connection/AbstractAPIHandler.java +++ b/src/main/java/co/arago/hiro/client/connection/AbstractAPIHandler.java @@ -183,7 +183,7 @@ public HttpClientHandler.ProxySpec getProxy() { * @param proxy Simple proxy with one address and port * @return {@link #self()} * @implNote Configuration option for an internal DefaultHttpClientHandler. Will be ignored if the - * {@link #httpClientHandler} is set directly via {@link #setHttpClientHandler(HttpClientHandler)}. + * {@link #httpClientHandler} is set directly via {@link #setHttpClientHandler(HttpClientHandler)}. */ @Override public T setProxy(HttpClientHandler.ProxySpec proxy) { @@ -200,7 +200,7 @@ public boolean isFollowRedirects() { * @param followRedirects Enable Redirect.NORMAL. Default is true. * @return {@link #self()} * @implNote Configuration option for an internal DefaultHttpClientHandler. Will be ignored if the - * {@link #httpClientHandler} is set directly via {@link #setHttpClientHandler(HttpClientHandler)}. + * {@link #httpClientHandler} is set directly via {@link #setHttpClientHandler(HttpClientHandler)}. */ @Override public T setFollowRedirects(boolean followRedirects) { @@ -217,7 +217,7 @@ public Long getConnectTimeout() { * @param connectTimeout Connect timeout in milliseconds. * @return {@link #self()} * @implNote Configuration option for an internal DefaultHttpClientHandler. Will be ignored if the - * {@link #httpClientHandler} is set directly via {@link #setHttpClientHandler(HttpClientHandler)}. + * {@link #httpClientHandler} is set directly via {@link #setHttpClientHandler(HttpClientHandler)}. */ @Override public T setConnectTimeout(Long connectTimeout) { @@ -236,7 +236,7 @@ public long getShutdownTimeout() { * to shut down properly. Default is 3000ms. * @return {@link #self()} * @implNote Configuration option for an internal DefaultHttpClientHandler. Will be ignored if the - * {@link #httpClientHandler} is set directly via {@link #setHttpClientHandler(HttpClientHandler)}. + * {@link #httpClientHandler} is set directly via {@link #setHttpClientHandler(HttpClientHandler)}. */ @Override public T setShutdownTimeout(long shutdownTimeout) { @@ -256,7 +256,7 @@ public Boolean getAcceptAllCerts() { * @param acceptAllCerts the toggle * @return {@link #self()} * @implNote Configuration option for an internal DefaultHttpClientHandler. Will be ignored if the - * {@link #httpClientHandler} is set directly via {@link #setHttpClientHandler(HttpClientHandler)}. + * {@link #httpClientHandler} is set directly via {@link #setHttpClientHandler(HttpClientHandler)}. */ @Override public T setAcceptAllCerts(Boolean acceptAllCerts) { @@ -273,7 +273,7 @@ public SSLContext getSslContext() { * @param sslContext The specific SSLContext to use. * @return {@link #self()} * @implNote Configuration option for an internal DefaultHttpClientHandler. Will be ignored if the - * {@link #httpClientHandler} is set directly via {@link #setHttpClientHandler(HttpClientHandler)}. + * {@link #httpClientHandler} is set directly via {@link #setHttpClientHandler(HttpClientHandler)}. * @see #setAcceptAllCerts(Boolean) */ @Override @@ -291,7 +291,7 @@ public SSLParameters getSslParameters() { * @param sslParameters The specific SSLParameters to use. * @return {@link #self()} * @implNote Configuration option for an internal DefaultHttpClientHandler. Will be ignored if the - * {@link #httpClientHandler} is set directly via {@link #setHttpClientHandler(HttpClientHandler)}. + * {@link #httpClientHandler} is set directly via {@link #setHttpClientHandler(HttpClientHandler)}. */ @Override public T setSslParameters(SSLParameters sslParameters) { @@ -311,11 +311,11 @@ public HttpClient getHttpClient() { * @param httpClient Instance of an HttpClient. * @return {@link #self()} * @implNote Configuration option for an internal DefaultHttpClientHandler. Will be ignored if the - * {@link #httpClientHandler} is set directly via {@link #setHttpClientHandler(HttpClientHandler)}. - *
- * Be aware, that any httpClient given via this method will set AutoClose to false and has to be - * closed externally, unless {@link #setHttpClientAutoClose(boolean)} is used. A call to - * {@link HttpClientHandler#close()} with AutoClose set to false will have no effect. + * {@link #httpClientHandler} is set directly via {@link #setHttpClientHandler(HttpClientHandler)}. + *
+ * Be aware, that any httpClient given via this method will set AutoClose to false and has to be + * closed externally, unless {@link #setHttpClientAutoClose(boolean)} is used. A call to + * {@link HttpClientHandler#close()} with AutoClose set to false will have no effect. */ @Override public T setHttpClient(HttpClient httpClient) { @@ -335,7 +335,7 @@ public CookieManager getCookieManager() { * @param cookieManager Instance of a CookieManager. * @return {@link #self()} * @implNote Configuration option for an internal DefaultHttpClientHandler. Will be ignored if the - * {@link #httpClientHandler} is set directly via {@link #setHttpClientHandler(HttpClientHandler)}. + * {@link #httpClientHandler} is set directly via {@link #setHttpClientHandler(HttpClientHandler)}. */ @Override public T setCookieManager(CookieManager cookieManager) { @@ -355,7 +355,7 @@ public int getMaxConnectionPool() { * @param maxConnectionPool Maximum size of the pool. Default is 8. * @return {@link #self()} * @implNote Configuration option for an internal DefaultHttpClientHandler. Will be ignored if the - * {@link #httpClientHandler} is set directly via {@link #setHttpClientHandler(HttpClientHandler)}. + * {@link #httpClientHandler} is set directly via {@link #setHttpClientHandler(HttpClientHandler)}. */ @Override public T setMaxConnectionPool(int maxConnectionPool) { @@ -374,7 +374,7 @@ public int getMaxBinaryLogLength() { * @param maxBinaryLogLength Size in bytes * @return {@link #self()} * @implNote Configuration option for an internal DefaultHttpClientHandler. Will be ignored if the - * {@link #httpClientHandler} is set directly via {@link #setHttpClientHandler(HttpClientHandler)}. + * {@link #httpClientHandler} is set directly via {@link #setHttpClientHandler(HttpClientHandler)}. */ @Override public T setMaxBinaryLogLength(int maxBinaryLogLength) { @@ -399,7 +399,7 @@ public Boolean getHttpClientAutoClose() { * @param httpClientAutoClose true: enable, false: disable. * @return {@link #self()} * @implNote Configuration option for an internal DefaultHttpClientHandler. Will be ignored if the - * {@link #httpClientHandler} is set directly via {@link #setHttpClientHandler(HttpClientHandler)}. + * {@link #httpClientHandler} is set directly via {@link #setHttpClientHandler(HttpClientHandler)}. */ @Override public T setHttpClientAutoClose(boolean httpClientAutoClose) { @@ -467,8 +467,8 @@ protected AbstractAPIHandler(Conf builder) { * * @return A copy of the configuration. * @implNote Please take note, that the included httpClientHandler of this class will be - * added to the returned {@link Conf} and therefore will be shared among all APIHandlers that use this - * configuration. + * added to the returned {@link Conf} and therefore will be shared among all APIHandlers that use this + * configuration. * @see co.arago.hiro.client.rest.AuthenticatedAPIHandler */ public Conf getConf() { @@ -634,10 +634,10 @@ public HttpRequest.Builder getRequestBuilder( * @return The constructed HttpRequest. */ private HttpRequest createStreamRequest(URI uri, - String method, - StreamContainer body, - HttpHeaderMap headers, - Long httpRequestTimeout) throws InterruptedException, IOException, HiroException { + String method, + StreamContainer body, + HttpHeaderMap headers, + Long httpRequestTimeout) throws InterruptedException, IOException, HiroException { if (body != null && body.hasContentType()) { headers.set("Content-Type", body.getContentType()); @@ -666,10 +666,10 @@ private HttpRequest createStreamRequest(URI uri, * @return The constructed HttpRequest. */ private HttpRequest createStringRequest(URI uri, - String method, - String body, - HttpHeaderMap headers, - Long httpRequestTimeout) throws InterruptedException, IOException, HiroException { + String method, + String body, + HttpHeaderMap headers, + Long httpRequestTimeout) throws InterruptedException, IOException, HiroException { HttpRequest httpRequest = getRequestBuilder(uri, headers, httpRequestTimeout) .method(method, @@ -692,7 +692,7 @@ private HttpRequest createStringRequest(URI uri, * @param httpRequest The httpRequest to send * @param maxRetries The amount of retries on errors. When this is null, {@link #maxRetries} will be used. * @return A HttpResponse containing an InputStream of the incoming body part of - * the result. + * the result. * @throws HiroException When status errors occur. * @throws IOException On IO errors with the connection. * @throws InterruptedException When the call gets interrupted.