X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-restconf-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Frestconf%2Fbroker%2Fosgi%2FActivator.java;fp=opendaylight%2Fmd-sal%2Fsal-restconf-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Frestconf%2Fbroker%2Fosgi%2FActivator.java;h=0000000000000000000000000000000000000000;hp=13535ee8d51c24d1170fc89c39a7923259e972b2;hb=9a6c1e8cd34eb965c167842553c54e3f72621dc9;hpb=aeabf761ca043e41eeca6333bc9deb94b1de9ed0 diff --git a/opendaylight/md-sal/sal-restconf-broker/src/main/java/org/opendaylight/controller/sal/restconf/broker/osgi/Activator.java b/opendaylight/md-sal/sal-restconf-broker/src/main/java/org/opendaylight/controller/sal/restconf/broker/osgi/Activator.java deleted file mode 100644 index 13535ee8d5..0000000000 --- a/opendaylight/md-sal/sal-restconf-broker/src/main/java/org/opendaylight/controller/sal/restconf/broker/osgi/Activator.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. - * - * 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.sal.restconf.broker.osgi; - -import java.util.Hashtable; -import javassist.ClassPool; -import org.opendaylight.yangtools.sal.binding.generator.impl.RuntimeGeneratedMappingServiceImpl; -import org.opendaylight.yangtools.yang.data.impl.codec.BindingIndependentMappingService; -import org.osgi.framework.BundleActivator; -import org.osgi.framework.BundleContext; -import org.osgi.framework.ServiceRegistration; - -public class Activator implements BundleActivator { - - private ServiceRegistration mappingReg; - - @Override - public void start(BundleContext context) throws Exception { - RuntimeGeneratedMappingServiceImpl service = new RuntimeGeneratedMappingServiceImpl(); - service.setPool(new ClassPool()); - service.init(); - startRuntimeMappingService(service, context); - } - - private void startRuntimeMappingService(RuntimeGeneratedMappingServiceImpl service, BundleContext context) { - Hashtable properties = new Hashtable(); - mappingReg = context.registerService(BindingIndependentMappingService.class, service, properties); - } - - @Override - public void stop(BundleContext context) throws Exception { - if(mappingReg != null) { - mappingReg.unregister(); - } - } -}