package org.opendaylight.controller.config.yang.md.sal.rest.connector;
import org.opendaylight.RestconfWrapperProviders;
+import org.opendaylight.aaa.api.AAAService;
+import org.opendaylight.controller.config.api.osgi.WaitingServiceTracker;
+import org.osgi.framework.BundleContext;
public class RestConnectorModule extends org.opendaylight.controller.config.yang.md.sal.rest.connector.AbstractRestConnectorModule {
private static RestConnectorRuntimeRegistration runtimeRegistration;
+ private BundleContext bundleContext;
+
public RestConnectorModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier, final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
super(identifier, dependencyResolver);
}
@Override
public java.lang.AutoCloseable createInstance() {
+
+ final WaitingServiceTracker<AAAService> aaaServiceWaitingServiceTracker =
+ WaitingServiceTracker.create(AAAService.class, bundleContext);
+ aaaServiceWaitingServiceTracker.waitForService(WaitingServiceTracker.FIVE_MINUTES);
+
final RestconfWrapperProviders wrapperProviders = new RestconfWrapperProviders(getWebsocketPort());
wrapperProviders.registerProviders(getDomBrokerDependency());
return wrapperProviders;
}
+
+ public void setBundleContext(final BundleContext bundleContext) {
+ this.bundleContext = bundleContext;
+ }
}