use of org.thingsboard.server.gen.transport.TransportProtos.GetSnmpDevicesResponseMsg in project thingsboard by thingsboard.
the class DefaultTransportApiService method handle.
private ListenableFuture<TransportApiResponseMsg> handle(GetSnmpDevicesRequestMsg requestMsg) {
PageLink pageLink = new PageLink(requestMsg.getPageSize(), requestMsg.getPage());
PageData<UUID> result = deviceService.findDevicesIdsByDeviceProfileTransportType(DeviceTransportType.SNMP, pageLink);
GetSnmpDevicesResponseMsg responseMsg = GetSnmpDevicesResponseMsg.newBuilder().addAllIds(result.getData().stream().map(UUID::toString).collect(Collectors.toList())).setHasNextPage(result.hasNext()).build();
return Futures.immediateFuture(TransportApiResponseMsg.newBuilder().setSnmpDevicesResponseMsg(responseMsg).build());
}
Aggregations