b90bd2388604af2a19dcce14331fc7c3df46ca91
[controller.git] / opendaylight / sal / yang-prototype / sal / sal-binding-api / src / main / java / org / opendaylight / controller / sal / binding / api / AbstractBindingAwareConsumer.java
1 package org.opendaylight.controller.sal.binding.api;
2
3 import org.osgi.framework.BundleActivator;
4 import org.osgi.framework.BundleContext;
5 import org.osgi.framework.ServiceReference;
6
7 public abstract class AbstractBindingAwareConsumer implements BindingAwareConsumer,BundleActivator {
8
9     @Override
10     public final void start(BundleContext context) throws Exception {
11         ServiceReference<BindingAwareBroker> brokerRef = context.getServiceReference(BindingAwareBroker.class);
12         BindingAwareBroker broker = context.getService(brokerRef);
13         broker.registerConsumer(this, context);
14         //context.ungetService(brokerRef);
15     }
16
17     @Override
18     public final  void stop(BundleContext context) throws Exception {
19         // TODO Auto-generated method stub
20         
21     }
22
23 }