JEP 102 Process Updates revised API draft
Roger Riggs
Roger.Riggs at Oracle.com
Tue Mar 10 17:32:44 UTC 2015
Hi Peter,
On 3/10/2015 12:47 PM, Peter Levart wrote:
> 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).
Creating subclasses for the purposes of Process is not an issue, but
together
with maintaining source compatibility and avoiding UOEs to the unsuspecting
holder of a ProcessHandle it seemed prudent to keep the exposure to a
minimum.
(The JEP was not scoped that broadly).
>
> 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.
Can you point me to the alternative Process implementations outside the
JDK?
I've seen a bit of flak about it not being the right API and if its not
right
we should not extend it.
Roger
>
> What do you think?
>
> Regards, Peter
>
More information about the core-libs-dev
mailing list