Class PIMJoinPrune

    • Constructor Detail

      • PIMJoinPrune

        public PIMJoinPrune()
    • Method Detail

      • getHoldTime

        public short getHoldTime()
        Get the J/P hold time.
        Returns:
        specified in seconds.
      • setHoldTime

        public void setHoldTime​(short holdTime)
        Set the J/P holdtime in seconds.
        Parameters:
        holdTime - return the holdtime.
      • getUpstreamAddr

        public PIMAddrUnicast getUpstreamAddr()
        Get the upstreamAddr for this J/P request.
        Returns:
        the upstream address.
      • setUpstreamAddr

        public void setUpstreamAddr​(PIMAddrUnicast upstr)
        Set the upstream address of this PIM J/P request.
        Parameters:
        upstr - the PIM Upstream unicast address
      • getJoinPrunes

        public java.util.Collection<PIMJoinPruneGroup> getJoinPrunes()
        Get the JoinPrune Group with all the joins and prunes.
        Returns:
        the joinPruneGroup collection
      • addJoinPrune

        public void addJoinPrune​(java.lang.String saddr,
                                 java.lang.String gaddr,
                                 boolean join)
        Add the specified s,g to join field.
        Parameters:
        saddr - the source address of the route
        gaddr - the group address of the route
        join - true for a join, false for a prune.
      • addJoinPrune

        public void addJoinPrune​(IpPrefix spfx,
                                 IpPrefix gpfx,
                                 boolean join)
        Add the specified S, G to the join field.
        Parameters:
        spfx - the source prefix of the route
        gpfx - the group prefix of the route
        join - true for join, false for prune
      • addJoin

        public void addJoin​(java.lang.String saddr,
                            java.lang.String gaddr)
        Add a join given strings represending the source and group addresses.
        Parameters:
        saddr - source address
        gaddr - group address
      • addPrune

        public void addPrune​(java.lang.String saddr,
                             java.lang.String gaddr)
        Add a prune given strings represending the source and group addresses.
        Parameters:
        saddr - source address
        gaddr - group address
      • serialize

        public byte[] serialize()
        Sets all payloads parent packet if applicable, then serializes this packet and all payloads.
        Returns:
        a byte[] containing this packet and payloads
      • deserializer

        public static Deserializer<PIMJoinPrune> deserializer()
        Return the J/P deserializer function.
        Returns:
        a function that will deserialize a J/P message.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object