Base class for all driver listeners.
This class provides interfaces common to all of the listener classes provided by the Grabba Driver. It is not intended for direct instantiation or subclassing by non-driver code; however, the enable(), disable() and setDelegate() methods are publicly callable when inherited by other classes (e.g. ConnectionListener).
Delegate | Interface class which must be implemented by the delegate |
Thread safety: This class is intended to be thread-safe; any classes deriving from it should ensure that the relevant methods are callable from any thread.
Public Member Functions | |
final void | disable () |
Disable receipt of events from the driver by this object. More... | |
final void | enable () |
Enable receipt of events from the driver by this object. More... | |
final void | setDelegate (Delegate newDelegate) |
Set the delegate which will receive event callbacks if default listener behaviour is not overridden. More... | |
final void disable | ( | ) |
Disable receipt of events from the driver by this object.
This has no effect if the object was already disabled.
final void enable | ( | ) |
Enable receipt of events from the driver by this object.
This has no effect if the object was already enabled.
final void setDelegate | ( | Delegate | newDelegate | ) |
Set the delegate which will receive event callbacks if default listener behaviour is not overridden.
Delegation may alternatively be disabled by providing a null reference here.
newDelegate | If null, disables delegation; if non-null, enables delegation and sets the delegate to the supplied object. |