org.teleal.cling.model
Class DefaultServiceManager<T>

java.lang.Object
  extended by org.teleal.cling.model.ServiceManager<T>
      extended by org.teleal.cling.model.DefaultServiceManager<T>

public class DefaultServiceManager<T>
extends ServiceManager<T>

Author:
Christian Bauer

Field Summary
protected  LocalService<T> service
           
protected  Class<T> serviceClass
           
protected  T serviceImpl
           
protected  ServiceState<T> state
           
 
Constructor Summary
protected DefaultServiceManager(DeviceService<LocalService<T>> deviceService)
           
protected DefaultServiceManager(LocalService<T> service)
           
  DefaultServiceManager(LocalService<T> service, Class<T> serviceClass)
           
 
Method Summary
protected  PropertyChangeSupport createPropertyChangeSupport(T serviceImpl)
           
 void executeLocked(Command<T> cmd)
           
 T getImplementation()
           
protected  int getLockTimeoutMillis()
           
 LocalService<T> getService()
           
 Class<T> getServiceClass()
           
 ServiceState<T> getState()
           
protected  void initialize()
           
static
<T> DeviceService<LocalService<T>>
newDeviceService(DeviceService<LocalService<T>> deviceService, Class<T> clazz)
           
static
<T> DeviceService<LocalService<T>>
newDeviceService(LocalServiceBinder binder, Class<T> clazz)
           
protected  T newInstance()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

service

protected final LocalService<T> service

serviceClass

protected final Class<T> serviceClass

serviceImpl

protected T serviceImpl

state

protected ServiceState<T> state
Constructor Detail

DefaultServiceManager

protected DefaultServiceManager(DeviceService<LocalService<T>> deviceService)

DefaultServiceManager

protected DefaultServiceManager(LocalService<T> service)

DefaultServiceManager

public DefaultServiceManager(LocalService<T> service,
                             Class<T> serviceClass)
Method Detail

getService

public LocalService<T> getService()
Specified by:
getService in class ServiceManager<T>

getServiceClass

public Class<T> getServiceClass()

getState

public ServiceState<T> getState()
Specified by:
getState in class ServiceManager<T>

getImplementation

public T getImplementation()
Specified by:
getImplementation in class ServiceManager<T>

initialize

protected void initialize()

newInstance

protected T newInstance()
                 throws Exception
Throws:
Exception

createPropertyChangeSupport

protected PropertyChangeSupport createPropertyChangeSupport(T serviceImpl)
                                                     throws Exception
Throws:
Exception

executeLocked

public void executeLocked(Command<T> cmd)
                   throws Exception
Specified by:
executeLocked in class ServiceManager<T>
Throws:
Exception

getLockTimeoutMillis

protected int getLockTimeoutMillis()

newDeviceService

public static <T> DeviceService<LocalService<T>> newDeviceService(LocalServiceBinder binder,
                                                                  Class<T> clazz)

newDeviceService

public static <T> DeviceService<LocalService<T>> newDeviceService(DeviceService<LocalService<T>> deviceService,
                                                                  Class<T> clazz)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2010 Teleal GmbH, Switzerland. All Rights Reserved.