Class RouterAdvertisementPacketBuilder

  • All Implemented Interfaces:
    org.opendaylight.yangtools.concepts.Builder<RouterAdvertisementPacket>, org.opendaylight.yangtools.concepts.CheckedBuilder<RouterAdvertisementPacket,​java.lang.IllegalArgumentException>, org.opendaylight.yangtools.concepts.Mutable, org.opendaylight.yangtools.concepts.MutationBehaviour<org.opendaylight.yangtools.concepts.Mutable>

    @Generated("mdsal-binding-generator")
    public class RouterAdvertisementPacketBuilder
    extends java.lang.Object
    implements org.opendaylight.yangtools.concepts.Builder<RouterAdvertisementPacket>
    Class that builds RouterAdvertisementPacketBuilder instances. Overall design of the class is that of a fluent interface, where method chaining is used.

    In general, this class is supposed to be used like this template:

       
         RouterAdvertisementPacketBuilder createTarget(int fooXyzzy, int barBaz) {
             return new RouterAdvertisementPacketBuilderBuilder()
                 .setFoo(new FooBuilder().setXyzzy(fooXyzzy).build())
                 .setBar(new BarBuilder().setBaz(barBaz).build())
                 .build();
         }
       
     

    This pattern is supported by the immutable nature of RouterAdvertisementPacketBuilder, as instances can be freely passed around without worrying about synchronization issues.

    As a side note: method chaining results in:

    • very efficient Java bytecode, as the method invocation result, in this case the Builder reference, is on the stack, so further method invocations just need to fill method arguments for the next method invocation, which is terminated by build(), which is then returned from the method
    • better understanding by humans, as the scope of mutable state (the builder) is kept to a minimum and is very localized
    • better optimization oportunities, as the object scope is minimized in terms of invocation (rather than method) stack, making escape analysis a lot easier. Given enough compiler (JIT/AOT) prowess, the cost of th builder object can be completely eliminated
    See Also:
    RouterAdvertisementPacketBuilder, Builder
    • Constructor Detail

      • RouterAdvertisementPacketBuilder

        public RouterAdvertisementPacketBuilder()
      • RouterAdvertisementPacketBuilder

        public RouterAdvertisementPacketBuilder​(EthernetHeader arg)
      • RouterAdvertisementPacketBuilder

        public RouterAdvertisementPacketBuilder​(Ipv6Header arg)
      • RouterAdvertisementPacketBuilder

        public RouterAdvertisementPacketBuilder​(Icmp6Header arg)
    • Method Detail

      • fieldsFrom

        public void fieldsFrom​(org.opendaylight.yangtools.yang.binding.DataObject arg)
        Set fields from given grouping argument. Valid argument is instance of one of following types:
        • org.opendaylight.yang.gen.v1.urn.opendaylight.genius.ipv6.nd.packet.rev160620.EthernetHeader
        • org.opendaylight.yang.gen.v1.urn.opendaylight.genius.ipv6.nd.packet.rev160620.Icmp6Header
        • org.opendaylight.yang.gen.v1.urn.opendaylight.genius.ipv6.nd.packet.rev160620.Ipv6Header
        Parameters:
        arg - grouping object
        Throws:
        java.lang.IllegalArgumentException - if given argument is none of valid types or has property with incompatible value
      • getCurHopLimit

        public org.opendaylight.yangtools.yang.common.Uint8 getCurHopLimit()
      • getDestinationIpv6

        public org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address getDestinationIpv6()
      • getDestinationMac

        public org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress getDestinationMac()
      • getEthertype

        public org.opendaylight.yangtools.yang.common.Uint16 getEthertype()
      • getFlags

        public org.opendaylight.yangtools.yang.common.Uint8 getFlags()
      • getFlowLabel

        public org.opendaylight.yangtools.yang.common.Uint32 getFlowLabel()
      • getHopLimit

        public org.opendaylight.yangtools.yang.common.Uint8 getHopLimit()
      • getIcmp6Chksum

        public org.opendaylight.yangtools.yang.common.Uint16 getIcmp6Chksum()
      • getIcmp6Code

        public org.opendaylight.yangtools.yang.common.Uint8 getIcmp6Code()
      • getIcmp6Type

        public org.opendaylight.yangtools.yang.common.Uint8 getIcmp6Type()
      • getIpv6Length

        public org.opendaylight.yangtools.yang.common.Uint16 getIpv6Length()
      • getMtu

        public org.opendaylight.yangtools.yang.common.Uint32 getMtu()
      • getNextHeader

        public org.opendaylight.yangtools.yang.common.Uint8 getNextHeader()
      • getOptionMtu

        public org.opendaylight.yangtools.yang.common.Uint8 getOptionMtu()
      • getOptionMtuLength

        public org.opendaylight.yangtools.yang.common.Uint8 getOptionMtuLength()
      • getOptionSourceAddr

        public org.opendaylight.yangtools.yang.common.Uint8 getOptionSourceAddr()
      • getReachableTime

        public org.opendaylight.yangtools.yang.common.Uint32 getReachableTime()
      • getRetransTime

        public org.opendaylight.yangtools.yang.common.Uint32 getRetransTime()
      • getRouterLifetime

        public org.opendaylight.yangtools.yang.common.Uint16 getRouterLifetime()
      • getSourceAddrLength

        public org.opendaylight.yangtools.yang.common.Uint8 getSourceAddrLength()
      • getSourceIpv6

        public org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address getSourceIpv6()
      • getSourceLlAddress

        public org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress getSourceLlAddress()
      • getSourceMac

        public org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress getSourceMac()
      • getVersion

        public org.opendaylight.yangtools.yang.common.Uint8 getVersion()
      • augmentation

        public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<RouterAdvertisementPacket>> E$$ augmentation​(java.lang.Class<E$$> augmentationType)
      • setCurHopLimit

        @Deprecated(forRemoval=true)
        public RouterAdvertisementPacketBuilder setCurHopLimit​(java.lang.Short value)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Utility migration setter.
        Parameters:
        value - field value in legacy type
        Returns:
        this builder
      • setDestinationIpv6

        public RouterAdvertisementPacketBuilder setDestinationIpv6​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address value)
      • setDestinationMac

        public RouterAdvertisementPacketBuilder setDestinationMac​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress value)
      • setEthertype

        @Deprecated(forRemoval=true)
        public RouterAdvertisementPacketBuilder setEthertype​(java.lang.Integer value)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Utility migration setter.
        Parameters:
        value - field value in legacy type
        Returns:
        this builder
      • setFlags

        @Deprecated(forRemoval=true)
        public RouterAdvertisementPacketBuilder setFlags​(java.lang.Short value)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Use setFlags(Uint8) instead.
        Utility migration setter.
        Parameters:
        value - field value in legacy type
        Returns:
        this builder
      • setFlowLabel

        @Deprecated(forRemoval=true)
        public RouterAdvertisementPacketBuilder setFlowLabel​(java.lang.Long value)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Utility migration setter.
        Parameters:
        value - field value in legacy type
        Returns:
        this builder
      • setHopLimit

        @Deprecated(forRemoval=true)
        public RouterAdvertisementPacketBuilder setHopLimit​(java.lang.Short value)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Use setHopLimit(Uint8) instead.
        Utility migration setter.
        Parameters:
        value - field value in legacy type
        Returns:
        this builder
      • setIcmp6Chksum

        @Deprecated(forRemoval=true)
        public RouterAdvertisementPacketBuilder setIcmp6Chksum​(java.lang.Integer value)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Utility migration setter.
        Parameters:
        value - field value in legacy type
        Returns:
        this builder
      • setIcmp6Code

        @Deprecated(forRemoval=true)
        public RouterAdvertisementPacketBuilder setIcmp6Code​(java.lang.Short value)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Use setIcmp6Code(Uint8) instead.
        Utility migration setter.
        Parameters:
        value - field value in legacy type
        Returns:
        this builder
      • setIcmp6Type

        @Deprecated(forRemoval=true)
        public RouterAdvertisementPacketBuilder setIcmp6Type​(java.lang.Short value)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Use setIcmp6Type(Uint8) instead.
        Utility migration setter.
        Parameters:
        value - field value in legacy type
        Returns:
        this builder
      • setIpv6Length

        @Deprecated(forRemoval=true)
        public RouterAdvertisementPacketBuilder setIpv6Length​(java.lang.Integer value)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Utility migration setter.
        Parameters:
        value - field value in legacy type
        Returns:
        this builder
      • setMtu

        @Deprecated(forRemoval=true)
        public RouterAdvertisementPacketBuilder setMtu​(java.lang.Long value)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Use setMtu(Uint32) instead.
        Utility migration setter.
        Parameters:
        value - field value in legacy type
        Returns:
        this builder
      • setNextHeader

        @Deprecated(forRemoval=true)
        public RouterAdvertisementPacketBuilder setNextHeader​(java.lang.Short value)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Utility migration setter.
        Parameters:
        value - field value in legacy type
        Returns:
        this builder
      • setOptionMtu

        @Deprecated(forRemoval=true)
        public RouterAdvertisementPacketBuilder setOptionMtu​(java.lang.Short value)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Use setOptionMtu(Uint8) instead.
        Utility migration setter.
        Parameters:
        value - field value in legacy type
        Returns:
        this builder
      • setOptionMtuLength

        @Deprecated(forRemoval=true)
        public RouterAdvertisementPacketBuilder setOptionMtuLength​(java.lang.Short value)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Utility migration setter.
        Parameters:
        value - field value in legacy type
        Returns:
        this builder
      • setOptionSourceAddr

        @Deprecated(forRemoval=true)
        public RouterAdvertisementPacketBuilder setOptionSourceAddr​(java.lang.Short value)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Utility migration setter.
        Parameters:
        value - field value in legacy type
        Returns:
        this builder
      • setPrefixList

        @Deprecated(forRemoval=true)
        public RouterAdvertisementPacketBuilder setPrefixList​(java.util.List<PrefixList> values)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Use setPrefixList(Map) instead.
        Utility migration setter. IMPORTANT NOTE: This method does not completely match previous mechanics, as the list is processed as during this method's execution. Any future modifications of the list are NOT reflected in this builder nor its products.
        Parameters:
        values - Legacy List of values
        Returns:
        this builder
        Throws:
        java.lang.IllegalArgumentException - if the list contains entries with the same key
        java.lang.NullPointerException - if the list contains a null entry
      • setReachableTime

        @Deprecated(forRemoval=true)
        public RouterAdvertisementPacketBuilder setReachableTime​(java.lang.Long value)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Utility migration setter.
        Parameters:
        value - field value in legacy type
        Returns:
        this builder
      • setRetransTime

        @Deprecated(forRemoval=true)
        public RouterAdvertisementPacketBuilder setRetransTime​(java.lang.Long value)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Utility migration setter.
        Parameters:
        value - field value in legacy type
        Returns:
        this builder
      • setRouterLifetime

        @Deprecated(forRemoval=true)
        public RouterAdvertisementPacketBuilder setRouterLifetime​(java.lang.Integer value)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Utility migration setter.
        Parameters:
        value - field value in legacy type
        Returns:
        this builder
      • setSourceAddrLength

        @Deprecated(forRemoval=true)
        public RouterAdvertisementPacketBuilder setSourceAddrLength​(java.lang.Short value)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Utility migration setter.
        Parameters:
        value - field value in legacy type
        Returns:
        this builder
      • setSourceIpv6

        public RouterAdvertisementPacketBuilder setSourceIpv6​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address value)
      • setSourceLlAddress

        public RouterAdvertisementPacketBuilder setSourceLlAddress​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress value)
      • setSourceMac

        public RouterAdvertisementPacketBuilder setSourceMac​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress value)
      • setVersion

        @Deprecated(forRemoval=true)
        public RouterAdvertisementPacketBuilder setVersion​(java.lang.Short value)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Use setVersion(Uint8) instead.
        Utility migration setter.
        Parameters:
        value - field value in legacy type
        Returns:
        this builder
      • addAugmentation

        public RouterAdvertisementPacketBuilder addAugmentation​(org.opendaylight.yangtools.yang.binding.Augmentation<RouterAdvertisementPacket> augmentation)
        Add an augmentation to this builder's product.
        Parameters:
        augmentation - augmentation to be added
        Returns:
        this builder
        Throws:
        java.lang.NullPointerException - if augmentation is null
      • removeAugmentation

        public RouterAdvertisementPacketBuilder removeAugmentation​(java.lang.Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<RouterAdvertisementPacket>> augmentationType)
        Remove an augmentation from this builder's product. If this builder does not track such an augmentation type, this method does nothing.
        Parameters:
        augmentationType - augmentation type to be removed
        Returns:
        this builder