- @Deprecated
- synchronized void onDeviceConnected(final SchemaContext initialCtx,
- final DOMDataBroker broker, final RpcProvisionRegistry rpc,
- final NotificationPublishService notificationSerivce) {
-
- Preconditions.checkNotNull(mountService, "Closed");
- Preconditions.checkState(registration == null, "Already initialized");
-
- final DOMMountPointService.DOMMountPointBuilder mountBuilder = mountService.createMountPoint(id.getPath());
- mountBuilder.addInitialSchemaContext(initialCtx);
-
- mountBuilder.addService(DOMDataBroker.class, broker);
- mountBuilder.addService(RpcProvisionRegistry.class, rpc);
- this.notificationSerivce = notificationSerivce;
- mountBuilder.addService(NotificationPublishService.class, notificationSerivce);
-
- registration = mountBuilder.register();
- }
-
- @Deprecated
- synchronized void onDeviceDisconnected() {
- if(registration == null) {
- return;
- }
-
- try {
- registration.close();
- } catch (final Exception e) {
- // Only log and ignore
- logger.warn("Unable to unregister mount instance for {}. Ignoring exception", id.getPath(), e);
- } finally {
- registration = null;
- }
- }
-