|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectariba.util.core.SignalHandler
public abstract class SignalHandler
Wrapper around the sun.misc.SignalHandler to avoid having the rest of the application to depend on this undocumented class and as such can be changed in any Java release. Note that this implementation guarantees that if another handler was registered for the same signal, it will be invoked after this one. In other words, you can register multiple handlers for the same signal in the reverse order in which you want them to be invoked.
Field Summary |
---|
Fields inherited from interface sun.misc.SignalHandler |
---|
SIG_DFL, SIG_IGN |
Constructor Summary | |
---|---|
SignalHandler()
|
Method Summary | |
---|---|
void |
handle(sun.misc.Signal signal)
Method from the sun's interface which is called to handle a signal. |
static void |
raiseSignal(java.lang.String signalName)
Raises a signal in the current process. |
static SignalHandler |
registerSignalHandler(SignalHandler handler,
java.lang.String signalName)
Registers the given SignalHandler for the given signal Note: an handler can be registered for only one signal ! Note: this method is not thread safe |
static SignalHandler |
registerSignalHandler(java.lang.String className,
java.lang.String signalName)
Registers a new SignalHandler for the given signal name Note: this method is not thread safe |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SignalHandler()
Method Detail |
---|
public static SignalHandler registerSignalHandler(java.lang.String className, java.lang.String signalName)
className
- name of the subclass of SignalHandlersignalName
- the name of the signal handled
null
if the registration did not succeed.public static SignalHandler registerSignalHandler(SignalHandler handler, java.lang.String signalName)
handler
- the handler to registersignalName
- the signal to register with
null
public static void raiseSignal(java.lang.String signalName)
signalName
- the name of the signal to raisepublic final void handle(sun.misc.Signal signal)
handle
in interface sun.misc.SignalHandler
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |