public abstract class Path<T> extends Observable
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 static boolean |
DEBUG |
protected T |
mData
Local variable keeping the data reference
|
protected Parser<T> |
PARSER
Data parser of type T
|
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(String json)
Convenience method for interpreting json message update to the data path.
|
void |
notifyObservers(Object object)
Deprecated.
|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, setChanged
protected static final boolean DEBUG
protected T mData
public abstract T getData()
protected boolean isClearRequired(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)
@Deprecated public final void notifyObservers(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 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()