On Sun, 2006-05-21 at 16:18 +0200, Roland Weber wrote: > Hi Oleg, > > > Author: olegk > > Date: Sun May 21 07:06:29 2006 > > New Revision: 408172 > > > > URL: http://svn.apache.org/viewvc?rev=408172&view=rev > > Log: > > Changed standard request and response interceptors to use a special marker > > class when creating special protocol headers. > > Automatically generated headers can now be distinguished from those added > > explicitly by the user. > > What is the advantage of an extra interface over a flag attribute > as was used in HttpClient?
Roland, It does not pollute the interface of the base class. To me this is certainly an advantage but I can have it either way GeneratedHeader is merely a marker subclass of the Header class. This still does not preclude us from using request wrappers or any other techniques to deal with automatically generated headers. Protocol interceptors MAY use the GeneratedHeader but do not have to. Cheers, Oleg > I consider attributes more reliable, > because they do not make assumptions about class hierarchies. > Others share this opinion, for example org.w3c.dom.Node uses a > type attribute to distinguish between node types rather than > instanceof checks. It allows for a single implementation class > for several interfaces. > > We still can't allow interceptors to change or remove headers, > but that is a different story. > > cheers, > Roland > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]