use of org.opendaylight.protocol.pcep.spi.PCEPExtensionProviderContext in project bgpcep by opendaylight.
the class ServiceLoaderPCEPExtensionProviderContext method create.
public static PCEPExtensionProviderContext create() {
final PCEPExtensionProviderContext ctx = new SimplePCEPExtensionProviderContext();
final ServiceLoader<PCEPExtensionProviderActivator> loader = ServiceLoader.load(PCEPExtensionProviderActivator.class);
for (final PCEPExtensionProviderActivator a : loader) {
a.start(ctx);
}
return ctx;
}
use of org.opendaylight.protocol.pcep.spi.PCEPExtensionProviderContext in project bgpcep by opendaylight.
the class PCCsBuilder method startActivators.
private static void startActivators() {
final PCCActivator pccActivator = new PCCActivator();
final StatefulActivator stateful = new StatefulActivator();
final SyncOptimizationsActivator optimizationsActivator = new SyncOptimizationsActivator();
final CrabbeInitiatedActivator activator = new CrabbeInitiatedActivator();
final PCEPExtensionProviderContext ctx = ServiceLoaderPCEPExtensionProviderContext.getSingletonInstance();
pccActivator.start(ctx);
stateful.start(ctx);
optimizationsActivator.start(ctx);
activator.start(ctx);
}
use of org.opendaylight.protocol.pcep.spi.PCEPExtensionProviderContext in project bgpcep by opendaylight.
the class ActivatorTest method testStartImplPCEPExtensionProviderContext.
@Test
public void testStartImplPCEPExtensionProviderContext() throws PCEPDeserializerException {
final Activator activator = new Activator(1);
final PCEPExtensionProviderContext ctx = ServiceLoaderPCEPExtensionProviderContext.create();
final List<AutoCloseable> registrations = activator.startImpl(ctx);
Assert.assertEquals(4, registrations.size());
activator.close();
}
Aggregations