X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fforwardingrules-manager%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fforwardingrulesmanager%2Fconsumer%2Fimpl%2FFRMConsumerImpl.java;h=bbe771fd9cc5164c155e71a43196bd36fe50a780;hb=0257afcb76363c43ae6394e8920988c7a8f5d41e;hp=d42e067334491421b3810a5272360875631c263d;hpb=d490a11b531a724b9f46ca931b2c98e9527dde7f;p=controller.git diff --git a/opendaylight/md-sal/forwardingrules-manager/src/main/java/org/opendaylight/controller/forwardingrulesmanager/consumer/impl/FRMConsumerImpl.java b/opendaylight/md-sal/forwardingrules-manager/src/main/java/org/opendaylight/controller/forwardingrulesmanager/consumer/impl/FRMConsumerImpl.java index d42e067334..bbe771fd9c 100644 --- a/opendaylight/md-sal/forwardingrules-manager/src/main/java/org/opendaylight/controller/forwardingrulesmanager/consumer/impl/FRMConsumerImpl.java +++ b/opendaylight/md-sal/forwardingrules-manager/src/main/java/org/opendaylight/controller/forwardingrulesmanager/consumer/impl/FRMConsumerImpl.java @@ -29,14 +29,13 @@ public class FRMConsumerImpl extends AbstractBindingAwareProvider implements Com private static NotificationService notificationService; private FlowConsumerImpl flowImplRef; private GroupConsumerImpl groupImplRef; + private MeterConsumerImpl meterImplRef; private static DataProviderService dataProviderService; - - private static IClusterContainerServices clusterContainerService = null; - private static IContainer container; - - @Override + private static IClusterContainerServices clusterContainerService = null; + private static IContainer container; + + @Override public void onSessionInitiated(ProviderContext session) { - FRMConsumerImpl.p_session = session; if (!getDependentModule()) { @@ -56,7 +55,8 @@ public class FRMConsumerImpl extends AbstractBindingAwareProvider implements Com if (null != dataProviderService) { flowImplRef = new FlowConsumerImpl(); - // groupImplRef = new GroupConsumerImpl(); + groupImplRef = new GroupConsumerImpl(); + meterImplRef = new MeterConsumerImpl(); registerWithOSGIConsole(); } else { logger.error("Data Provider Service is down or NULL. " @@ -99,35 +99,32 @@ public class FRMConsumerImpl extends AbstractBindingAwareProvider implements Com BundleContext bundleContext = FrameworkUtil.getBundle(this.getClass()).getBundleContext(); bundleContext.registerService(CommandProvider.class.getName(), this, null); } - - private boolean getDependentModule() { - do { - clusterContainerService = (IClusterContainerServices) ServiceHelper.getGlobalInstance(IClusterContainerServices.class, this); - try { - Thread.sleep(4); - } catch (InterruptedException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } while(clusterContainerService == null); - - do { - - - container = (IContainer) ServiceHelper.getGlobalInstance(IContainer.class, this); - try { - Thread.sleep(5); - } catch (InterruptedException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } while (container == null); - - - return true; - } - + private boolean getDependentModule() { + do { + clusterContainerService = (IClusterContainerServices) ServiceHelper.getGlobalInstance( + IClusterContainerServices.class, this); + try { + Thread.sleep(4); + } catch (InterruptedException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } while (clusterContainerService == null); + + do { + + container = (IContainer) ServiceHelper.getGlobalInstance(IContainer.class, this); + try { + Thread.sleep(5); + } catch (InterruptedException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } while (container == null); + + return true; + } public static DataProviderService getDataProviderService() { return dataProviderService; @@ -138,9 +135,8 @@ public class FRMConsumerImpl extends AbstractBindingAwareProvider implements Com } public GroupConsumerImpl getGroupImplRef() { - return groupImplRef; + return groupImplRef; } - public static ProviderContext getProviderSession() { return p_session;