private void runDiscoveryForThingType(Console console, ThingTypeUID thingTypeUID) { discoveryServiceRegistry.startScan(thingTypeUID, null); }
private void runDiscoveryForBinding(Console console, String bindingId) { discoveryServiceRegistry.startScan(bindingId, null); }
private void runDiscoveryForThingType(Console console, ThingTypeUID thingTypeUID) { discoveryServiceRegistry.startScan(thingTypeUID, null); }
private void runDiscoveryForBinding(Console console, String bindingId) { discoveryServiceRegistry.startScan(bindingId, null); }
@POST @Path("/bindings/{bindingId}/scan") @Produces(MediaType.TEXT_PLAIN) @ApiOperation(value = "Starts asynchronous discovery process for a binding and returns the timeout in seconds of the discovery operation.", response = Integer.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = Integer.class) }) public Response scan(@PathParam("bindingId") @ApiParam(value = "bindingId") final String bindingId) { discoveryServiceRegistry.startScan(bindingId, new ScanListener() { @Override public void onErrorOccurred(Exception exception) { logger.error("Error occurred while scanning for binding '{}': {}", bindingId, exception.getMessage(), exception); } @Override public void onFinished() { logger.debug("Scan for binding '{}' successfully finished.", bindingId); } }); return Response.ok(discoveryServiceRegistry.getMaxScanTimeout(bindingId)).build(); }