Leif Roar Moldskred schrieb:
Jan Burse<janburse@fastmail.fm> wrote:
Didn't you read my note: People who are
not used to work on solutions, please
refrain from posting?
You are just wasting bandwidth.
I think you're confusing the terms "solution" and "hack" here,
actually, but that's just me.
Conceptually Signal/SignalHandler is a solution for
providing a SIGINT hook. When I wrap this in my
own class without other visible classes than from
java.lang.* I am not anymore dependent on sun.misc.*.
For platforms that don't have sun.misc.* I can
bundle a different implementation of my class.
This is programming by contract. My class defines
a contract, and I can deliver what ever realization
I want.
So its only in as far a hack, because I have not yet
done a wide range realization of the contract. But
sun.misc.* is already pretty wide range. For example
I am not that dependent on Sun/Oracle, since OpenJDK
on Linux has also sun.misc.* at the moment.
But I am open to suggestions that would provide:
- Their own contract
- Their own set of realizations
I believe the JNI solution is more clean.
to solve. It basically means back to square one.
available).