class RemoveRequestHandler extends AbstractRemoveRequestHandler {

   @Override
   public MessageBody handleMessage(PlatformMessage message) throws Exception {
      logger.info("received a remove device request: {}", message);

      MessageBody body = message.getValue();
      Long duration = DeviceCapability.RemoveRequest.getTimeout(body);
      if (duration == null) {
         duration = DEFAULT_REMOVE_DURATION;
      }
      
      Device device = loadDevice(message);
      if(device.isLost()) {
         service.delete(device);
         return
            RemoveResponse
               .builder()
               .withMode(RemoveResponse.MODE_CLOUD) // hub doesn't beep
               .withSteps(PairingRemovalUtils.createDefaultRemovalStep(device.getName(), false))
               .build();
      }
      else {
         sendRemoveRequest(device, duration, false);
         return
               RemoveResponse
                  .builder()
                  .withMode(determineMode(device))
                  .withSteps(loadSteps(device))
                  .build();
      }
   }

   @Inject public  RemoveRequestHandler(
         DeviceDAO deviceDao,
         DeviceService service,
         PlaceDAO placeDao,
         ProductLoader productLoader,
         PlatformMessageBus platformBus,
         Set<GroovyDriverPlugin> plugins
   );

}