-
Notifications
You must be signed in to change notification settings - Fork 407
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#933: Add an interface
LwM2mClientObserver2
to handle unexpected error
This interface extends `LwM2mClientObserver` interface. And make `LwM2mClientObserverAdapter` and `LwM2mClientObserverDispatcher` implement that new interface. This doesn't break the backward compatibility because `LwM2mClientObserver2` is compatible with `LwM2mClientObserver` and each implementing class conceals the difference between `LwM2mClientObserver` and `LwM2mClientObserver2`. Signed-off-by: moznion <[email protected]>
- Loading branch information
1 parent
aad536f
commit 9d5b405
Showing
3 changed files
with
28 additions
and
2 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
...an-client-core/src/main/java/org/eclipse/leshan/client/observer/LwM2mClientObserver2.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package org.eclipse.leshan.client.observer; | ||
|
||
/** | ||
* An extended interface of {@link LwM2mClientObserver} with handler for unexpected error. | ||
* <p> | ||
* Future plan: Since version 2.0, this interface is going to merge into {@link LwM2mClientObserver}. | ||
* | ||
* @since 1.3 | ||
*/ | ||
public interface LwM2mClientObserver2 extends LwM2mClientObserver { | ||
// ============== Unexpected Error Handling ================= | ||
|
||
void onUnexpectedError(Throwable unexpectedError); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters