Search in sources :

Example 1 with BGPKeepAliveMessageParser

use of org.opendaylight.protocol.bgp.parser.impl.message.BGPKeepAliveMessageParser in project bgpcep by opendaylight.

the class BGPActivator method registerMessageParsers.

private static void registerMessageParsers(final List<AutoCloseable> regs, final BGPExtensionProviderContext context) {
    final BGPOpenMessageParser omp = new BGPOpenMessageParser(context.getParameterRegistry());
    regs.add(context.registerMessageParser(BGPOpenMessageParser.TYPE, omp));
    regs.add(context.registerMessageSerializer(Open.class, omp));
    final BGPUpdateMessageParser ump = new BGPUpdateMessageParser(context.getAttributeRegistry());
    regs.add(context.registerMessageParser(BGPUpdateMessageParser.TYPE, ump));
    regs.add(context.registerMessageSerializer(Update.class, ump));
    final BGPNotificationMessageParser nmp = new BGPNotificationMessageParser();
    regs.add(context.registerMessageParser(BGPNotificationMessageParser.TYPE, nmp));
    regs.add(context.registerMessageSerializer(Notify.class, nmp));
    final BGPKeepAliveMessageParser kamp = new BGPKeepAliveMessageParser();
    regs.add(context.registerMessageParser(BGPKeepAliveMessageParser.TYPE, kamp));
    regs.add(context.registerMessageSerializer(Keepalive.class, kamp));
    final AddressFamilyRegistry afiReg = context.getAddressFamilyRegistry();
    final SubsequentAddressFamilyRegistry safiReg = context.getSubsequentAddressFamilyRegistry();
    final BGPRouteRefreshMessageParser rrmp = new BGPRouteRefreshMessageParser(afiReg, safiReg);
    regs.add(context.registerMessageParser(BGPRouteRefreshMessageParser.TYPE, rrmp));
    regs.add(context.registerMessageSerializer(RouteRefresh.class, rrmp));
}
Also used : BGPOpenMessageParser(org.opendaylight.protocol.bgp.parser.impl.message.BGPOpenMessageParser) BGPNotificationMessageParser(org.opendaylight.protocol.bgp.parser.impl.message.BGPNotificationMessageParser) AddressFamilyRegistry(org.opendaylight.protocol.bgp.parser.spi.AddressFamilyRegistry) SubsequentAddressFamilyRegistry(org.opendaylight.protocol.bgp.parser.spi.SubsequentAddressFamilyRegistry) BGPUpdateMessageParser(org.opendaylight.protocol.bgp.parser.impl.message.BGPUpdateMessageParser) Notify(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.Notify) BGPRouteRefreshMessageParser(org.opendaylight.protocol.bgp.parser.impl.message.BGPRouteRefreshMessageParser) SubsequentAddressFamilyRegistry(org.opendaylight.protocol.bgp.parser.spi.SubsequentAddressFamilyRegistry) BGPKeepAliveMessageParser(org.opendaylight.protocol.bgp.parser.impl.message.BGPKeepAliveMessageParser) RouteRefresh(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev171207.RouteRefresh) Keepalive(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.Keepalive) Update(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.Update) Open(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.Open)

Aggregations

BGPKeepAliveMessageParser (org.opendaylight.protocol.bgp.parser.impl.message.BGPKeepAliveMessageParser)1 BGPNotificationMessageParser (org.opendaylight.protocol.bgp.parser.impl.message.BGPNotificationMessageParser)1 BGPOpenMessageParser (org.opendaylight.protocol.bgp.parser.impl.message.BGPOpenMessageParser)1 BGPRouteRefreshMessageParser (org.opendaylight.protocol.bgp.parser.impl.message.BGPRouteRefreshMessageParser)1 BGPUpdateMessageParser (org.opendaylight.protocol.bgp.parser.impl.message.BGPUpdateMessageParser)1 AddressFamilyRegistry (org.opendaylight.protocol.bgp.parser.spi.AddressFamilyRegistry)1 SubsequentAddressFamilyRegistry (org.opendaylight.protocol.bgp.parser.spi.SubsequentAddressFamilyRegistry)1 Keepalive (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.Keepalive)1 Notify (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.Notify)1 Open (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.Open)1 Update (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.Update)1 RouteRefresh (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev171207.RouteRefresh)1