import org.opendaylight.yangtools.concepts.ListenerRegistration
import org.opendaylight.controller.sal.core.api.RpcRegistrationListener
-public class BrokerImpl implements Broker {
+public class BrokerImpl implements Broker, AutoCloseable {
private static val log = LoggerFactory.getLogger(BrokerImpl);
// Broker Generic Context
private var ExecutorService executor = Executors.newFixedThreadPool(5);
@Property
private var BundleContext bundleContext;
+
+ @Property
+ private var AutoCloseable deactivator;
@Property
private var RpcRouter router;
sessions.remove(consumerContextImpl);
providerSessions.remove(consumerContextImpl);
}
+
+ override close() throws Exception {
+ deactivator?.close();
+ }
+
}