org.teleal.cling.registry
Class RegistryImpl
java.lang.Object
org.teleal.cling.registry.RegistryImpl
- All Implemented Interfaces:
- Registry
public class RegistryImpl
- extends Object
- implements Registry
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
configuration
protected final UpnpServiceConfiguration configuration
protocolFactory
protected final ProtocolFactory protocolFactory
registryMaintainer
protected final RegistryMaintainer registryMaintainer
lock
protected final ReentrantLock lock
registryListeners
protected final Set<RegistryListener> registryListeners
resources
protected final Set<Resource> resources
pendingExecutions
protected final List<Runnable> pendingExecutions
remoteItems
protected final org.teleal.cling.registry.RegistryItems<RemoteDevice,RemoteGENASubscription> remoteItems
localItems
protected final org.teleal.cling.registry.RegistryItems<LocalDevice,LocalGENASubscription> localItems
RegistryImpl
public RegistryImpl(UpnpServiceConfiguration configuration,
ProtocolFactory protocolFactory)
getConfiguration
public UpnpServiceConfiguration getConfiguration()
- Specified by:
getConfiguration
in interface Registry
getProtocolFactory
public ProtocolFactory getProtocolFactory()
- Specified by:
getProtocolFactory
in interface Registry
createRegistryMaintainer
protected RegistryMaintainer createRegistryMaintainer()
addListener
public void addListener(RegistryListener listener)
- Specified by:
addListener
in interface Registry
removeListener
public void removeListener(RegistryListener listener)
- Specified by:
removeListener
in interface Registry
getListeners
public Collection<RegistryListener> getListeners()
- Specified by:
getListeners
in interface Registry
addDevice
public LocalDevice addDevice(LocalDevice localDevice)
- Specified by:
addDevice
in interface Registry
addDevice
public RemoteDevice addDevice(RemoteDevice remoteDevice)
- Specified by:
addDevice
in interface Registry
hydrate
public void hydrate(RemoteDevice remoteDevice)
- Specified by:
hydrate
in interface Registry
removeDevice
public void removeDevice(LocalDevice localDevice)
- Specified by:
removeDevice
in interface Registry
removeDevice
public void removeDevice(RemoteDevice remoteDevice)
- Specified by:
removeDevice
in interface Registry
removeAllLocalDevices
public void removeAllLocalDevices()
- Specified by:
removeAllLocalDevices
in interface Registry
removeAllRemoteDevices
public void removeAllRemoteDevices()
- Specified by:
removeAllRemoteDevices
in interface Registry
getDevice
public Device getDevice(UDN udn)
- Specified by:
getDevice
in interface Registry
getLocalDevices
public Collection<LocalDevice> getLocalDevices()
- Specified by:
getLocalDevices
in interface Registry
getRemoteDevices
public Collection<RemoteDevice> getRemoteDevices()
- Specified by:
getRemoteDevices
in interface Registry
getRemoteDevices
public Collection<RemoteDevice> getRemoteDevices(boolean hydratedOnly)
- Specified by:
getRemoteDevices
in interface Registry
getDevices
public Collection<Device> getDevices()
- Specified by:
getDevices
in interface Registry
getDevices
public Collection<Device> getDevices(DeviceType deviceType)
- Specified by:
getDevices
in interface Registry
getDevices
public Collection<Device> getDevices(ServiceType serviceType)
- Specified by:
getDevices
in interface Registry
getDeviceService
public DeviceService getDeviceService(ServiceReference serviceReference)
- Specified by:
getDeviceService
in interface Registry
getResource
public Resource getResource(URI pathQuery)
throws IllegalArgumentException
- Specified by:
getResource
in interface Registry
- Throws:
IllegalArgumentException
getResourceModel
public <T> T getResourceModel(Class<T> modelType,
Resource.Type type,
URI pathQuery)
throws IllegalArgumentException
- Specified by:
getResourceModel
in interface Registry
- Throws:
IllegalArgumentException
addResource
public void addResource(Resource resource)
- Specified by:
addResource
in interface Registry
removeResource
public boolean removeResource(Resource resource)
- Specified by:
removeResource
in interface Registry
getResources
public Collection<Resource> getResources()
- Specified by:
getResources
in interface Registry
addLocalSubscription
public void addLocalSubscription(LocalGENASubscription subscription)
- Specified by:
addLocalSubscription
in interface Registry
getLocalSubscription
public LocalGENASubscription getLocalSubscription(String subscriptionId)
- Specified by:
getLocalSubscription
in interface Registry
updateLocalSubscription
public boolean updateLocalSubscription(LocalGENASubscription subscription)
- Specified by:
updateLocalSubscription
in interface Registry
removeLocalSubscription
public boolean removeLocalSubscription(LocalGENASubscription subscription)
- Specified by:
removeLocalSubscription
in interface Registry
addRemoteSubscription
public void addRemoteSubscription(RemoteGENASubscription subscription)
- Specified by:
addRemoteSubscription
in interface Registry
getRemoteSubscription
public RemoteGENASubscription getRemoteSubscription(String subscriptionId)
- Specified by:
getRemoteSubscription
in interface Registry
updateRemoteSubscription
public void updateRemoteSubscription(RemoteGENASubscription subscription)
- Specified by:
updateRemoteSubscription
in interface Registry
removeRemoteSubscription
public void removeRemoteSubscription(RemoteGENASubscription subscription)
- Specified by:
removeRemoteSubscription
in interface Registry
shutdown
public void shutdown()
- Specified by:
shutdown
in interface Registry
printDebugLog
public void printDebugLog()
Copyright © 2010 Teleal GmbH, Switzerland. All Rights Reserved.