javax.realtime
Class POSIXSignalHandler

java.lang.Object
  extended byjavax.realtime.POSIXSignalHandler

public final class POSIXSignalHandler
extends Object

The class POSIXSignalHandler provides a way of handling POSIX signals by means of AsyncEventHandler.

Author:
Angelo Corsaro

Field Summary
protected  boolean enabled_
           
protected  gnu.gcj.RawData natHandler_
           
protected  RealtimeThread notificationThread
           
protected  gnu.gcj.RawData pipeID_
           
static int SIGABRT
           
static int SIGALRM
           
static int SIGBUS
           
static int SIGCHLD
           
static int SIGCLD
           
static int SIGCONT
           
static int SIGFPE
           
static int SIGHUP
           
static int SIGILL
           
static int SIGINT
           
static int SIGIO
           
static int SIGIOT
           
static int SIGKILL
           
protected static int SIGMAX
           
protected static int SIGMIN
           
protected  AsyncEvent[] signalEvents
           
protected static int SIGNUM
           
static int SIGPIPE
           
static int SIGPOLL
           
static int SIGPROF
           
static int SIGPWR
           
static int SIGQUIT
           
static int SIGSEGV
           
static int SIGSTKFLT
           
static int SIGSTOP
           
static int SIGSYS
           
static int SIGTERM
           
static int SIGTRAP
           
static int SIGTSTP
           
static int SIGTTIN
           
static int SIGTTOU
           
static int SIGUNUSED
           
static int SIGURG
           
static int SIGUSR1
           
static int SIGUSR2
           
static int SIGVTALRM
           
static int SIGWINCH
           
static int SIGXCPU
           
static int SIGXFSZ
           
 
Constructor Summary
POSIXSignalHandler()
          Creates a new POSIXSignalHandler instance.
 
Method Summary
 void addHandler(int signum, AsyncEventHandler handler)
          Adds a handler for the given signal.
protected  void fini()
           
protected  void fireSignal(int signum)
           
protected  void init()
           
protected  void registerNativeHandler(int signum)
           
 void removeHandler(int signum, AsyncEventHandler handler)
          Removes the given handler for the given signal.
 void setHandler(int signum, AsyncEventHandler handler)
          Associate a new handler with the given POSIX signal, removing all existing handlers.
protected  void startDispatching()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SIGHUP

public static final int SIGHUP
See Also:
Constant Field Values

SIGINT

public static final int SIGINT
See Also:
Constant Field Values

SIGQUIT

public static final int SIGQUIT
See Also:
Constant Field Values

SIGILL

public static final int SIGILL
See Also:
Constant Field Values

SIGTRAP

public static final int SIGTRAP
See Also:
Constant Field Values

SIGABRT

public static final int SIGABRT
See Also:
Constant Field Values

SIGIOT

public static final int SIGIOT
See Also:
Constant Field Values

SIGBUS

public static final int SIGBUS
See Also:
Constant Field Values

SIGFPE

public static final int SIGFPE
See Also:
Constant Field Values

SIGKILL

public static final int SIGKILL
See Also:
Constant Field Values

SIGUSR1

public static final int SIGUSR1
See Also:
Constant Field Values

SIGSEGV

public static final int SIGSEGV
See Also:
Constant Field Values

SIGUSR2

public static final int SIGUSR2
See Also:
Constant Field Values

SIGPIPE

public static final int SIGPIPE
See Also:
Constant Field Values

SIGALRM

public static final int SIGALRM
See Also:
Constant Field Values

SIGTERM

public static final int SIGTERM
See Also:
Constant Field Values

SIGSTKFLT

public static final int SIGSTKFLT
See Also:
Constant Field Values

SIGCHLD

public static final int SIGCHLD
See Also:
Constant Field Values

SIGCLD

public static final int SIGCLD
See Also:
Constant Field Values

SIGCONT

public static final int SIGCONT
See Also:
Constant Field Values

SIGSTOP

public static final int SIGSTOP
See Also:
Constant Field Values

SIGTSTP

public static final int SIGTSTP
See Also:
Constant Field Values

SIGTTIN

public static final int SIGTTIN
See Also:
Constant Field Values

SIGTTOU

public static final int SIGTTOU
See Also:
Constant Field Values

SIGURG

public static final int SIGURG
See Also:
Constant Field Values

SIGXCPU

public static final int SIGXCPU
See Also:
Constant Field Values

SIGXFSZ

public static final int SIGXFSZ
See Also:
Constant Field Values

SIGVTALRM

public static final int SIGVTALRM
See Also:
Constant Field Values

SIGPROF

public static final int SIGPROF
See Also:
Constant Field Values

SIGWINCH

public static final int SIGWINCH
See Also:
Constant Field Values

SIGIO

public static final int SIGIO
See Also:
Constant Field Values

SIGPOLL

public static final int SIGPOLL
See Also:
Constant Field Values

SIGPWR

public static final int SIGPWR
See Also:
Constant Field Values

SIGSYS

public static final int SIGSYS
See Also:
Constant Field Values

SIGUNUSED

public static final int SIGUNUSED
See Also:
Constant Field Values

SIGNUM

protected static final int SIGNUM
See Also:
Constant Field Values

SIGMIN

protected static final int SIGMIN
See Also:
Constant Field Values

SIGMAX

protected static final int SIGMAX
See Also:
Constant Field Values

natHandler_

protected gnu.gcj.RawData natHandler_

pipeID_

protected gnu.gcj.RawData pipeID_

enabled_

protected boolean enabled_

signalEvents

protected AsyncEvent[] signalEvents

notificationThread

protected RealtimeThread notificationThread
Constructor Detail

POSIXSignalHandler

public POSIXSignalHandler()
Creates a new POSIXSignalHandler instance.

Method Detail

addHandler

public void addHandler(int signum,
                       AsyncEventHandler handler)
Adds a handler for the given signal.

Parameters:
signum - POSIX signal
handler - The handler that will handle the given signal.

removeHandler

public void removeHandler(int signum,
                          AsyncEventHandler handler)
Removes the given handler for the given signal.

Parameters:
signum - a POSIX signal number
handler - the handler to be removed

setHandler

public void setHandler(int signum,
                       AsyncEventHandler handler)
Associate a new handler with the given POSIX signal, removing all existing handlers. Since this affects the constraints expressed in the release parameters of the existing schedulable objects, this may change the feasibility of the current schedule.

Parameters:
signum - POSIX signal
handler - the new handler

fireSignal

protected final void fireSignal(int signum)

startDispatching

protected void startDispatching()

init

protected void init()

fini

protected void fini()

registerNativeHandler

protected void registerNativeHandler(int signum)


jRate is developed and maintained by the jRate project development team.
Copyright (c) 2001-2005 Angelo Corsaro and Morgan Deters.