|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.ibm.wbi.util.Signal
Provide operating system signal handling for a Java VM. Classes that
wish to be notified about signals should implement SignalListener and
add themselves to the listener list by calling Signal.addSignalListener( SignalListener ).
To stop receiving signal events, SignalListeners may remove themselves by
calling Signal.removeSignalListener( SignalListener ).
| Field Summary | |
protected static java.util.Vector |
listeners
list of SignalListeners that wish to receive SignalEvents when signal occur |
protected static boolean |
registered
keep track of whether our signal handler has been registered with the operating system or not |
| Constructor Summary | |
Signal()
dummy constructor so that SignalEvents can have a source, which will be a dummy instance of Signal |
|
| Method Summary | |
static void |
addSignalListener(SignalListener sl)
adds a SignalListener to the list of listeners to receive SignalEvents. |
static java.util.Enumeration |
getSignalListeners()
retrieve an enumeration of all the signal listeners |
protected static boolean |
isEnabled(int type)
a callback that the native signal handler uses to determine whether the signal should be passed to SignalListeners for handling or should be handled by the operating system. |
protected static void |
registerSignal(int signal)
native method that registers a signal handler for the given signal type |
static void |
removeSignalListener(SignalListener sl)
removes a SignalListener from the list of listeners to receive SignalEvents |
protected static void |
signalCaught(int signal)
method called by the operating system whenever a signal occurs |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static boolean registered
protected static java.util.Vector listeners
| Constructor Detail |
public Signal()
| Method Detail |
protected static void registerSignal(int signal)
signal - the signal type (see SignalEvent for a list of signal types)protected static void signalCaught(int signal)
signal - the type of signal that has occurredprotected static boolean isEnabled(int type)
signal - the type of signal that has occurredpublic static void addSignalListener(SignalListener sl)
the - listener to add to the listpublic static void removeSignalListener(SignalListener sl)
the - listener to remove from the listpublic static java.util.Enumeration getSignalListeners()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||