org.teleal.cling.model
Class DefaultServiceManager<T>
java.lang.Object
org.teleal.cling.model.DefaultServiceManager<T>
- All Implemented Interfaces:
- ServiceManager<T>
public class DefaultServiceManager<T>
- extends Object
- implements ServiceManager<T>
- Author:
- Christian Bauer
service
protected final LocalService<T> service
serviceClass
protected final Class<T> serviceClass
lock
protected final ReentrantLock lock
serviceImpl
protected T serviceImpl
propertyChangeSupport
protected PropertyChangeSupport propertyChangeSupport
DefaultServiceManager
protected DefaultServiceManager(DeviceService<LocalService<T>> deviceService)
DefaultServiceManager
protected DefaultServiceManager(LocalService<T> service)
DefaultServiceManager
public DefaultServiceManager(LocalService<T> service,
Class<T> serviceClass)
lock
protected void lock()
unlock
protected void unlock()
getLockTimeoutMillis
protected int getLockTimeoutMillis()
getService
public LocalService<T> getService()
- Specified by:
getService
in interface ServiceManager<T>
getImplementation
public T getImplementation()
- Specified by:
getImplementation
in interface ServiceManager<T>
getPropertyChangeSupport
public PropertyChangeSupport getPropertyChangeSupport()
- Specified by:
getPropertyChangeSupport
in interface ServiceManager<T>
execute
public void execute(Command<T> cmd)
throws Exception
- Specified by:
execute
in interface ServiceManager<T>
- Throws:
Exception
readEventedStateVariableValues
public List<StateVariableValue> readEventedStateVariableValues()
throws Exception
- Specified by:
readEventedStateVariableValues
in interface ServiceManager<T>
- Throws:
Exception
init
protected void init()
createServiceInstance
protected T createServiceInstance()
throws Exception
- Throws:
Exception
createPropertyChangeSupport
protected PropertyChangeSupport createPropertyChangeSupport(T serviceImpl)
throws Exception
- Throws:
Exception
createPropertyChangeListener
protected PropertyChangeListener createPropertyChangeListener(T serviceImpl)
throws Exception
- Throws:
Exception
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2010 Teleal GmbH, Switzerland. All Rights Reserved.