Interface NlriRegistry


  • @NonNullByDefault
    public interface NlriRegistry
    The codec registry for BGP NLRI, offers services for NLRI encoding/decoding.
    • Method Detail

      • serializeMpReach

        void serializeMpReach​(MpReachNlri mpReachNlri,
                              io.netty.buffer.ByteBuf byteAggregator)
        Encode BGP MP REACH NLRI Attribute.
        Parameters:
        mpReachNlri - Input reach NLRI.
        byteAggregator - Output buffer.
      • serializeMpUnReach

        void serializeMpUnReach​(MpUnreachNlri mpUnreachNlri,
                                io.netty.buffer.ByteBuf byteAggregator)
        Encode BGP MP UNREACH NLRI Attribute.
        Parameters:
        mpUnreachNlri - Input unreach NLRI.
        byteAggregator - Output buffer.
      • getSerializers

        Iterable<NlriSerializer> getSerializers()
        Get all available NLRI encoders.
        Returns:
        Iterable of NLRI serializers.
      • convertMpReachToMpUnReach

        Optional<MpUnreachNlri> convertMpReachToMpUnReach​(MpReachNlri mpReachNlri,
                                                          @Nullable MpUnreachNlri mpUnreachNlri)
        Convert MP_REACH attribute to MP_UNREACH attribute and merge it with original one if it exists.

        The default implementation rejects the conversion.

        Parameters:
        mpReachNlri - MP_REACH attribute to be converted
        mpUnreachNlri - original MP_UNREACH attribute
        Returns:
        resulting MP_UNREACH attribute after conversion