Class JerseyClientHelper

java.lang.Object
org.nuxeo.jaxrs.test.JerseyClientHelper

@Deprecated(since="2023.13", forRemoval=true) public final class JerseyClientHelper extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
since 2023.13, use HttpClientTestRule instead
Helper for using the Jersey 1 Client.
Since:
9.3
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.sun.jersey.api.client.Client
    Deprecated, for removal: This API element is subject to removal in a future version.
    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 final int
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    Allows to build a custom instance of a Jersey 1 Client relying on the Apache HTTP client.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • DEFAULT_CONNECTION_TIMEOUT

      public static final int DEFAULT_CONNECTION_TIMEOUT
      Deprecated, for removal: This API element is subject to removal in a future version.
      See Also:
    • DEFAULT_CLIENT

      public static final com.sun.jersey.api.client.Client DEFAULT_CLIENT
      Deprecated, for removal: This API element is subject to removal in a future version.
      Default instance of a Jersey 1 Client relying on the Apache HTTP client, DEFAULT_CONNECTION_TIMEOUT for the connection timeout parameters and no authentication.
  • Method Details

    • clientBuilder

      public static JerseyClientHelper.ApacheHttpClientBuilder clientBuilder()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Allows to build a custom instance of a Jersey 1 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();