-/**
- * Generated file
-
- * Generated from: yang module name: opendaylight-sal-dom-broker-impl yang module local name: schema-service-singleton
- * Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
- * Generated at: Wed Nov 20 17:01:31 CET 2013
+/*
+ * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
*
- * Do not modify this file unless it is present under src/main directory
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
*/
package org.opendaylight.controller.config.yang.md.sal.dom.impl;
import org.opendaylight.yangtools.yang.model.api.SchemaServiceListener;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
*
public final class SchemaServiceImplSingletonModule extends
org.opendaylight.controller.config.yang.md.sal.dom.impl.AbstractSchemaServiceImplSingletonModule {
+ private static final Logger LOG = LoggerFactory.getLogger(SchemaServiceImplSingletonModule.class);
+
BundleContext bundleContext;
public SchemaServiceImplSingletonModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,
public void close() throws Exception {
if (delegate != null) {
delegate = null;
- bundleContext.ungetService(reference);
+
+ try {
+ bundleContext.ungetService(reference);
+ } catch (IllegalStateException e) {
+ // Indicates the service was already unregistered which can happen normally
+ // on shutdown.
+ LOG.debug( "Error unregistering service", e );
+ }
+
reference = null;
bundleContext = null;
}
}
+ @Override
public void addModule(Module arg0) {
delegate.addModule(arg0);
}
+ @Override
public SchemaContext getGlobalContext() {
return delegate.getGlobalContext();
}
+ @Override
public SchemaContext getSessionContext() {
return delegate.getSessionContext();
}
+ @Override
public ListenerRegistration<SchemaServiceListener> registerSchemaServiceListener(SchemaServiceListener arg0) {
return delegate.registerSchemaServiceListener(arg0);
}
+ @Override
public void removeModule(Module arg0) {
delegate.removeModule(arg0);
}