org.teleal.cling.registry
Class RegistryImpl

java.lang.Object
  extended by org.teleal.cling.registry.RegistryImpl
All Implemented Interfaces:
Registry

public class RegistryImpl
extends java.lang.Object
implements Registry


Field Summary
protected  UpnpServiceConfiguration configuration
           
protected  org.teleal.cling.registry.LocalItems localItems
           
protected  java.util.List<java.lang.Runnable> pendingExecutions
           
protected  ProtocolFactory protocolFactory
           
protected  java.util.Set<RegistryListener> registryListeners
           
protected  RegistryMaintainer registryMaintainer
           
protected  org.teleal.cling.registry.RemoteItems remoteItems
           
protected  java.util.Set<Resource> resources
           
 
Constructor Summary
RegistryImpl(UpnpServiceConfiguration configuration, ProtocolFactory protocolFactory)
           
 
Method Summary
 void addDevice(LocalDevice localDevice)
           
 void addDevice(RemoteDevice remoteDevice)
           
 void addListener(RegistryListener listener)
           
 void addLocalSubscription(LocalGENASubscription subscription)
           
 void addRemoteSubscription(RemoteGENASubscription subscription)
           
 void addResource(Resource resource)
           
protected  RegistryMaintainer createRegistryMaintainer()
           
 UpnpServiceConfiguration getConfiguration()
           
 Device getDevice(UDN udn, boolean rootOnly)
           
 java.util.Collection<Device> getDevices()
           
 java.util.Collection<Device> getDevices(DeviceType deviceType)
           
 java.util.Collection<Device> getDevices(ServiceType serviceType)
           
 DeviceService getDeviceService(ServiceReference serviceReference)
           
 java.util.Collection<RegistryListener> getListeners()
           
 LocalDevice getLocalDevice(UDN udn, boolean rootOnly)
           
 java.util.Collection<LocalDevice> getLocalDevices()
           
 LocalGENASubscription getLocalSubscription(java.lang.String subscriptionId)
           
 ProtocolFactory getProtocolFactory()
           
 RemoteDevice getRemoteDevice(UDN udn, boolean rootOnly)
           
 java.util.Collection<RemoteDevice> getRemoteDevices()
           
 RemoteGENASubscription getRemoteSubscription(java.lang.String subscriptionId)
           
 Resource getResource(java.net.URI pathQuery)
           
<T> T
getResourceModel(java.lang.Class<T> modelType, Resource.Type type, java.net.URI pathQuery)
           
 java.util.Collection<Resource> getResources()
           
 void printDebugLog()
           
 void removeAllLocalDevices()
           
 void removeAllRemoteDevices()
           
 boolean removeDevice(LocalDevice localDevice)
           
 boolean removeDevice(RemoteDevice remoteDevice)
           
 boolean removeDevice(UDN udn)
           
 void removeListener(RegistryListener listener)
           
 boolean removeLocalSubscription(LocalGENASubscription subscription)
           
 void removeRemoteSubscription(RemoteGENASubscription subscription)
           
 boolean removeResource(Resource resource)
           
 void shutdown()
           
 boolean update(RemoteDeviceIdentity rdIdentity)
           
 boolean updateLocalSubscription(LocalGENASubscription subscription)
           
 void updateRemoteSubscription(RemoteGENASubscription subscription)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

configuration

protected final UpnpServiceConfiguration configuration

protocolFactory

protected final ProtocolFactory protocolFactory

registryMaintainer

protected final RegistryMaintainer registryMaintainer

registryListeners

protected final java.util.Set<RegistryListener> registryListeners

resources

protected final java.util.Set<Resource> resources

pendingExecutions

protected final java.util.List<java.lang.Runnable> pendingExecutions

remoteItems

protected final org.teleal.cling.registry.RemoteItems remoteItems

localItems

protected final org.teleal.cling.registry.LocalItems localItems
Constructor Detail

RegistryImpl

public RegistryImpl(UpnpServiceConfiguration configuration,
                    ProtocolFactory protocolFactory)
Method Detail

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 java.util.Collection<RegistryListener> getListeners()
Specified by:
getListeners in interface Registry

addDevice

public void addDevice(LocalDevice localDevice)
Specified by:
addDevice in interface Registry

addDevice

public void addDevice(RemoteDevice remoteDevice)
Specified by:
addDevice in interface Registry

update

public boolean update(RemoteDeviceIdentity rdIdentity)
Specified by:
update in interface Registry

removeDevice

public boolean removeDevice(LocalDevice localDevice)
Specified by:
removeDevice in interface Registry

removeDevice

public boolean 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

removeDevice

public boolean removeDevice(UDN udn)
Specified by:
removeDevice in interface Registry

getDevice

public Device getDevice(UDN udn,
                        boolean rootOnly)
Specified by:
getDevice in interface Registry

getLocalDevice

public LocalDevice getLocalDevice(UDN udn,
                                  boolean rootOnly)
Specified by:
getLocalDevice in interface Registry

getRemoteDevice

public RemoteDevice getRemoteDevice(UDN udn,
                                    boolean rootOnly)
Specified by:
getRemoteDevice in interface Registry

getLocalDevices

public java.util.Collection<LocalDevice> getLocalDevices()
Specified by:
getLocalDevices in interface Registry

getRemoteDevices

public java.util.Collection<RemoteDevice> getRemoteDevices()
Specified by:
getRemoteDevices in interface Registry

getDevices

public java.util.Collection<Device> getDevices()
Specified by:
getDevices in interface Registry

getDevices

public java.util.Collection<Device> getDevices(DeviceType deviceType)
Specified by:
getDevices in interface Registry

getDevices

public java.util.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(java.net.URI pathQuery)
                     throws java.lang.IllegalArgumentException
Specified by:
getResource in interface Registry
Throws:
java.lang.IllegalArgumentException

getResourceModel

public <T> T getResourceModel(java.lang.Class<T> modelType,
                              Resource.Type type,
                              java.net.URI pathQuery)
                   throws java.lang.IllegalArgumentException
Specified by:
getResourceModel in interface Registry
Throws:
java.lang.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 java.util.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(java.lang.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(java.lang.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.