Search in sources :

Example 1 with ReadCompositeRequest

use of org.eclipse.leshan.core.request.ReadCompositeRequest in project thingsboard by thingsboard.

the class DefaultLwM2mDownlinkMsgHandler method sendReadCompositeRequest.

@Override
public void sendReadCompositeRequest(LwM2mClient client, TbLwM2MReadCompositeRequest request, DownlinkRequestCallback<ReadCompositeRequest, ReadCompositeResponse> callback, ContentFormat compositeContentFormat) {
    try {
        ReadCompositeRequest downlink = new ReadCompositeRequest(compositeContentFormat, compositeContentFormat, request.getObjectIds());
        sendCompositeRequest(client, downlink, this.config.getTimeout(), callback);
    } catch (InvalidRequestException e) {
        callback.onValidationError(request.toString(), e.getMessage());
    }
}
Also used : InvalidRequestException(org.eclipse.leshan.core.request.exception.InvalidRequestException) TbLwM2MReadCompositeRequest(org.thingsboard.server.transport.lwm2m.server.downlink.composite.TbLwM2MReadCompositeRequest) ReadCompositeRequest(org.eclipse.leshan.core.request.ReadCompositeRequest)

Aggregations

ReadCompositeRequest (org.eclipse.leshan.core.request.ReadCompositeRequest)1 InvalidRequestException (org.eclipse.leshan.core.request.exception.InvalidRequestException)1 TbLwM2MReadCompositeRequest (org.thingsboard.server.transport.lwm2m.server.downlink.composite.TbLwM2MReadCompositeRequest)1