de.unikassel.android.sdcframework.util.facade
Interface ObservableEventSource<T extends ObservableEvent>

Package class diagram package ObservableEventSource
Type Parameters:
T - the observed event type extending ObservableEvent
All Superinterfaces:
ObserverRegistration<T>
All Known Subinterfaces:
EventCollector<T>, EventDispatcher<T,U>, SensorDeviceScanner, TransferManager
All Known Implementing Classes:
AbstractEventDispatcherImpl, AbstractSensorDeviceScanner, AccelerometerDeviceScanner, ApplicationPreferenceManagerImpl.DeviceConfigurationChangeEventSource, ApplicationPreferenceManagerImpl.LogLevelConfigurationChangeEventSource, ApplicationPreferenceManagerImpl.ServiceConfigurationChangeEventSource, ApplicationPreferenceManagerImpl.TimeProviderConfigurationChangeEventSource, AudioDeviceScanner, BatteryLowStateObserver, BluetoothDeviceScanner, ContentProviderDeviceScanner, EventCollectorImpl, EventDispatcherImpl, ExternalStorageAvailabilityListener, GPSDeviceScanner, GSMDeviceScanner, GyroscopeDeviceScanner, LightDeviceScanner, Logger, MagneticFieldDeviceScanner, NetworkConnectionObserver, NetworkLocationDeviceScanner, ObservableAlarm, ObservableEventSourceImpl, OrientationDeviceScanner, PassiveSampleTakingDeviceScanner, PressureDeviceScanner, ProximityDeviceScanner, SampleListener, SampleReceivingDeviceScanner, SampleTakingDeviceScanner, TagDeviceScanner, TemperatureDeviceScanner, TimeProvider, TimeProviderDeviceScanner, TransferManagerImpl, TwitterDeviceScanner, WifiDeviceScanner

public interface ObservableEventSource<T extends ObservableEvent>
extends ObserverRegistration<T>

Interface for classes creating observable events * .

Any class in the SDC framework which does act as observable event source must implementing this interface for the observable event types.

Observers for the observable events have to extend the generic event observer class.

See Also:
EventObserver, ObservableEvent, ObservableEventSourceImpl

Method Summary
 boolean hasObservers()
          Test method for observers.
 void notify(T data)
          Does set the changed flag and notifies all observers
 
Methods inherited from interface de.unikassel.android.sdcframework.util.facade.ObserverRegistration
registerEventObserver, removeAllObservers, unregisterEventObserver
 

Method Detail

notify

void notify(T data)
Does set the changed flag and notifies all observers

Parameters:
data - the observable event data to create notifications for

hasObservers

boolean hasObservers()
Test method for observers.

Returns:
true if observers are registered, false otherwise