It shouldn't necessarily be ugly. The checks would be done by the authenticators when they are inited for the first time. The factory simply takes care of loading them, getting them to init and making them available. If the init() method of the authenticator fails for whatever reason then it would be made unavailable. So all platform check would be part of the init() method, if there are any. This is pretty much the same thing as an application sever does for servlets.
Andre -----Original Message----- From: Roland Weber [mailto:[EMAIL PROTECTED] Sent: Thursday, July 01, 2004 2:28 AM To: Commons HttpClient Project Subject: RE: NTLM authentication to an MS Exchange web page account using HTTP Client V2.0 <snip> > Thinking about it, I believe the ideal solution would be to create an > authentication factory, which would return an instance of an 'authenticator' > (my made up name), based on specified name. This would allow us to have the > flexibility of either returning a pure Java instance of an implementation > (if possible) or one that has a native implementation. If an authenticator > could not initialise itself for the given platform or environment, then an > Exception would be thrown. How does this sound? - note: 2min design process > Sounds great. Use *.httpclient.auth.CredentialsProvider as the interface for the 'authenticator' and you're almost there :-) The factory will become very ugly though, because of all the platform specific checks. cheers, Roland --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]