private SalRegistrationManager registrationManager;
+ /**
+ * Initialization of services and msgSpy counter
+ */
+ public void initialization() {
+ messageCountProvider = new MessageSpyCounterImpl();
+ this.registerProvider();
+ }
+
/**
* @param switchConnectionProvider
*/
/**
* register providers for md-sal
*/
- public void registerProvider() {
- // TODO : create normal init
- messageCountProvider = new MessageSpyCounterImpl();
+ private void registerProvider() {
if(hasAllDependencies()) {
this.broker.registerProvider(this,context);
}
}
+
public MessageCountDumper getMessageCountDumper() {
return messageCountProvider;
}
*
*/
public final class ConfigurableOpenFlowProviderModule extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflow.common.config.impl.rev140326.AbstractConfigurableOpenFlowProviderModule {
-
+
private OpenflowPluginProvider pluginProvider;
private BundleContext bundleContext;
-
+
/**
* @param identifier
* @param dependencyResolver
pluginProvider.setContext(bundleContext);
pluginProvider.setBroker(getBindingAwareBrokerDependency());
pluginProvider.setSwitchConnectionProviders(getOpenflowSwitchConnectionProviderDependency());
- pluginProvider.registerProvider();
+ pluginProvider.initialization();
return pluginProvider;
}
-
+
/**
* @param bundleContext the bundleContext to set, see {@link OpenflowPluginProvider#setContext(BundleContext)}
- *
- * @deprecated we should avoid osgi specific stuff .. once,
+ *
+ * @deprecated we should avoid osgi specific stuff .. once,
*/
@Deprecated
public void setBundleContext(BundleContext bundleContext) {
@Override
public void customValidation() {
- /* OpenflowPluginProvider provides MessageCountDumper implementation, so it can not be null */
- if (getOpenflowPluginProviderDependency() == null) {
- throw new IllegalStateException("OpenflowPluginProvider is not accessible!");
- }
+ // No need to validate dependencies, since all dependencies are mandatory
+ // config-subsystem will perform the validation
}
@Override