YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.upnp.server.events.ObservableLastChange Class Reference

A LastChange that tells a listener whenever a value was put into it. More...

Inheritance diagram for de.yaacc.upnp.server.events.ObservableLastChange:
Inheritance graph
Collaboration diagram for de.yaacc.upnp.server.events.ObservableLastChange:
Collaboration graph

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 ()
 

Detailed Description

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.

Member Function Documentation

◆ forgetPutValues()

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.

◆ setChangeListener()

void de.yaacc.upnp.server.events.ObservableLastChange.setChangeListener ( Runnable listener)
Parameters
listenercalled after values were put into this LastChange; null for none

◆ setEventedValue()

synchronized void de.yaacc.upnp.server.events.ObservableLastChange.setEventedValue ( UnsignedIntegerFourBytes instanceID,
EventedValue... ev )

The documentation for this class was generated from the following file: