Package org.onosproject.cpman
Class DefaultControlMessage
- java.lang.Object
-
- org.onosproject.cpman.DefaultControlMessage
-
- All Implemented Interfaces:
ControlMessage
public class DefaultControlMessage extends Object implements ControlMessage
Default control message implementation.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.onosproject.cpman.ControlMessage
ControlMessage.Type
-
-
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(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.String
toString()
ControlMessage.Type
type()
Returns the control message type.
-
-
-
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 typedeviceId
- device identificationload
- control message loadrate
- control message ratecount
- control message counttimestamp
- time stamp of the control message stats
-
-
Method Detail
-
type
public ControlMessage.Type type()
Description copied from interface:ControlMessage
Returns the control message type.- Specified by:
type
in interfaceControlMessage
- Returns:
- control message type
-
deviceId
public DeviceId deviceId()
Description copied from interface:ControlMessage
Returns the device identification.- Specified by:
deviceId
in interfaceControlMessage
- Returns:
- device identification
-
load
public long load()
Description copied from interface:ControlMessage
Returns the latest control message load.- Specified by:
load
in interfaceControlMessage
- Returns:
- control message load
-
rate
public long rate()
Description copied from interface:ControlMessage
Returns the latest control message rate.- Specified by:
rate
in interfaceControlMessage
- Returns:
- control message rate
-
count
public long count()
Description copied from interface:ControlMessage
Returns the latest control message packet count.- Specified by:
count
in interfaceControlMessage
- 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 interfaceControlMessage
- Returns:
- time stamp.
-
-