Merge branch 'develop' into develop-cxf
This commit is contained in:
commit
adad70d884
@ -14,6 +14,8 @@
|
|||||||
*/
|
*/
|
||||||
package com.inteligr8.rs;
|
package com.inteligr8.rs;
|
||||||
|
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import javax.ws.rs.client.ClientBuilder;
|
import javax.ws.rs.client.ClientBuilder;
|
||||||
import javax.ws.rs.client.WebTarget;
|
import javax.ws.rs.client.WebTarget;
|
||||||
|
|
||||||
@ -83,6 +85,11 @@ public abstract class Client {
|
|||||||
.register(provider)
|
.register(provider)
|
||||||
.register(new LoggingFilter());
|
.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)
|
if (authFilter == null)
|
||||||
authFilter = this.getConfig().createAuthorizationFilter();
|
authFilter = this.getConfig().createAuthorizationFilter();
|
||||||
if (authFilter != null)
|
if (authFilter != null)
|
||||||
|
@ -120,6 +120,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.
|
* @return true to enable Jackson UNWRAP_ROOT_VALUE feature; false otherwise.
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user