public final class JerseyClientHelper extends Object
Client
.Modifier and Type | Class and Description |
---|---|
static class |
JerseyClientHelper.ApacheHttpClientBuilder |
Modifier and Type | Field and Description |
---|---|
static com.sun.jersey.api.client.Client |
DEFAULT_CLIENT
Default instance of a Jersey 1
Client relying on the Apache HTTP client,
DEFAULT_CONNECTION_TIMEOUT for the connection timeout parameters and no authentication. |
static int |
DEFAULT_CONNECTION_TIMEOUT |
Modifier and Type | Method and Description |
---|---|
static JerseyClientHelper.ApacheHttpClientBuilder |
clientBuilder()
Allows to build a custom instance of a Jersey 1
Client relying on the Apache HTTP client. |
public static final int DEFAULT_CONNECTION_TIMEOUT
public static final com.sun.jersey.api.client.Client DEFAULT_CLIENT
Client
relying on the Apache HTTP client,
DEFAULT_CONNECTION_TIMEOUT
for the connection timeout parameters and no authentication.public static JerseyClientHelper.ApacheHttpClientBuilder clientBuilder()
Client
relying on the Apache HTTP client.
For instance, you can set the connection timeout and credentials for basic authentication by calling:
Client client = JerseyClientHelper.clientBuilder()
.setConnectTimeout(5000)
.setCredentials("joe", "password")
.build();
Copyright © 2018 Nuxeo. All rights reserved.