Class DefaultControlMessage

  • All Implemented Interfaces:
    ControlMessage

    public class DefaultControlMessage
    extends java.lang.Object
    implements ControlMessage
    Default control message implementation.
    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultControlMessage​(ControlMessage.Type type, DeviceId deviceId, long load, long rate, long count, long timestamp)
      Generates a control message instance using given type and statistic information.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long count()
      Returns the latest control message packet count.
      DeviceId deviceId()
      Returns the device identification.
      boolean equals​(java.lang.Object obj)  
      int hashCode()  
      long load()
      Returns the latest control message load.
      long rate()
      Returns the latest control message rate.
      long timestamp()
      Returns the time that this control message stats collected.
      java.lang.String toString()  
      ControlMessage.Type type()
      Returns the control message type.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • DefaultControlMessage

        public DefaultControlMessage​(ControlMessage.Type type,
                                     DeviceId deviceId,
                                     long load,
                                     long rate,
                                     long count,
                                     long timestamp)
        Generates a control message instance using given type and statistic information.
        Parameters:
        type - control message type
        deviceId - device identification
        load - control message load
        rate - control message rate
        count - control message count
        timestamp - time stamp of the control message stats
    • Method Detail

      • load

        public long load()
        Description copied from interface: ControlMessage
        Returns the latest control message load.
        Specified by:
        load in interface ControlMessage
        Returns:
        control message load
      • rate

        public long rate()
        Description copied from interface: ControlMessage
        Returns the latest control message rate.
        Specified by:
        rate in interface ControlMessage
        Returns:
        control message rate
      • count

        public long count()
        Description copied from interface: ControlMessage
        Returns the latest control message packet count.
        Specified by:
        count in interface ControlMessage
        Returns:
        packet count
      • timestamp

        public long timestamp()
        Description copied from interface: ControlMessage
        Returns the time that this control message stats collected.
        Specified by:
        timestamp in interface ControlMessage
        Returns:
        time stamp.
      • 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