Class AbstractHttpLogicHandler

    • Method Detail

      • messageReceived

        public void messageReceived​(IoFilter.NextFilter nextFilter,
                                    IoBuffer buf)
                             throws ProxyAuthException
        Handles incoming data during the handshake process. Should consume only the handshake data from the buffer, leaving any extra data in place.
        Parameters:
        nextFilter - the next filter
        buf - the buffer holding received data
        Throws:
        ProxyAuthException - if authentication fails
      • handleResponse

        public abstract void handleResponse​(HttpProxyResponse response)
                                     throws ProxyAuthException
        Handles a HTTP response from the proxy server.
        Parameters:
        response - The response.
        Throws:
        ProxyAuthException - If we get an error during the proxy authentication
      • writeRequest

        public void writeRequest​(IoFilter.NextFilter nextFilter,
                                 HttpProxyRequest request)
        Calls writeRequest0(NextFilter, HttpProxyRequest) to write the request. If needed a reconnection to the proxy is done previously.
        Parameters:
        nextFilter - the next filter
        request - the http request
      • decodeResponse

        protected HttpProxyResponse decodeResponse​(String response)
                                            throws Exception
        Parse a HTTP response from the proxy server.
        Parameters:
        response - The response string.
        Returns:
        The decoded HttpResponse
        Throws:
        Exception - If we get an error while decoding the response