Migrate OSGI compendium reference
[controller.git] / opendaylight / md-sal / sal-binding-api / src / main / java / org / opendaylight / controller / sal / binding / api / AbstractBindingAwareProvider.java
index 20a7c0d779310037372a1a7ae5c4e1c6e8e59043..fdff997467e46014879b1f5c286cdc555775f259 100644 (file)
@@ -1,25 +1,19 @@
+/*
+ * 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.binding.api;
 
-import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
 
-public abstract class AbstractBindingAwareProvider implements BindingAwareProvider, BundleActivator {
-
-    @Override
-    public final void start(BundleContext context) throws Exception {
-            ServiceReference<BindingAwareBroker> brokerRef = context.getServiceReference(BindingAwareBroker.class);
-            BindingAwareBroker broker = context.getService(brokerRef);
-            broker.registerProvider(this, context);
-            startImpl(context);
-    }
-    
-    @Deprecated
-    abstract protected void startImpl(BundleContext context);
-    
+@Deprecated(forRemoval = true)
+public abstract class AbstractBindingAwareProvider extends AbstractBrokerAwareActivator
+        implements BindingAwareProvider {
     @Override
-    public final void stop(BundleContext context) throws Exception {
-            
-            
+    protected final void onBrokerAvailable(BindingAwareBroker broker, BundleContext context) {
+        broker.registerProvider(this, context);
     }
 }