> > I was unable to find an example implemenation of > either interceptor in
>Slide, although Slide exposes > setters that may be used to set the
> > interceptor reference, so maybe somebody's > using them somewhere and
>can
> > comment on their expectations.
>WebDavSession implements ConnectionInterceptor
Yeah, I missed that one. But WebDavSession uses ConnectionInterceptor in a
fairly trivial way--it simply logs to stdout the trace of methods invoked,
and as I mentioned before, this isn't always a very good indication of
what's actually happening in the client/server communciation. (Similiar
functionality, and a more accuracte picture of what's really going on, can
be obtained via the logging within HttpClient itself.)
>It would be nice to be able to use the StreamInterceptor as a stream logger
>and
>the ConnectionInterceptor will also be appriciated by gui programmers.
>But as you say, a different interface is needed to be able to support
>multiple
>credentials and if you don't have the time to correct the interface better
>remove it.
If the goal is logging, I'd suggest we use logging. If the goal is event
publication, I'd suggest we set up a more meaningful events (the auth
credentials is one of the smaller points), and a more meaningful way of
responding to those events. I appreciate the concepts behind these
interceptors, but I think they need a little more work to be truly useful,
and if we don't have a strong need for them now, maybe we can defer that
work for a 1.1 or 2.0 release.
More to the point though, I was trying to reintroduce these interfaces into
the branch I've been working on, and it is not clear to me what the contract
with these interfaces is supposed to be. And if the contract isn't clear
from looking at the HttpClient internals, it's certainly not clear to
someone who wants to implement those interfaces.
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp