public abstract class AbstractHttpLogicHandler extends AbstractProxyLogicHandler
AbstractProxyLogicHandler
implementations.
Provides HTTP request encoding/response decoding functionality.Constructor and Description |
---|
AbstractHttpLogicHandler(ProxyIoSession proxyIoSession)
Creates a new
AbstractHttpLogicHandler . |
Modifier and Type | Method and Description |
---|---|
protected HttpProxyResponse |
decodeResponse(java.lang.String response)
Parse a HTTP response from the proxy server.
|
abstract void |
handleResponse(HttpProxyResponse response)
Handles a HTTP response from the proxy server.
|
void |
messageReceived(IoFilter.NextFilter nextFilter,
IoBuffer buf)
Handles incoming data during the handshake process.
|
void |
writeRequest(IoFilter.NextFilter nextFilter,
HttpProxyRequest request)
Calls
#writeRequest0(NextFilter, HttpProxyRequest) to write the request. |
closeSession, closeSession, enqueueWriteRequest, flushPendingWriteRequests, getProxyFilter, getProxyIoSession, getSession, isHandshakeComplete, setHandshakeComplete, writeData
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
doHandshake
public AbstractHttpLogicHandler(ProxyIoSession proxyIoSession)
AbstractHttpLogicHandler
.proxyIoSession
- the ProxyIoSession
in use.request
- the requested url to negotiate with the proxy.public void messageReceived(IoFilter.NextFilter nextFilter, IoBuffer buf) throws ProxyAuthException
nextFilter
- the next filterbuf
- the buffer holding received dataProxyAuthException
- if authentication failspublic abstract void handleResponse(HttpProxyResponse response) throws ProxyAuthException
response
- The response.ProxyAuthException
public void writeRequest(IoFilter.NextFilter nextFilter, HttpProxyRequest request)
#writeRequest0(NextFilter, HttpProxyRequest)
to write the request.
If needed a reconnection to the proxy is done previously.nextFilter
- the next filterrequest
- the http requestprotected HttpProxyResponse decodeResponse(java.lang.String response) throws java.lang.Exception
response
- The response string.java.lang.Exception
Copyright © 2004-2019 Apache MINA Project. All Rights Reserved.