|
YAACC - UPNP Client and Server
|
A LastChange that tells a listener whenever a value was put into it.
More...


Public Member Functions | |
| ObservableLastChange (LastChangeParser parser) | |
| void | setChangeListener (Runnable listener) |
| synchronized void | setEventedValue (UnsignedIntegerFourBytes instanceID, EventedValue... ev) |
| synchronized void | forgetPutValues () |
| Forget which values were put last: the next value is a change again. | |
Public Member Functions inherited from org.fourthline.cling.support.lastchange.LastChange | |
| LastChange (String s) | |
| LastChange (LastChangeParser parser, Event event) | |
| LastChange (LastChangeParser parser) | |
| LastChange (LastChangeParser parser, String xml) throws Exception | |
| synchronized void | reset () |
| synchronized void | setEventedValue (int instanceID, EventedValue... ev) |
| synchronized UnsignedIntegerFourBytes[] | getInstanceIDs () |
| synchronized void | fire (PropertyChangeSupport propertyChangeSupport) |
| synchronized String | toString () |
A LastChange that tells a listener whenever a value was put into it.
Cling collects the changes of the AVTransport and RenderingControl services in the LastChange but only sends them to the subscribers when somebody calls fire; this is the hook that lets the service do that after every change, wherever it comes from (a state of the state machine, a SetPlayMode, a button at a player, SetMute, the volume keys).
A value that equals the one put last is no change. It is neither collected nor reported to the listener, so a state that is entered again (Stop while stopped, Play while playing) or a volume callback that finds the same volume does not cause an event. What was put last is also what every subscriber knows: it got the state when it subscribed and every change since.
The listener is called while the LastChange is locked, so it must only schedule work and never block.
| synchronized void de.yaacc.upnp.server.events.ObservableLastChange.forgetPutValues | ( | ) |
Forget which values were put last: the next value is a change again.
For when collected changes were dropped without being sent, so the subscribers do not know them.
| void de.yaacc.upnp.server.events.ObservableLastChange.setChangeListener | ( | Runnable | listener | ) |
| listener | called after values were put into this LastChange; null for none |
| synchronized void de.yaacc.upnp.server.events.ObservableLastChange.setEventedValue | ( | UnsignedIntegerFourBytes | instanceID, |
| EventedValue... | ev ) |
Reimplemented from org.fourthline.cling.support.lastchange.LastChange.