private ListenerRegistration<SchemaContextListener> listenerRegistration;
private static TransactionChainHandler transactionChainHandler;
private static DOMDataBroker dataBroker;
+ private static DOMMountPointServiceHandler mountPointServiceHandler;
@Override
public void onSessionInitiated(final ProviderSession session) {
final SchemaContextHandler schemaCtxHandler = new SchemaContextHandler();
this.listenerRegistration = schemaService.registerSchemaContextListener(schemaCtxHandler);
- final DOMMountPointServiceHandler domMountPointServiceHandler = new DOMMountPointServiceHandler(
+ RestConnectorProvider.mountPointServiceHandler = new DOMMountPointServiceHandler(
session.getService(DOMMountPointService.class));
RestConnectorProvider.dataBroker = session.getService(DOMDataBroker.class);
final DOMRpcService rpcService = session.getService(DOMRpcService.class);
final RpcServiceHandler rpcServiceHandler = new RpcServiceHandler(rpcService);
- wrapperServices.setHandlers(schemaCtxHandler, domMountPointServiceHandler,
+ wrapperServices.setHandlers(schemaCtxHandler, RestConnectorProvider.mountPointServiceHandler,
RestConnectorProvider.transactionChainHandler, brokerHandler, rpcServiceHandler);
}
);
}
+ /**
+ * Get current {@link DOMMountPointService} from {@link DOMMountPointServiceHandler}.
+ * @return {@link DOMMountPointService}
+ */
+ public static DOMMountPointService getMountPointService() {
+ return RestConnectorProvider.mountPointServiceHandler.get();
+ }
+
@Override
public Collection<ProviderFunctionality> getProviderFunctionality() {
return Collections.emptySet();