synchronized public LocalDevice getLocalDevice(UDN udn, boolean rootOnly) { return localItems.get(udn, rootOnly); }
boolean remove(final LocalDevice localDevice, boolean shuttingDown) throws RegistrationException { LocalDevice registeredDevice = get(localDevice.getIdentity().getUdn(), true); if (registeredDevice != null) {
boolean remove(final LocalDevice localDevice, boolean shuttingDown) throws RegistrationException { LocalDevice registeredDevice = get(localDevice.getIdentity().getUdn(), true); if (registeredDevice != null) {
synchronized public Collection<LocalDevice> getLocalDevices() { return Collections.unmodifiableCollection(localItems.get()); }
synchronized public Collection<Device> getDevices() { Set all = new HashSet<>(); all.addAll(localItems.get()); all.addAll(remoteItems.get()); return Collections.unmodifiableCollection(all); }
synchronized public Collection<Device> getDevices(ServiceType serviceType) { Collection<Device> devices = new HashSet<>(); devices.addAll(localItems.get(serviceType)); devices.addAll(remoteItems.get(serviceType)); return Collections.unmodifiableCollection(devices); }
synchronized public Collection<Device> getDevices(DeviceType deviceType) { Collection<Device> devices = new HashSet<>(); devices.addAll(localItems.get(deviceType)); devices.addAll(remoteItems.get(deviceType)); return Collections.unmodifiableCollection(devices); }
synchronized public Device getDevice(UDN udn, boolean rootOnly) { Device device; if ((device = localItems.get(udn, rootOnly)) != null) return device; if ((device = remoteItems.get(udn, rootOnly)) != null) return device; return null; }
public void printDebugLog() { if (log.isLoggable(Level.FINE)) { log.fine("==================================== REMOTE ================================================"); for (RemoteDevice remoteDevice : remoteItems.get()) { log.fine(remoteDevice.toString()); } log.fine("==================================== LOCAL ================================================"); for (LocalDevice localDevice : localItems.get()) { log.fine(localDevice.toString()); } log.fine("==================================== RESOURCES ================================================"); for (RegistryItem<URI, Resource> resourceItem : resourceItems) { log.fine(resourceItem.toString()); } log.fine("================================================================================================="); } }
synchronized public LocalDevice getLocalDevice(UDN udn, boolean rootOnly) { return localItems.get(udn, rootOnly); }
synchronized public Collection<LocalDevice> getLocalDevices() { return Collections.unmodifiableCollection(localItems.get()); }
synchronized public Device getDevice(UDN udn, boolean rootOnly) { Device device; if ((device = localItems.get(udn, rootOnly)) != null) return device; if ((device = remoteItems.get(udn, rootOnly)) != null) return device; return null; }
synchronized public Collection<Device> getDevices(ServiceType serviceType) { Collection<Device> devices = new HashSet(); devices.addAll(localItems.get(serviceType)); devices.addAll(remoteItems.get(serviceType)); return Collections.unmodifiableCollection(devices); }
synchronized public Collection<Device> getDevices() { Set all = new HashSet(); all.addAll(localItems.get()); all.addAll(remoteItems.get()); return Collections.unmodifiableCollection(all); }
synchronized public Collection<Device> getDevices(DeviceType deviceType) { Collection<Device> devices = new HashSet(); devices.addAll(localItems.get(deviceType)); devices.addAll(remoteItems.get(deviceType)); return Collections.unmodifiableCollection(devices); }
public void printDebugLog() { if (log.isLoggable(Level.FINE)) { log.fine("==================================== REMOTE ================================================"); for (RemoteDevice remoteDevice : remoteItems.get()) { log.fine(remoteDevice.toString()); } log.fine("==================================== LOCAL ================================================"); for (LocalDevice localDevice : localItems.get()) { log.fine(localDevice.toString()); } log.fine("==================================== RESOURCES ================================================"); for (RegistryItem<URI, Resource> resourceItem : resourceItems) { log.fine(resourceItem.toString()); } log.fine("================================================================================================="); } }
synchronized public Collection<Device> getDevices(ServiceType serviceType) { Collection<Device> devices = new HashSet<>(); devices.addAll(localItems.get(serviceType)); devices.addAll(remoteItems.get(serviceType)); return Collections.unmodifiableCollection(devices); }