Skip to content
Success

Changes

Summary

  1. Remove suppressWarning("deprecation") (details)
  2. #933: Add new interfaces to core: Destroyable, Startable and Stoppable (details)
  3. #933: Mark as deprecated for server.(Destroyable, Startable, Stoppable) (details)
  4. #933: Implement Destroyable, Startable and Stoppable for ObjectEnabler (details)
  5. #933: Implement Destroyable, Startable and Stoppable for LwM2mObjectTree (details)
  6. #933: Add an interface `LwM2mClientObserver2` to handle unexpected error (details)
  7. #933: Call `onUnexpectedError()` when unexpected error occurred (details)
  8. #933: destroy LeshanClient on unexpected error. (details)
Commit 1f34ca74f443bbc92859fa1e1a6aa07a1d0d569e by Simon Bernard
Remove suppressWarning("deprecation")

Too many "deprecation" will be hidden, we should probably live with some
warning about backward compatibility.
The file was modified leshan-server-cf/src/main/java/org/eclipse/leshan/server/californium/LeshanServer.java (diff)
The file was modified leshan-server-core/src/main/java/org/eclipse/leshan/server/queue/QueueModeLwM2mRequestSender.java (diff)
The file was modified leshan-server-cf/src/main/java/org/eclipse/leshan/server/californium/request/CaliforniumQueueModeRequestSender.java (diff)
The file was modified leshan-server-core/src/main/java/org/eclipse/leshan/server/request/LwM2mRequestSender2.java (diff)
Commit a60b898e6c0e5234295e893051235caeab7be453 by Simon Bernard
#933: Add new interfaces to core: Destroyable, Startable and Stoppable

Signed-off-by: moznion <moznion@gmail.com>
The file was addedleshan-core/src/main/java/org/eclipse/leshan/core/Stoppable.java
The file was addedleshan-core/src/main/java/org/eclipse/leshan/core/Destroyable.java
The file was addedleshan-core/src/main/java/org/eclipse/leshan/core/Startable.java
Commit 1e9287febac3b64cb22307c8de4a4943a3e1b3ab by Simon Bernard
#933: Mark as deprecated for server.(Destroyable, Startable, Stoppable)

And make a suggestion to use interfaces that are in the `core` package.

Signed-off-by: moznion <moznion@gmail.com>
Also-by: Simon Bernard <sbernard@sierrawireless.com>
The file was modified leshan-server-cf/src/main/java/org/eclipse/leshan/server/californium/LeshanServer.java (diff)
The file was modified leshan-server-cf/src/main/java/org/eclipse/leshan/server/californium/request/CaliforniumQueueModeRequestSender.java (diff)
The file was modified leshan-server-core/src/main/java/org/eclipse/leshan/server/Stoppable.java (diff)
The file was modified leshan-server-core/src/main/java/org/eclipse/leshan/server/Startable.java (diff)
The file was modified leshan-server-cf/src/main/java/org/eclipse/leshan/server/californium/bootstrap/LeshanBootstrapServer.java (diff)
The file was modified leshan-server-core/src/main/java/org/eclipse/leshan/server/Destroyable.java (diff)
Commit 2d21d7c69ae3465c7d8dd16def82db7f88b36094 by Simon Bernard
#933: Implement Destroyable, Startable and Stoppable for ObjectEnabler

To call each interface method on corresponded `LwM2mObjectTree` method.

Signed-off-by: moznion <moznion@gmail.com>
The file was modified leshan-client-core/src/main/java/org/eclipse/leshan/client/resource/ObjectEnabler.java (diff)
The file was modified leshan-client-core/src/main/java/org/eclipse/leshan/client/resource/LwM2mObjectEnabler.java (diff)
Commit aad536f0d33d044a5fb507b3192623ddc80e1bf4 by Simon Bernard
#933: Implement Destroyable, Startable and Stoppable for LwM2mObjectTree

And call each interface's method at related method of `LeshanClient`;
i.e.  `start()`, `stop()` and `destroy()`.

Signed-off-by: moznion <moznion@gmail.com>
The file was modified leshan-client-core/src/main/java/org/eclipse/leshan/client/resource/LwM2mInstanceEnabler.java (diff)
The file was modified leshan-client-core/src/main/java/org/eclipse/leshan/client/resource/LwM2mObjectTree.java (diff)
The file was modified leshan-client-cf/src/main/java/org/eclipse/leshan/client/californium/LeshanClient.java (diff)
Commit 9d5b405f285051173adc0b6e4a2ca9b48cc8640d by Simon Bernard
#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 <moznion@gmail.com>
The file was addedleshan-client-core/src/main/java/org/eclipse/leshan/client/observer/LwM2mClientObserver2.java
The file was modified leshan-client-core/src/main/java/org/eclipse/leshan/client/observer/LwM2mClientObserverDispatcher.java (diff)
The file was modified leshan-client-core/src/main/java/org/eclipse/leshan/client/observer/LwM2mClientObserverAdapter.java (diff)
Commit b2429897b6bff2bcdc2435832f9c725dfcaa1ba8 by Simon Bernard
#933: Call `onUnexpectedError()` when unexpected error occurred

If a task that are belong to `DefaultRegistrationEngine` raises
unexpected `RuntimeException` and the `observer` member variable
implements `LwM2mClientObserver2` (instead of `LwM2mClientObserver`),
it calls `LwM2mClientObserver2#onUnexpectedError()` hook.
The purpose of this hook gimmick is to shutdown the client application
mainly.

Signed-off-by: moznion <moznion@gmail.com>
The file was modified leshan-client-core/src/main/java/org/eclipse/leshan/client/engine/DefaultRegistrationEngine.java (diff)
Commit 6596442df0c358ca0816d0c8ef5a1b759769d867 by Simon Bernard
#933: destroy LeshanClient on unexpected error.

Signed-off-by: moznion <moznion@gmail.com>
Also-by: Simon Bernard <sbernard@sierrawireless.com>
The file was modified leshan-client-cf/src/main/java/org/eclipse/leshan/client/californium/LeshanClient.java (diff)
The file was modified leshan-client-demo/src/main/java/org/eclipse/leshan/client/demo/MyDevice.java (diff)
The file was modified leshan-client-demo/src/main/java/org/eclipse/leshan/client/demo/RandomTemperatureSensor.java (diff)