|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.realtime.POSIXSignalHandler
Use instances of AsyncEvent
to handle POSIX signals. Usage:
POSIXSignalHandler.addHandler(SIGINT, intHandler);
This class is required to be implemented only if the underlying system supports POSIX signals.
Field Summary | |
private static int |
MAX_SIG
|
static int |
SIGABRT
Used by abort, replace SIBIOT in the future. |
static int |
SIGALRM
Alarm clock. |
static int |
SIGBUS
Bus error. |
static int |
SIGCANCEL
Thread cancellation signal used by libthread . |
static int |
SIGCHLD
Child status change alis (POSIX). |
static int |
SIGCLD
Child status change. |
static int |
SIGCONT
Stopped process has been continued. |
static int |
SIGEMT
EMT instructions. |
static int |
SIGFPE
Floaating point exception. |
static int |
SIGFREEZE
Special signal used by CPR. |
static int |
SIGHUP
Hangup. |
static int |
SIGILL
Illegal instruction (not reset when caught). |
static int |
SIGINT
Interrupt (rubout). |
static int |
SIGIO
Socked I/O possible ( SIGPOLL alias). |
static int |
SIGIOT
IOT instruction. |
static int |
SIGKILL
Kill (cannot be caught or ignored). |
static int |
SIGLOST
Resource lost (e.g., record-lock lost). |
static int |
SIGLWP
Special signal used by thread library. |
private static javax.realtime.AsyncEvent[] |
signalsHandlersList
|
static int |
SIGPIPE
Write on a pipe with no one to read it. |
static int |
SIGPOLL
Pollable event occured. |
static int |
SIGPROF
Profiling timer expired. |
static int |
SIGPWR
Power-fail restart. |
static int |
SIGQUIT
Quit (ASCII FS). |
static int |
SIGSEGV
Segmentation violation. |
static int |
SIGSTOP
Stop (cannot be caught or ignored). |
static int |
SIGSYS
Bad argument to system call. |
static int |
SIGTERM
Software termination signal from kill. |
static int |
SIGTHAW
Special signal used by CPR. |
static int |
SIGTRAP
Trace trap (not reset when caught). |
static int |
SIGTSTP
User stop requested from tty. |
static int |
SIGTTIN
Background tty read attempted. |
static int |
SIGTTOU
Background tty write attempted. |
static int |
SIGURG
Urgent socket condition. |
static int |
SIGUSR1
User defined signal = 1. |
static int |
SIGUSR2
User defined signal = 2. |
static int |
SIGVTALRM
Virtual timer expired. |
static int |
SIGWAITING
Process's lwps are blocked. |
static int |
SIGWINCH
Window size change. |
static int |
SIGXCPU
Exceeded cpu limit. |
static int |
SIGXFSZ
Exceeded file size limit. |
Constructor Summary | |
POSIXSignalHandler()
|
Method Summary | |
static void |
addHandler(int signal,
javax.realtime.AsyncEventHandler handler)
Add the given AsyncEventHandler to the list of
handlers of the AsyncEvent of the given signal. |
static void |
removeHandler(int signal,
javax.realtime.AsyncEventHandler handler)
Remove the given AsyncEventHandler to the list
of handlers of the AsyncEvent of the given signal. |
static void |
setHandler(int signal,
javax.realtime.AsyncEventHandler handler)
Set the given AsyncEventHandler as the handler
of the AsyncEvent of the given signal. |
private void |
setSignals()
Assigns machine-dependent values to all SIGxxxx constants. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static int SIGABRT
SIBIOT
in the future.
public static int SIGALRM
public static int SIGBUS
public static int SIGCANCEL
libthread
.
public static int SIGCHLD
public static int SIGCLD
public static int SIGCONT
public static int SIGEMT
public static int SIGFPE
public static int SIGFREEZE
public static int SIGHUP
public static int SIGILL
public static int SIGINT
public static int SIGIO
SIGPOLL alias).
public static int SIGIOT
public static int SIGKILL
public static int SIGLOST
public static int SIGLWP
public static int SIGPIPE
public static int SIGPOLL
public static int SIGPROF
public static int SIGPWR
public static int SIGQUIT
public static int SIGSEGV
public static int SIGSTOP
public static int SIGSYS
public static int SIGTERM
public static int SIGTHAW
public static int SIGTRAP
public static int SIGTSTP
public static int SIGTTIN
public static int SIGTTOU
public static int SIGURG
public static int SIGUSR1
public static int SIGUSR2
public static int SIGVTALRM
public static int SIGWAITING
public static int SIGWINCH
public static int SIGXCPU
public static int SIGXFSZ
private static final int MAX_SIG
private static javax.realtime.AsyncEvent[] signalsHandlersList
Constructor Detail |
public POSIXSignalHandler()
Method Detail |
public static void addHandler(int signal, javax.realtime.AsyncEventHandler handler)
AsyncEventHandler
to the list of
handlers of the AsyncEvent
of the given signal.
signal
- One of the POSIX signals from this
(e.g.,
this.SIGLOST
). If the value given to
signal
is not one of the POSIX signals
then a java.lang.IllegalArgumentException
will be thrown.handler
- An AsyncEventHandler
which will be
scheduled when the given signal occurs.public static void removeHandler(int signal, javax.realtime.AsyncEventHandler handler)
AsyncEventHandler
to the list
of handlers of the AsyncEvent
of the given signal.
signal
- One of the POSIX signals from this
(e.g.,
this.SIGLOST
). If the value given to
signal
is not one of the POSIX signals
then a java.lang.IllegalArgumentException
will be thrown.handler
- An AsyncEventHandler
which will be
scheduled when the given signal occurs.public static void setHandler(int signal, javax.realtime.AsyncEventHandler handler)
AsyncEventHandler
as the handler
of the AsyncEvent
of the given signal.
signal
- One of the POSIX signals from this
(e.g.,
this.SIGLOST
). If the value given to
signal
is not one of the POSIX signals
then a java.lang.IllegalArgumentException
will be thrown.handler
- An AsyncEventHandler
which will be
scheduled when the given signal occurs. If
handler
is null then no handler will be
associated with this
(i.e., remove all handlers).private void setSignals()
SIGxxxx
constants.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |