|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opengts.util.PosixSignalHandler
public class PosixSignalHandler
Posix Signal Handler. This class requires the availability of the "sun.misc.SignalHandler" class for both compiling and running.
Field Summary | |
---|---|
static java.lang.String |
SIGNAL_ABRT
|
static java.lang.String |
SIGNAL_HUP
|
static java.lang.String |
SIGNAL_INT
|
static java.lang.String[] |
SIGNAL_LIST
|
static java.lang.String |
SIGNAL_TERM
|
Constructor Summary | |
---|---|
PosixSignalHandler()
Constructor |
|
PosixSignalHandler(java.lang.String... sigs)
Constructor |
Method Summary | |
---|---|
boolean |
_handleSignal(java.lang.String sigName)
set up a signal handler callback for the specified/named signal (should be one of "HUP", "INT"(^C), "ABRT", "TERM") |
boolean |
handleSignal(java.lang.String... sigNames)
set up a signal handler callback for the specified/named signal (should be one of "HUP", "INT"(^C), "ABRT", "TERM") |
static boolean |
isValidSignalNames(java.lang.String... sigs)
|
static void |
main(java.lang.String[] argv)
|
protected void |
signal_ABRT()
"ABRT" signal callback |
protected void |
signal_HUP()
"HUP" signal callback |
protected void |
signal_INT()
"INT" signal callback |
protected void |
signal_TERM()
"TERM" signal callback |
protected void |
signal(java.lang.String sigName)
overridable handler callback |
boolean |
sunSignalHandlerAvailable()
Returns true if the "sun.misc.Signal" is available |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String SIGNAL_HUP
public static final java.lang.String SIGNAL_INT
public static final java.lang.String SIGNAL_TERM
public static final java.lang.String SIGNAL_ABRT
public static final java.lang.String[] SIGNAL_LIST
Constructor Detail |
---|
public PosixSignalHandler()
public PosixSignalHandler(java.lang.String... sigs) throws java.lang.IllegalArgumentException
sigs
- List of signals
java.lang.IllegalArgumentException
- if a specified signal name is invalidMethod Detail |
---|
public static boolean isValidSignalNames(java.lang.String... sigs)
public boolean sunSignalHandlerAvailable()
public boolean handleSignal(java.lang.String... sigNames) throws java.lang.IllegalArgumentException
sigNames
- List of signal names
java.lang.IllegalArgumentException
- if a specified signal name is invalidpublic boolean _handleSignal(java.lang.String sigName) throws java.lang.IllegalArgumentException
sigName
- The signal name
java.lang.IllegalArgumentException
- if the specified signal name is invalidprotected void signal(java.lang.String sigName)
protected void signal_HUP()
protected void signal_INT()
protected void signal_ABRT()
protected void signal_TERM()
public static void main(java.lang.String[] argv)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |