Class HttpSmartProxyHandler
java.lang.Object
org.apache.mina.proxy.AbstractProxyLogicHandler
org.apache.mina.proxy.handlers.http.AbstractHttpLogicHandler
org.apache.mina.proxy.handlers.http.HttpSmartProxyHandler
- All Implemented Interfaces:
ProxyLogicHandler
HttpSmartProxyHandler.java - HTTP proxy handler that automatically handles forwarding a request
to the appropriate authentication mechanism logic handler.
- Since:
- MINA 2.0.0-M3
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate AbstractAuthLogicHandlerThe automatically selected http authentication logic handler.private static final org.slf4j.Loggerprivate booleanHas the HTTP proxy request been sent ? -
Constructor Summary
ConstructorsConstructorDescriptionHttpSmartProxyHandler(ProxyIoSession proxyIoSession) Creates a new HttpSmartProxyHandler instance -
Method Summary
Modifier and TypeMethodDescriptionprivate voidautoSelectAuthHandler(HttpProxyResponse response) Automatic selection of the authentication algorithm.voiddoHandshake(IoFilter.NextFilter nextFilter) Performs the handshake processing.voidhandleResponse(HttpProxyResponse response) Handle a HTTP response from the proxy server.Methods inherited from class AbstractHttpLogicHandler
decodeResponse, messageReceived, writeRequestMethods inherited from class AbstractProxyLogicHandler
closeSession, closeSession, enqueueWriteRequest, flushPendingWriteRequests, getProxyFilter, getProxyIoSession, getSession, isHandshakeComplete, setHandshakeComplete, writeData
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
requestSent
private boolean requestSentHas the HTTP proxy request been sent ? -
authHandler
The automatically selected http authentication logic handler.
-
-
Constructor Details
-
HttpSmartProxyHandler
Creates a new HttpSmartProxyHandler instance- Parameters:
proxyIoSession- The Prowxy IoSession
-
-
Method Details
-
doHandshake
Performs the handshake processing.- Parameters:
nextFilter- the next filter- Throws:
ProxyAuthException- if authentication fails
-
autoSelectAuthHandler
Automatic selection of the authentication algorithm. IfpreferedOrderis set then algorithms are selected from the list order otherwise the algorithm tries to select the most secured algorithm available first.- Parameters:
response- the proxy response- Throws:
ProxyAuthException
-
handleResponse
Handle a HTTP response from the proxy server.- Specified by:
handleResponsein classAbstractHttpLogicHandler- Parameters:
response- The proxy response.- Throws:
ProxyAuthException- If we get an error during the proxy authentication
-