Class AbstractAuthLogicHandler
java.lang.Object
org.apache.mina.proxy.handlers.http.AbstractAuthLogicHandler
- Direct Known Subclasses:
HttpBasicAuthLogicHandler, HttpDigestAuthLogicHandler, HttpNoAuthLogicHandler, HttpNTLMAuthLogicHandler
AbstractAuthLogicHandler.java - Abstract class that handles an authentication
mechanism logic.
- Since:
- MINA 2.0.0-M3
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.slf4j.Loggerprotected ProxyIoSessionObject that contains all the proxy authentication session informations.protected ProxyRequestThe request to be handled by the proxy.protected intThe current handshake step. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractAuthLogicHandler(ProxyIoSession proxyIoSession) Instantiates a handler for the given proxy session. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddKeepAliveHeaders(Map<String, List<String>> headers) Try to force proxy connection to be kept alive.abstract voiddoHandshake(IoFilter.NextFilter nextFilter) Method called at each step of the handshaking process.abstract voidhandleResponse(HttpProxyResponse response) Handles a HTTP response from the proxy server.protected voidwriteRequest(IoFilter.NextFilter nextFilter, HttpProxyRequest request) Sends an HTTP request.
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
request
The request to be handled by the proxy. -
proxyIoSession
Object that contains all the proxy authentication session informations. -
step
protected int stepThe current handshake step.
-
-
Constructor Details
-
AbstractAuthLogicHandler
Instantiates a handler for the given proxy session.- Parameters:
proxyIoSession- the proxy session object- Throws:
ProxyAuthException- If we get an error during the proxy authentication
-
-
Method Details
-
doHandshake
Method called at each step of the handshaking process.- Parameters:
nextFilter- the next filter- Throws:
ProxyAuthException- If we get an error during the proxy authentication
-
handleResponse
Handles a HTTP response from the proxy server.- Parameters:
response- The HTTP response.- Throws:
ProxyAuthException- If we get an error during the proxy authentication
-
writeRequest
protected void writeRequest(IoFilter.NextFilter nextFilter, HttpProxyRequest request) throws ProxyAuthException Sends an HTTP request.- Parameters:
nextFilter- the next filterrequest- the request to write- Throws:
ProxyAuthException- If we get an error during the proxy authentication
-
addKeepAliveHeaders
-