I had meet a problem that I need to log the time cost by  method
“establishRoute”( in httpclient ).

Since there’s not something seems to support, I wrote a interceptor into
HttpCore coping the structure of “HttpProcessor"

Could I commit the code to HttpCore? I just wonder if HttpCore would accept
the function.

There’re some code, but not all. Just for example.


@ThreadSafe // provided injected dependencies are immutable

public final class ImmutableRouteProcessor implements RouteProcessor {

...

}


public interface PostRouteInterceptor {

  void postProcess(final HttpRequest request, final HttpContext context);

}


public interface PreRouteInterceptor {

  void preProcess(final HttpRequest request, final HttpContext context);

}


public interface RouteProcessor extends PreRouteInterceptor,
PostRouteInterceptor {

}


Baosen

Reply via email to