|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SignalHandler
A signal handler is an object that is able to receive and act on signals.
A specific signal handler instance may only support a subset of all
registered signals (see Signal.getSignals()
). A signal handler is usually
created by a SignalTarget
. When the handler receives a signal, it should
in most cases notify the target about it. How this is done is up to each
implementation.
Signal handler implementations need to be implemented in a thread safe. Once
they have been registered with a SignalReceiver
they may receive
multiple signals in different threads at the same time.
Method Summary | |
---|---|
Collection<Signal> |
getSupportedSignals()
Get all signals that are supported by this handler. |
void |
handleSignal(Signal signal)
Handle the given signal. |
boolean |
supports(Signal signal)
Check if a given signal is supported. |
Method Detail |
---|
void handleSignal(Signal signal)
signal
- The signal to handle
UnsupportedSignalException
- If the signal is not supportedCollection<Signal> getSupportedSignals()
boolean supports(Signal signal)
signal
- The signal to check
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |