I expected that to be the case when the references on the Oracle web site 
talked about the changes from 1.0 to 1.1.

Is there any talk, rumor or hint that Sockets might one day be extendable in 
same sort of way that file systems are with the Java 7 NIO features?

Tom


-----Original Message-----
From: Alan Bateman [mailto:alan.bate...@oracle.com] 
Sent: Friday, April 19, 2013 7:27 AM
To: Salter, Thomas A
Cc: OpenJDK (net-dev@openjdk.java.net)
Subject: Re: SocketImplFactory

On 18/04/2013 22:31, Salter, Thomas A wrote:
> Are there any real-life examples of using SocketImplFactory?
>
> I was hoping to find a way to redirect selected sockets, by IP address, to a 
> different implementation of sockets that could take advantage of a high-speed 
> connection.  For this to work, I'd need to be able to delegate all other 
> sockets back to the standard implementation.  Unfortunately, it appears that 
> most of the classes I'd need to access are package-private so this approach 
> wouldn't work.
>
> A requirement is that applications would not require any source changes.  
> They would be unmodified and just have things redirect dynamically when they 
> create a Socket or ServerSocket.  I was thinking that this feature would be 
> enabled through a class that loads as a service and calls setSocketFactory.
>
> Inheriting from Socket or ServerSocket doesn't help since I can't change the 
> applications and I can't make those classes revert to the default 
> implementation when I don't want to use mine.
>
> Is there any hope of something like this working?
>
>
I can't point to specific examples but SocketImplFactory is somewhat 
legacy now. It was used quite a bit in the early days but personally I 
haven't seen any usages in the last few yeas.

-Alan.

Reply via email to