Hello Odi,

please keep in mind that Samuel just had to change his
code in the opposite direction to make it work without
your patch...
Up until now, everyone instantiating a secure socket
factory uses that type to invoke the constructor for the
secure protocol. But I agree with Mike that there are not
too many people that will be bothered by the deprecation
warning.

regards,
  Roland





Ortwin Glück <[EMAIL PROTECTED]>
10.11.2003 16:32
Please respond to "Commons HttpClient Project"
 
        To:     Commons HttpClient Project 
<[EMAIL PROTECTED]>
        cc: 
        Subject:        Re: cvs commit: 
jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/protocol 
Protocol.java




Roland Weber wrote:
> Consider this:
> 
> SecureProtocolSocketFactory spsf = ...;
> ... = new Protocol("myscheme", spsf, 666);

There is nothing in the SecureProtocolSocketFactory interface that 
should be called by the user.
So the user should write:

ProtocolSocketFactory spsf = ...;
  ... = new Protocol("myscheme", spsf, 666);


Of course if you write your own SPSF this may lead to code like this:

MySecureProtocolSocketFactory foo = MySecureProtocolSocketFactory();
f.callsomeMethod(...);
... = new Protocol("https", (ProtocolSocketFactory)foo, 443);

or even:

ProtocolSocketFactory foo = MySecureProtocolSocketFactory();
((MySecureProtocolSocketFactory)f).callsomeMethod(...);
... = new Protocol("https", foo, 443);


Odi




---------------------------------------------------------------------
To unsubscribe, e-mail: 
[EMAIL PROTECTED]
For additional commands, e-mail: 
[EMAIL PROTECTED]


Reply via email to