public class LastChangeAwareServiceManager<T extends LastChangeDelegator> extends DefaultServiceManager<T>
When a GENA subscription is made on your AVTransport/RenderingControl service, you have to read the initial state of the service. Usually 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.
DefaultServiceManager.DefaultPropertyChangeListener| Modifier and Type | Field and Description |
|---|---|
protected LastChangeParser |
lastChangeParser |
lock, propertyChangeSupport, service, serviceClass, serviceImplEVENTED_STATE_VARIABLES| Constructor and Description |
|---|
LastChangeAwareServiceManager(LocalService<T> localService,
Class<T> serviceClass,
LastChangeParser lastChangeParser) |
LastChangeAwareServiceManager(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<StateVariableValue> |
readInitialEventedStateVariableValues() |
createPropertyChangeListener, createPropertyChangeSupport, createServiceInstance, execute, getCurrentState, getCurrentState, getImplementation, getLockTimeoutMillis, getPropertyChangeSupport, getService, init, lock, toString, unlockprotected final LastChangeParser lastChangeParser
public LastChangeAwareServiceManager(LocalService<T> localService, LastChangeParser lastChangeParser)
public LastChangeAwareServiceManager(LocalService<T> localService, Class<T> serviceClass, LastChangeParser lastChangeParser)
protected LastChangeParser getLastChangeParser()
public void fireLastChange()
protected Collection<StateVariableValue> readInitialEventedStateVariableValues() throws Exception
readInitialEventedStateVariableValues in class DefaultServiceManager<T extends LastChangeDelegator>ExceptionCopyright © 2023 jUPnP.org. All rights reserved.