public abstract class Path<T> extends java.util.Observable implements ObservableTrigger
Used in specific implementation of a data path representing a single source branch. Eg. connectivity state in
ConnectionPath
Modifier and Type | Field and Description |
---|---|
protected T |
data
Local variable keeping the data reference
|
protected static boolean |
DEBUG |
Constructor and Description |
---|
Path() |
Modifier and Type | Method and Description |
---|---|
void |
broadcast()
Will notify all observers that all data has changed on this data path.
|
protected void |
broadcast(T data)
Will notify all observers with the data passed as parameter.
|
protected void |
finalize() |
abstract T |
getData()
Gets the path data in it's current state
|
protected boolean |
isClearRequired(java.lang.String json)
Convenience method for interpreting json message update to the data path.
|
void |
notifyObservers(java.lang.Object object)
Deprecated.
|
void |
trigger()
Triggers an update from an observable
|
protected static final boolean DEBUG
protected T data
public abstract T getData()
protected boolean isClearRequired(java.lang.String json)
It's per protocol definition that data gets cleared if json update arrives as null or string literal 'null'
json
- that gets interpretedWebWidgetListener.msg(String)
,
WebWidgetListener.shouldOverrideUrlLoading(android.webkit.WebView, String)
public void trigger()
ObservableTrigger
trigger
in interface ObservableTrigger
@Deprecated public final void notifyObservers(java.lang.Object object)
broadcast(T data)
to notify your observers.
Parametrized object must be of specified generic type T, or broadcast will be aborted.
notifyObservers
in class java.util.Observable
object
- updateprotected void broadcast(T data)
It will also mark this observable as changed so that Observer receives the update.
data
- to broadcastpublic void broadcast()
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable