-
Notifications
You must be signed in to change notification settings - Fork 408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Notification with Error Code are not supported #1560
Comments
This should fix for Californium endpoint : #1561 But unfortunately, this can not be fix for java-coap yet, see open-coap/java-coap#76 |
I put this log code that I may need again when I will work on java-coap providerserver.getObservationService().addListener(new ObservationListener() {
@Override
public void onResponse(CompositeObservation observation, Registration registration,
ObserveCompositeResponse response) {
System.out.println("==================");
System.out.println("RESPONSE " + response);
System.out.println("==================");
}
@Override
public void onResponse(SingleObservation observation, Registration registration, ObserveResponse response) {
System.out.println("==================");
System.out.println("SINGLE RESPONSE " + response);
System.out.println("==================");
}
@Override
public void onError(Observation observation, Registration registration, Exception error) {
System.out.println("==================");
System.out.println("ERROR " + error);
error.printStackTrace();
System.out.println("==================");
}
@Override
public void newObservation(Observation observation, Registration registration) {
System.out.println("==================");
System.out.println("NEW OBS " + observation.getId());
System.out.println("==================");
}
@Override
public void cancelled(Observation observation) {
System.out.println("==================");
System.out.println("CANCELLED " + observation.getId());
System.out.println("==================");
}
}); |
Issue was closed automatically because I integrated #1561 in Bug for java-coap is still there so I reopen. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Playing leshan-server-demo, I faced :
This happens when an observed node is removed. In that case a last NOT_FOUND notification should be sent.
See RFC7641 - Observing Resources in the Constrained Application Protocol (CoAP) § 3.2. Notifications says :
The text was updated successfully, but these errors were encountered: