Class HelidonConnectorProvider

  • All Implemented Interfaces:
    org.glassfish.jersey.client.spi.ConnectorProvider

    @Beta
    public class HelidonConnectorProvider
    extends io.helidon.jersey.connector.HelidonConnectorProvider
    Provider for Helidon WebClient Connector that utilizes the Helidon HTTP Client to send and receive HTTP request and responses. JDK 8 is not supported by the Helidon Connector.

    The following properties are only supported at construction of this class:

    • ClientProperties.CONNECT_TIMEOUT
    • ClientProperties.FOLLOW_REDIRECTS
    • ClientProperties.PROXY_URI
    • ClientProperties.PROXY_USERNAME
    • ClientProperties.PROXY_PASSWORD
    • ClientProperties.READ_TIMEOUT
    • HelidonClientProperties.CONFIG

    If a ClientResponse is obtained and an entity is not read from the response then InboundMessageContext.close() MUST be called after processing the response to release connection-based resources.

    Client operations are thread safe, the HTTP connection may be shared between different threads.

    If a response entity is obtained that is an instance of Closeable then the instance MUST be closed after processing the entity to release connection-based resources.

    This connector uses ClientProperties.OUTBOUND_CONTENT_LENGTH_BUFFER to buffer the entity written for instance by StreamingOutput. Should the buffer be small and StreamingOutput.write(OutputStream) be called many times, the performance can drop. The Content-Length or the Content_Encoding header is set by the underlaying Helidon WebClient regardless of the ClientProperties.OUTBOUND_CONTENT_LENGTH_BUFFER size, however.

    Since:
    2.31
    • Constructor Detail

      • HelidonConnectorProvider

        public HelidonConnectorProvider()
    • Method Detail

      • getConnector

        public org.glassfish.jersey.client.spi.Connector getConnector​(Client client,
                                                                      Configuration runtimeConfig)
        Specified by:
        getConnector in interface org.glassfish.jersey.client.spi.ConnectorProvider
        Overrides:
        getConnector in class io.helidon.jersey.connector.HelidonConnectorProvider