JEP 102 Process Updates revised API draft
Peter Levart
peter.levart at gmail.com
Tue Mar 10 16:47:41 UTC 2015
On 03/10/2015 02:55 PM, Roger Riggs wrote:
> ProcessHandle is designed to not to have an external implementations
> (the constructor is package private).
I don't see a purpose in this. You can still subclass it freely, because
you can subclass Process which is-a ProcessHandle. I think it can be an
interface (see previous post).
For the same reason Process is designed to support custom/external
implementations (for platforms not directly supported by Oracle, for
example), there is a reason to support costom/external implementations
of ProcessHandle. But we should not stop at what we have now. Instead of
static factory methods creating just internal implementations, we could
add a Process[Handle]Spi locatable via ServiceLoader to fully support
external implementations for the whole API (static methods too). This
can be added later if it is too much work for JDK9.
What do you think?
Regards, Peter
More information about the core-libs-dev
mailing list