Class HttpUrlConnectorConfiguration<C extends HttpUrlConnectorConfiguration<C>>

java.lang.Object
org.glassfish.jersey.client.innate.ConnectorConfiguration<C>
org.glassfish.jersey.client.internal.HttpUrlConnectorConfiguration<C>
Direct Known Subclasses:
HttpUrlConnectorConfiguration.ReadWrite, HttpUrlConnectorProvider.Config

public abstract class HttpUrlConnectorConfiguration<C extends HttpUrlConnectorConfiguration<C>> extends org.glassfish.jersey.client.innate.ConnectorConfiguration<C>
  • Field Details

  • Constructor Details

    • HttpUrlConnectorConfiguration

      public HttpUrlConnectorConfiguration()
  • Method Details

    • preInit

      protected void preInit(Map<String,Object> properties)
    • connectionFactory

      public C connectionFactory(HttpUrlConnectorProvider.ConnectionFactory connectionFactory)
      Set a custom HttpURLConnection factory.
      Parameters:
      connectionFactory - custom HTTP URL connection factory. Must not be null.
      Returns:
      updated configuration.
      Throws:
      NullPointerException - in case the supplied connectionFactory is null.
    • chunkSize

      public C chunkSize(int chunkSize)
      Set chunk size for requests transferred using a HTTP chunked transfer coding. If no value is set, the default chunk size of 4096 bytes will be used.

      Note that this programmatically set value can be overridden by setting the ClientProperties.CHUNKED_ENCODING_SIZE property specified in the Jersey client instance configuration.

      Parameters:
      chunkSize - chunked transfer coding chunk size to be used.
      Returns:
      updated configuration.
      Throws:
      IllegalArgumentException - in case the specified chunk size is negative.
    • useFixedLengthStreaming

      public C useFixedLengthStreaming(boolean use)
      Instruct the provided connectors to use the fixed-length streaming mode on the underlying HTTP URL connection instance when sending requests. See HttpUrlConnectorProvider.USE_FIXED_LENGTH_STREAMING property documentation for more details.

      Note that this programmatically set value can be overridden by setting the USE_FIXED_LENGTH_STREAMING property specified in the Jersey client instance configuration.

      Returns:
      updated configuration.
    • useSetMethodWorkaround

      public C useSetMethodWorkaround(boolean use)
      Instruct the provided connectors to use reflection when setting the HTTP method value. See HttpUrlConnectorProvider.SET_METHOD_WORKAROUND property documentation for more details.

      Note that this programmatically set value can be overridden by setting the SET_METHOD_WORKAROUND property specified in the Jersey client instance configuration or in the request properties.

      Returns:
      updated configuration.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object