Compare commits
41 Commits
v2.0.7-jer
...
v2.0.8
Author | SHA1 | Date | |
---|---|---|---|
0258cfcb9a | |||
6fc43b85f7 | |||
d29ccbef79 | |||
512f118354 | |||
21255bfb3d | |||
f10fd39e97 | |||
eaed628f00 | |||
cd278bcc81 | |||
b64c408029 | |||
ec6e7cc15d | |||
2451c634b7 | |||
ed00346e71 | |||
c001576b65 | |||
6cb7afd9f1 | |||
5df5388bd2 | |||
5cda622082 | |||
e1191abaaa | |||
67ea4b72b3 | |||
a574154c20 | |||
b1b19d8cb0 | |||
160766e0ef | |||
e167ac43cc | |||
a28fc13161 | |||
52c7e3cf6d | |||
bd7413bb48 | |||
75c518801f | |||
b3bc04467b | |||
88c8657a34 | |||
28b2478a08 | |||
dc63abc272 | |||
dd5d0f504a | |||
34d03a91e5 | |||
2584b8d668 | |||
a756b05f6c | |||
853b4e66cf | |||
f2032df0f3 | |||
8d3f4559bd | |||
3f476bba5c | |||
6292dde23b | |||
659f71c72c | |||
52f77dddbb |
2
pom.xml
2
pom.xml
@@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>com.inteligr8</groupId>
|
||||
<artifactId>common-rest-client</artifactId>
|
||||
<version>2.0-SNAPSHOT</version>
|
||||
<version>2.0.8</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>ReST API Client for Java</name>
|
||||
|
@@ -14,6 +14,8 @@
|
||||
*/
|
||||
package com.inteligr8.rs;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import javax.ws.rs.client.ClientBuilder;
|
||||
import javax.ws.rs.client.WebTarget;
|
||||
|
||||
@@ -82,6 +84,11 @@ public abstract class Client {
|
||||
ClientBuilder clientBuilder = ClientBuilder.newBuilder()
|
||||
.register(provider)
|
||||
.register(new LoggingFilter());
|
||||
|
||||
if (this.getConfig().getConnectTimeoutInMillis() != null)
|
||||
clientBuilder.connectTimeout(this.getConfig().getConnectTimeoutInMillis(), TimeUnit.MILLISECONDS);
|
||||
if (this.getConfig().getResponseTimeoutInMillis() != null)
|
||||
clientBuilder.readTimeout(this.getConfig().getResponseTimeoutInMillis(), TimeUnit.MILLISECONDS);
|
||||
|
||||
if (authFilter == null)
|
||||
authFilter = this.getConfig().createAuthorizationFilter();
|
||||
|
@@ -119,6 +119,16 @@ public interface ClientConfiguration {
|
||||
}
|
||||
|
||||
|
||||
|
||||
default Integer getConnectTimeoutInMillis() {
|
||||
return null;
|
||||
}
|
||||
|
||||
default Integer getResponseTimeoutInMillis() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @return true to enable Jackson UNWRAP_ROOT_VALUE feature; false otherwise.
|
||||
|
Reference in New Issue
Block a user