Class NeighborSolicitationPacketBuilder

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

    public class NeighborSolicitationPacketBuilder
    extends java.lang.Object
    implements org.opendaylight.yangtools.concepts.Builder<NeighborSolicitationPacket>
    Class that builds NeighborSolicitationPacketBuilder 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:

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

    This pattern is supported by the immutable nature of NeighborSolicitationPacketBuilder, 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:
    NeighborSolicitationPacketBuilder, Builder
    • Constructor Detail

      • NeighborSolicitationPacketBuilder

        public NeighborSolicitationPacketBuilder()
      • NeighborSolicitationPacketBuilder

        public NeighborSolicitationPacketBuilder​(EthernetHeader arg)
      • NeighborSolicitationPacketBuilder

        public NeighborSolicitationPacketBuilder​(Ipv6Header arg)
      • NeighborSolicitationPacketBuilder

        public NeighborSolicitationPacketBuilder​(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
      • 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()
      • 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()
      • getNextHeader

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

        public org.opendaylight.yangtools.yang.common.Uint8 getOptionType()
      • getReserved

        public org.opendaylight.yangtools.yang.common.Uint32 getReserved()
      • 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()
      • getTargetIpAddress

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

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

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

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

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

        @Deprecated(forRemoval=true)
        public NeighborSolicitationPacketBuilder setEthertype​(java.lang.Integer value)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Use {#link setEthertype(Uint16)} instead.
        Utility migration setter.
        Parameters:
        value - field value in legacy type
        Returns:
        this builder
      • setFlowLabel

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

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

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

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

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

        @Deprecated(forRemoval=true)
        public NeighborSolicitationPacketBuilder setIpv6Length​(java.lang.Integer value)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Use {#link setIpv6Length(Uint16)} instead.
        Utility migration setter.
        Parameters:
        value - field value in legacy type
        Returns:
        this builder
      • setNextHeader

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

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

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

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

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

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

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

        public NeighborSolicitationPacketBuilder setTargetIpAddress​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address value)
      • setVersion

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