|
3.1.1: 2012-03-29 | ||||||||
| 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
|
3.1.1: 2012-03-29 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||