use of org.eclipse.leshan.core.request.WriteCompositeRequest in project thingsboard by thingsboard.
the class DefaultLwM2mDownlinkMsgHandler method sendWriteCompositeRequest.
@Override
public void sendWriteCompositeRequest(LwM2mClient client, RpcWriteCompositeRequest rpcWriteCompositeRequest, DownlinkRequestCallback<WriteCompositeRequest, WriteCompositeResponse> callback, ContentFormat contentFormatComposite) {
try {
WriteCompositeRequest downlink = new WriteCompositeRequest(contentFormatComposite, rpcWriteCompositeRequest.getNodes());
// TODO: replace config.getTimeout();
sendWriteCompositeRequest(client, downlink, this.config.getTimeout(), callback);
} catch (InvalidRequestException e) {
callback.onValidationError(rpcWriteCompositeRequest.toString(), e.getMessage());
} catch (Exception e) {
callback.onError(toString(rpcWriteCompositeRequest), e);
}
}
Aggregations