use of org.thingsboard.server.transport.coap.callback.ToServerRpcSyncSessionCallback in project thingsboard by thingsboard.
the class CoapTransportResource method handleToServerRpcRequest.
private void handleToServerRpcRequest(TbCoapClientState clientState, CoapExchange exchange, Request request) throws AdaptorException {
TransportProtos.SessionInfoProto sessionInfo = clients.getNewSyncSession(clientState);
UUID sessionId = toSessionId(sessionInfo);
transportService.registerSyncSession(sessionInfo, new ToServerRpcSyncSessionCallback(clientState, exchange, request), timeout);
transportService.process(sessionInfo, clientState.getAdaptor().convertToServerRpcRequest(sessionId, request), new CoapNoOpCallback(exchange));
}
Aggregations