Class ProxyHandlerImpl

    • Constructor Detail

      • ProxyHandlerImpl

        public ProxyHandlerImpl()
    • Method Detail

      • createProxyRequest

        public String createProxyRequest​(String hostName,
                                         Map<String,​String> additionalHeaders)
        Creates a CONNECT request to the provided hostName and adds additionalHeaders to the request.
        Specified by:
        createProxyRequest in interface ProxyHandler
        Parameters:
        hostName - Name of the host to connect to.
        additionalHeaders - Optional. Additional headers to add to the request.
        Returns:
        A string representing the HTTP CONNECT request.
      • validateProxyResponse

        public ProxyHandler.ProxyResponseResult validateProxyResponse​(ByteBuffer buffer)
        Verifies that buffer contains a successful CONNECT response.
        Specified by:
        validateProxyResponse in interface ProxyHandler
        Parameters:
        buffer - Buffer containing the HTTP response.
        Returns:
        Indicates if CONNECT response contained a success. If not, contains an error indicating why the call was not successful.