コード例 #1
0
 @Override
 public void onResponse(final Response coapResponse) {
   LOG.debug("Received coap response: {}", coapResponse);
   try {
     final T lwM2mResponseT = buildResponse(coapResponse);
     if (lwM2mResponseT != null) {
       responseCallback.onResponse(lwM2mResponseT);
     }
   } catch (final Exception e) {
     errorCallback.onError(e);
   } finally {
     coapRequest.removeMessageObserver(this);
   }
 }
コード例 #2
0
 @Override
 public void onReject() {
   errorCallback.onError(new RequestFailedException("Reject request"));
 }
コード例 #3
0
 @Override
 public void onCancel() {
   errorCallback.onError(new RequestFailedException("Canceled request"));
 }
コード例 #4
0
 @Override
 public void onTimeout() {
   errorCallback.onError(new org.eclipse.leshan.core.request.exception.TimeoutException());
 }