Hi,

I have to know the state of the HTTP method to get the response before a retry is caused by redirection or authentication. I'd like to use HttpClient's built-in redirection and authentication handling. So I thought about having a listener for the org.apache.commons.httpclient.HttpMethodDirector looking like this:

public interface HttpMethodDirectorListener
{
    public void connection(HttpConnection connection);

    public void retriedMethod(HttpMethod method);
}

HttpMethodDirector would notify its listeners in executeMethod(final HttpMethod method):

* about the connection before

  this.executeWithRetry(method);

* and about a retried method before

  if (this.processRedirectResponse(method))

  and before

  if (processAuthenticationResponse(method))


The listeners would be added/removed via HttpClient and handed over to the HttpMethodDirector in the HttpMethodDirector's constructor.

Are you interested in this idea? Or is there a simpler way to do it?
--
Johannes Koch
BIKA Web Compliance Center - Fraunhofer FIT
Schloss Birlinghoven, D-53757 Sankt Augustin, Germany
Phone: +49-2241-142628    Fax: +49-2241-142065

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to