jvermillard / leshan

OMA Lightweight M2M java implementation - LWM2M
40 stars 25 forks source link

Add startable, stopable, destroyable interface for registry #56

Closed sbernard31 closed 9 years ago

sbernard31 commented 9 years ago

In Leshan Server, we have some crapy code

 // start client registry
if (clientRegistry instanceof ClientRegistryImpl) {
     ((ClientRegistryImpl) clientRegistry).start();
}

Maybe, a good way to remove this kind of code is to propose 3 interface Startable, Stopable and Destroyable, which could be implemented by registries if needed. LeshanServer could start, stop or/and destroy it when needed.

sbernard31 commented 9 years ago

Integrated in master