On 13/02/2014 12:54, Florian Weimer wrote:
Can we add further enumeration values to java.net.StandardProtocolFamily? The spec does not say so, unlike javax.lang.model.SourceVersion, and the code in the JDK expects a binary flag, so I think the answer is "no".

Does this mean the expected way to add support for further protocol families would be to create a separate implementation of java.net.ProtocolFamily?

If there are protocol families that will be part of Java SE and supported in all implementations then they could be added StandardProtocolFamily. On the other hand, if this is platform or JDK implementation specific then implementing ProtocolFamily is the way to go (the enum extending interface pattern is something that we've used in other areas too).

-Alan

Reply via email to