Interface ProxyHandler
-
- All Known Implementing Classes:
ProxyHandlerImpl
public interface ProxyHandlerCreates and validates proxy requests and responses.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringcreateProxyRequest(java.lang.String hostName, java.util.Map<java.lang.String,java.lang.String> additionalHeaders)Creates a CONNECT request to the providedhostNameand addsadditionalHeadersto the request.booleanvalidateProxyResponse(ProxyResponse httpResponse)Verifies thathttpResponsecontains a successful CONNECT response.
-
-
-
Method Detail
-
createProxyRequest
java.lang.String createProxyRequest(java.lang.String hostName, java.util.Map<java.lang.String,java.lang.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
boolean validateProxyResponse(ProxyResponse httpResponse)
Verifies thathttpResponsecontains a successful CONNECT response.- Parameters:
httpResponse- HTTP response to validate for a successful CONNECT response.- Returns:
trueif the HTTP response is successful and correct, andfalseotherwise.
-
-