|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.basedb.core.signal.AbstractSignalHandler
public abstract class AbstractSignalHandler
An abstract base class for signal handler implementations. This
class will help an implementor of the SignalHandler
interface
to provide information about supported signals. The easiest way is to
use the AbstractSignalHandler(Collection)
constructor.
Field Summary | |
---|---|
private Set<Signal> |
supported
Holds the supported signals. |
Constructor Summary | |
---|---|
protected |
AbstractSignalHandler()
Create a new signal handler, that initially doesn't support any signals at all. |
protected |
AbstractSignalHandler(Collection<Signal> supported)
Create a new signal handler that supports the given signals. |
Method Summary | |
---|---|
protected void |
addSignal(Signal signal)
Add a signal to the list of supported signals. |
Collection<Signal> |
getSupportedSignals()
Get all signals that are supported by this handler. |
protected void |
removeSignal(Signal signal)
Remove a signal from the list of supported signals. |
boolean |
supports(Signal signal)
Check if a given signal is supported. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sf.basedb.core.signal.SignalHandler |
---|
handleSignal |
Field Detail |
---|
private Set<Signal> supported
Constructor Detail |
---|
protected AbstractSignalHandler()
protected AbstractSignalHandler(Collection<Signal> supported)
supported
- A collection with the signals that are initially supported.
More signals can be added with addSignal(Signal)
Method Detail |
---|
public Collection<Signal> getSupportedSignals()
SignalHandler
getSupportedSignals
in interface SignalHandler
public boolean supports(Signal signal)
SignalHandler
supports
in interface SignalHandler
signal
- The signal to check
protected void addSignal(Signal signal)
signal
- The signal to addprotected void removeSignal(Signal signal)
signal
- The signal to remove
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |