Fix typo in match types yang model
[controller.git] / opendaylight / md-sal / sal-binding-api / src / main / java / org / opendaylight / controller / sal / binding / api / AbstractBindingAwareConsumer.java
index a176664ff9e377c129fe367cb50a842904f86118..fc145c8b16e0d9dff7e0c29e480ff5fe9935f4dd 100644 (file)
@@ -1,27 +1,22 @@
+/*
+ * 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.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext;
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceReference;
 
-public abstract class AbstractBindingAwareConsumer implements BindingAwareConsumer,BundleActivator {
+public abstract class AbstractBindingAwareConsumer extends AbstractBrokerAwareActivator implements BindingAwareConsumer {
 
     @Override
-    public final void start(BundleContext context) throws Exception {
-        ServiceReference<BindingAwareBroker> brokerRef = context.getServiceReference(BindingAwareBroker.class);
-        BindingAwareBroker broker = context.getService(brokerRef);
+    protected final void onBrokerAvailable(BindingAwareBroker broker, BundleContext context) {
         broker.registerConsumer(this, context);
-        startImpl(context);
-        //context.ungetService(brokerRef);
-    }
-
-    @Deprecated
-    abstract protected void startImpl(BundleContext context);
-    
-    @Override
-    public final  void stop(BundleContext context) throws Exception {
-        // TODO Auto-generated method stub
-        
     }
 
 }