Search in sources :

Example 1 with BmpExtensionProviderContext

use of org.opendaylight.protocol.bmp.spi.registry.BmpExtensionProviderContext in project bgpcep by opendaylight.

the class BmpMockTest method setUp.

@Before
public void setUp() {
    final BmpExtensionProviderContext ctx = new SimpleBmpExtensionProviderContext();
    this.bmpActivator = new BmpActivator(ServiceLoaderBGPExtensionProviderContext.getSingletonInstance());
    this.bmpActivator.start(ctx);
    this.bmpDispatcher = new BmpDispatcherImpl(new NioEventLoopGroup(), new NioEventLoopGroup(), ctx.getBmpMessageRegistry(), new DefaultBmpSessionFactory());
}
Also used : BmpExtensionProviderContext(org.opendaylight.protocol.bmp.spi.registry.BmpExtensionProviderContext) SimpleBmpExtensionProviderContext(org.opendaylight.protocol.bmp.spi.registry.SimpleBmpExtensionProviderContext) BmpDispatcherImpl(org.opendaylight.protocol.bmp.impl.BmpDispatcherImpl) SimpleBmpExtensionProviderContext(org.opendaylight.protocol.bmp.spi.registry.SimpleBmpExtensionProviderContext) DefaultBmpSessionFactory(org.opendaylight.protocol.bmp.impl.session.DefaultBmpSessionFactory) NioEventLoopGroup(io.netty.channel.nio.NioEventLoopGroup) BmpActivator(org.opendaylight.protocol.bmp.parser.BmpActivator) Before(org.junit.Before)

Example 2 with BmpExtensionProviderContext

use of org.opendaylight.protocol.bmp.spi.registry.BmpExtensionProviderContext in project bgpcep by opendaylight.

the class BmpMock method initiateMock.

private static BmpMockDispatcher initiateMock(final BmpMockArguments arguments) {
    final BGPExtensionProviderContext bgpCtx = new SimpleBGPExtensionProviderContext();
    final BGPActivator bgpActivator = new BGPActivator();
    bgpActivator.start(bgpCtx);
    final BmpExtensionProviderContext ctx = new SimpleBmpExtensionProviderContext();
    final BmpExtensionProviderActivator bmpActivator = new BmpActivator(bgpCtx);
    bmpActivator.start(ctx);
    return new BmpMockDispatcher(ctx.getBmpMessageRegistry(), new BmpMockSessionFactory(arguments));
}
Also used : BmpExtensionProviderContext(org.opendaylight.protocol.bmp.spi.registry.BmpExtensionProviderContext) SimpleBmpExtensionProviderContext(org.opendaylight.protocol.bmp.spi.registry.SimpleBmpExtensionProviderContext) SimpleBGPExtensionProviderContext(org.opendaylight.protocol.bgp.parser.spi.pojo.SimpleBGPExtensionProviderContext) SimpleBGPExtensionProviderContext(org.opendaylight.protocol.bgp.parser.spi.pojo.SimpleBGPExtensionProviderContext) BGPExtensionProviderContext(org.opendaylight.protocol.bgp.parser.spi.BGPExtensionProviderContext) BGPActivator(org.opendaylight.protocol.bgp.parser.impl.BGPActivator) SimpleBmpExtensionProviderContext(org.opendaylight.protocol.bmp.spi.registry.SimpleBmpExtensionProviderContext) BmpExtensionProviderActivator(org.opendaylight.protocol.bmp.spi.registry.BmpExtensionProviderActivator) BmpActivator(org.opendaylight.protocol.bmp.parser.BmpActivator)

Aggregations

BmpActivator (org.opendaylight.protocol.bmp.parser.BmpActivator)2 BmpExtensionProviderContext (org.opendaylight.protocol.bmp.spi.registry.BmpExtensionProviderContext)2 SimpleBmpExtensionProviderContext (org.opendaylight.protocol.bmp.spi.registry.SimpleBmpExtensionProviderContext)2 NioEventLoopGroup (io.netty.channel.nio.NioEventLoopGroup)1 Before (org.junit.Before)1 BGPActivator (org.opendaylight.protocol.bgp.parser.impl.BGPActivator)1 BGPExtensionProviderContext (org.opendaylight.protocol.bgp.parser.spi.BGPExtensionProviderContext)1 SimpleBGPExtensionProviderContext (org.opendaylight.protocol.bgp.parser.spi.pojo.SimpleBGPExtensionProviderContext)1 BmpDispatcherImpl (org.opendaylight.protocol.bmp.impl.BmpDispatcherImpl)1 DefaultBmpSessionFactory (org.opendaylight.protocol.bmp.impl.session.DefaultBmpSessionFactory)1 BmpExtensionProviderActivator (org.opendaylight.protocol.bmp.spi.registry.BmpExtensionProviderActivator)1