Interface ClientProtocolProvider<T,C>

Type Parameters:
T - type of protocol
C - type of the protocol config
All Known Subinterfaces:
HttpClientSpiProvider<T>
All Known Implementing Classes:
Http1ClientSpiProvider, Http2ClientSpiProvider, WsProtocolProvider

public interface ClientProtocolProvider<T,C>
Provider interface for client protocols. HTTP protocols need to also implement HttpClientSpiProvider to be available through the unified HTTP client API.
  • Method Summary

    Modifier and Type
    Method
    Description
    Type of the config object.
    Default configuration of this protocol.
    protocol(WebClient client, C config)
    Create a protocol client instance.
    Protocol id for ALPN (protocol negotiation when using TLS).
  • Method Details

    • protocolId

      String protocolId()
      Protocol id for ALPN (protocol negotiation when using TLS).
      Returns:
      protocol id
    • configType

      Class<C> configType()
      Type of the config object.
      Returns:
      config type
    • defaultConfig

      C defaultConfig()
      Default configuration of this protocol.
      Returns:
      protocol configuration
    • protocol

      T protocol(WebClient client, C config)
      Create a protocol client instance.
      Parameters:
      client - webclient to use
      config - configuration of the protocol
      Returns:
      a new protocol client