1 package org.opendaylight.yang.gen.v1.config.aaa.authn.h2.store.rev151128;
3 import org.opendaylight.aaa.api.IIDMStore;
4 import org.opendaylight.aaa.h2.persistence.H2Store;
5 import org.osgi.framework.BundleContext;
6 import org.osgi.framework.ServiceRegistration;
7 import org.slf4j.Logger;
8 import org.slf4j.LoggerFactory;
10 public class AAAH2StoreModule extends org.opendaylight.yang.gen.v1.config.aaa.authn.h2.store.rev151128.AbstractAAAH2StoreModule {
12 private BundleContext bundleContext;
13 private static final Logger LOG = LoggerFactory.getLogger(AAAH2StoreModule.class);
15 public AAAH2StoreModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
16 super(identifier, dependencyResolver);
19 public AAAH2StoreModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.yang.gen.v1.config.aaa.authn.h2.store.rev151128.AAAH2StoreModule oldModule, java.lang.AutoCloseable oldInstance) {
20 super(identifier, dependencyResolver, oldModule, oldInstance);
24 public java.lang.AutoCloseable createInstance() {
25 final H2Store h2Store = new H2Store();
26 final ServiceRegistration<?> serviceRegistration = bundleContext.registerService(IIDMStore.class.getName(), h2Store, null);
27 LOG.info("AAA H2 Store Initialized");
28 return new AutoCloseable() {
30 public void close() throws Exception {
31 serviceRegistration.unregister();
37 * @param bundleContext
39 public void setBundleContext(BundleContext bundleContext) {
40 this.bundleContext = bundleContext;
44 * @return the bundleContext
46 public BundleContext getBundleContext() {