예제 #1
0
 public void unbindUPnPDevice(UPnPDevice device) {
   if (device != null) {
     log.info(
         "DEREGISTERING UPNPDEVICE: "
             + device.getDescriptions(String.valueOf(Locale.getDefault())));
     deviceList.remove(device);
   }
 }
예제 #2
0
 @Reference(
     name = "upnpDevice",
     service = UPnPDevice.class,
     cardinality = ReferenceCardinality.MULTIPLE,
     policy = ReferencePolicy.DYNAMIC)
 public void bindUPnPDevice(UPnPDevice device) {
   log.info(
       "REGISTER DEVICE: "
           + device.getDescriptions(null).get(UPnPDevice.FRIENDLY_NAME)
           + " MODEL: "
           + device.getDescriptions(null).get(UPnPDevice.MODEL_NAME)
           + " DESCRIPTION: "
           + device.getDescriptions(null).get(UPnPDevice.MODEL_DESCRIPTION));
   deviceList.add(device);
   //        String deviceType = (String) device.getDescriptions(null).get("UPnP.device.type");
   //        if(deviceType.equals("urn:schemas-upnp-org:device:BinaryLight:1")) {
   //            subscriber.subscribeEveryDeviceTypeServices(deviceType);
   //        } else if (deviceType.equals("urn:schemas-4thline-com:device:simple-test:1")) {
   //            subscriber.subscribeEveryDeviceTypeServices(deviceType);
   //        }
 }