Interface ProxyHandler
-
- All Known Implementing Classes:
ProxyHandlerImpl
public interface ProxyHandlerCreates and validates proxy requests and responses.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classProxyHandler.ProxyResponseResultRepresents a response from the proxy.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringcreateProxyRequest(String hostName, Map<String,String> additionalHeaders)Creates a CONNECT request to the providedhostNameand addsadditionalHeadersto the request.ProxyHandler.ProxyResponseResultvalidateProxyResponse(ByteBuffer buffer)Verifies thatbuffercontains a successful CONNECT response.
-
-
-
Method Detail
-
createProxyRequest
String createProxyRequest(String hostName, Map<String,String> additionalHeaders)
Creates a CONNECT request to the providedhostNameand addsadditionalHeadersto the request.- 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
ProxyHandler.ProxyResponseResult validateProxyResponse(ByteBuffer buffer)
Verifies thatbuffercontains a successful CONNECT response.- 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.
-
-