public class LastChangeAwareServiceManager<T extends LastChangeDelegator>
extends org.fourthline.cling.model.DefaultServiceManager<T>
When a GENA subscription is made on your AVTransport/RenderingControl service, you have to read the initial state of the service. Ususally Cling would do this for you and simply access all the state variables of your service behind the scenes. But the AVTransport/RenderingControl service doesn't use regular UPnP state variable eventing internally, they rely on the awful "LastChange" mechanism for their "logical" instances.
Use this ServiceManager
instead of the default one for
these services.
Modifier and Type | Field and Description |
---|---|
protected LastChangeParser |
lastChangeParser |
Constructor and Description |
---|
LastChangeAwareServiceManager(org.fourthline.cling.model.meta.LocalService<T> localService,
Class<T> serviceClass,
LastChangeParser lastChangeParser) |
LastChangeAwareServiceManager(org.fourthline.cling.model.meta.LocalService<T> localService,
LastChangeParser lastChangeParser) |
Modifier and Type | Method and Description |
---|---|
void |
fireLastChange()
Call this method to propagate all accumulated "LastChange" values to GENA subscribers.
|
protected LastChangeParser |
getLastChangeParser() |
protected Collection<org.fourthline.cling.model.state.StateVariableValue> |
readInitialEventedStateVariableValues() |
createPropertyChangeListener, createPropertyChangeSupport, createServiceInstance, execute, getCurrentState, getCurrentState, getImplementation, getLockTimeoutMillis, getPropertyChangeSupport, getService, init, lock, toString, unlock
protected final LastChangeParser lastChangeParser
public LastChangeAwareServiceManager(org.fourthline.cling.model.meta.LocalService<T> localService, LastChangeParser lastChangeParser)
public LastChangeAwareServiceManager(org.fourthline.cling.model.meta.LocalService<T> localService, Class<T> serviceClass, LastChangeParser lastChangeParser)
protected LastChangeParser getLastChangeParser()
public void fireLastChange()
protected Collection<org.fourthline.cling.model.state.StateVariableValue> readInitialEventedStateVariableValues() throws Exception
readInitialEventedStateVariableValues
in class org.fourthline.cling.model.DefaultServiceManager<T extends LastChangeDelegator>
Exception
Copyright © 2016 4th Line GmbH, Switzerland. All rights reserved.