Hi all,
I'm planning to make some changes to the Scheme class.
In HttpClient I need to decide whether a route requires
tunnelling, which depends on the socket factory for the
target host scheme, that's why I want to change it now.
There are two things I don't like:
1. The static map of registered schemes. Let's replace
it with a new SchemeSet class that can be instantiated
dynamically. A static default SchemeSet can still be
kept for fallbacks.
2. A scheme ID is not required to match the name:
Scheme s = new Scheme("http",...,80);
Scheme.registerScheme("http", s);
Scheme.registerScheme("https", s);
String id = "https";
if (!Scheme.getScheme(id).getName().equals(id))
System.out.println("I am confused");
I'd give the new SchemeSet class a register(Scheme)
method that uses the scheme name as identifier.
objections?
cheers,
Roland
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]