Class Subscriber


  • public class Subscriber
    extends java.lang.Object
    Request source RLOC in the mapping service with it's properties.
    • Field Detail

      • DEFAULT_SUBSCRIBER_TIMEOUT

        public static final int DEFAULT_SUBSCRIBER_TIMEOUT
    • Constructor Detail

      • Subscriber

        public Subscriber​(SubscriberData subscriberData)
        Constructor.
        Parameters:
        subscriberData - YANG modeled SubscriberData object.
      • Subscriber

        public Subscriber​(Rloc srcRloc,
                          Eid srcEid,
                          int subscriberTtl)
        Constructor.
        Parameters:
        srcRloc - A source RLOC.
        srcEid - A source EID.
        subscriberTtl - Subscriber TTL in min(s).
      • Subscriber

        public Subscriber​(Rloc srcRloc,
                          Eid srcEid,
                          int subscriberTtl,
                          java.util.Date lastRequestDate)
        Constructor.
        Parameters:
        srcRloc - A source RLOC.
        srcEid - A source EID.
        subscriberTtl - Subscriber TTL in min(s).
        lastRequestDate - Last request date for this subscriber.
    • Method Detail

      • getSrcRloc

        public Rloc getSrcRloc()
      • getSrcEid

        public Eid getSrcEid()
      • getLastRequestDate

        public java.util.Date getLastRequestDate()
      • setLastRequestDate

        public void setLastRequestDate​(java.util.Date lastRequestDate)
      • getSubscriberTtl

        public int getSubscriberTtl()
      • setSubscriberTtlByRecordTtl

        public void setSubscriberTtlByRecordTtl​(java.lang.Integer recordTtl)
      • recordTtlToSubscriberTime

        public static int recordTtlToSubscriberTime​(java.lang.Integer recordTtl)
        Static method to calculate the subscriber TTL from a mapping record TTL. If a mapping record TTL is not provided, use the default 1 day TTL. The subscriber TTL is the TTL plus a constant value.
        Parameters:
        recordTtl - The time to live (TTL) value
        Returns:
        the subscriber TTL
      • timedOut

        public boolean timedOut()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

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

        public java.lang.String getString()