/** * A method called when the session to MD-SAL is closed. It closes * registrations in MD-SAL * Listener with the MD-SAL */ @Override public void close() throws Exception { LOG.info("NcmountProvider Closed"); // Clean up the RPC service registration if (rpcReg != null) { rpcReg.close(); } // Clean up the Data Change Listener registration if (dclReg != null) { dclReg.close(); } }
@SuppressWarnings("unchecked") @Override public java.lang.AutoCloseable createInstance() { final DataBroker dataBroker = getDataBrokerDependency(); DatastoreAccess datastoreAccess = DatastoreAccess.getInstance(dataBroker); ConfigLoader configLoader = new ConfigLoader(datastoreAccess); if (initTopology(datastoreAccess, LogicalDatastoreType.OPERATIONAL) && initTopology(datastoreAccess, LogicalDatastoreType.CONFIGURATION)) { //First run setup from config file configLoader.load(getSxpController()); } NodeIdentityListener listener = new NodeIdentityListener(datastoreAccess); listener.addSubListener( new DomainListener(datastoreAccess).addSubListener(new ConnectionsListener(datastoreAccess)) .addSubListener(new MasterBindingListener(datastoreAccess)) .addSubListener(new DomainFilterListener(datastoreAccess)) .addSubListener(new ConnectionTemplateListener(datastoreAccess))); listener.addSubListener( new PeerGroupListener(datastoreAccess).addSubListener(new FilterListener(datastoreAccess))); dataChangeListenerRegistrations.add(listener.register(dataBroker, LogicalDatastoreType.CONFIGURATION)); dataChangeListenerRegistrations.add(listener.register(dataBroker, LogicalDatastoreType.OPERATIONAL)); rpcRegistration = getRpcRegistryDependency().addRpcImplementation(SxpControllerService.class, new RpcServiceImpl(datastoreAccess)); return () -> { dataChangeListenerRegistrations.forEach(ListenerRegistration<DataTreeChangeListener>::close); rpcRegistration.close(); }; }
@Override public void close() throws Exception { try { if (m_router != null) { m_router.removeRoute(RESOURCE_CONFIG_ROUTE_NAME); } clearConfigContext(); closeListener(); } catch (Exception e) { LOG.error("Failed to remove route"); } if (altoModelConfigService != null) { altoModelConfigService.close(); } if (altoModelNetworkmapService != null) { altoModelNetworkmapService.close(); } if (altoModelCostmapService != null) { altoModelCostmapService.close(); } LOG.info("AltoManualMapsProvider Closed"); }
/** * Implements the close of the service * * @see AutoCloseable#close() */ @SuppressWarnings("nls") @Override public void close() throws Exception { String appName = configurationHelper.getAppcName(); logger.info(Msg.COMPONENT_TERMINATING, appName, "oam"); asyncTaskHelper.close(); if (rpcRegistration != null) { rpcRegistration.close(); } logger.info(Msg.COMPONENT_TERMINATED, appName, "oam"); }
@Override public void close() { this.rpcRegistration.close(); final WriteTransaction dTx = this.txChain.newWriteOnlyTransaction(); dTx.delete(LogicalDatastoreType.CONFIGURATION, this.iid); try { dTx.submit().checkedGet(); } catch (final TransactionCommitFailedException e) { LOG.warn("Failed to clean-up BGP Application RIB.", e); } this.txChain.close(); LOG.info("BGP Application Peer Benchmark Application closed."); }
@Override public void close() throws Exception { if (streamhandlerService != null) { streamhandlerService.close(); } LOG.info("Stream handler provider Closed"); }
@Override public void close() throws Exception { if (this.rpcRegistration != null) { this.rpcRegistration.close(); } }
@Override public void close() throws Exception { if (rpcRegistration != null) { rpcRegistration.close(); } }
@Override public void close() throws Exception { addRpcImplementation.close(); } };
/** * Shutdown the session * @throws Exception general exception if bad things happen */ @Override public void close() throws Exception { if (this.rpcReg != null) { this.rpcReg.close(); } if (db != null) { db.close(); } LOG.info("Session Closed"); }
@Override public void close() throws Exception { LOG.info("AltoSpceProvider Closed!"); if (altoSpceService != null) { altoSpceService.close(); } } }
@Override public void close() throws Exception { LOG.info("UsecpluginProvider Closed"); if (usecpluginService != null) { usecpluginService.close(); } } }
@Override public void close() throws Exception { rpcRegistration.close(); arpManager.close(); s_logger.info("ArpManager Manager Closed"); } }
@Override public void close() throws Exception { if (this.rpcRegistration != null) { this.rpcRegistration.close(); } }
@Override public void close() throws Exception { if (rpcRegistration != null) { rpcRegistration.close(); } }
@Override public void close() throws Exception { if (rpcRegistration != null) { rpcRegistration.close(); } }
@Override public void close() throws Exception { if (rpcRegistration != null) { rpcRegistration.close(); } } }
public void destroy() { for(RpcRegistration<RpcService> reg: rpcRegistrations) { reg.close(); } }
@Override public void close() throws Exception { log.info("Closing provider for " + APP_NAME); if(this.executor != null){ executor.shutdown(); } if(this.rpcRegistration != null){ rpcRegistration.close(); } log.info("Successfully closed provider for " + APP_NAME); }