|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.floodlightcontroller.devicemanager.internal.Entity
public class Entity
An entity on the network is a visible trace of a device that corresponds to a packet received from a particular interface on the edge of a network, with a particular VLAN tag, and a particular MAC address, along with any other packet characteristics we might want to consider as helpful for disambiguating devices. Entities are the most basic element of devices; devices consist of one or more entities. Entities are immutable once created, except for the last seen timestamp.
Field Summary | |
---|---|
protected java.util.Date |
activeSince
The time between activeSince and
lastSeenTimestamp is a period of activity for this
entity where it was observed repeatedly. |
protected static int |
ACTIVITY_TIMEOUT
Timeout for computing activeSince . |
protected java.lang.Integer |
ipv4Address
The IP address associated with this entity, or null if no IP learned from the network observation associated with this entity |
protected java.util.Date |
lastSeenTimestamp
The last time we observed this entity on the network |
protected long |
macAddress
The MAC address associated with this entity |
protected java.lang.Long |
switchDPID
The DPID of the switch for the ingress point for this entity, or null if not present |
protected java.lang.Integer |
switchPort
The port number of the switch for the ingress point for this entity, or null if not present |
protected java.lang.Short |
vlan
The VLAN tag on this entity, or null if untagged |
Constructor Summary | |
---|---|
Entity(long macAddress,
java.lang.Short vlan,
java.lang.Integer ipv4Address,
java.lang.Long switchDPID,
java.lang.Integer switchPort,
java.util.Date lastSeenTimestamp)
Create a new entity |
Method Summary | |
---|---|
int |
compareTo(Entity o)
|
boolean |
equals(java.lang.Object obj)
|
java.util.Date |
getActiveSince()
|
java.lang.Integer |
getIpv4Address()
|
java.util.Date |
getLastSeenTimestamp()
|
long |
getMacAddress()
|
java.lang.Long |
getSwitchDPID()
|
java.lang.Integer |
getSwitchPort()
|
java.lang.Short |
getVlan()
|
int |
hashCode()
|
boolean |
hasSwitchPort()
|
void |
setActiveSince(java.util.Date activeSince)
|
void |
setLastSeenTimestamp(java.util.Date lastSeenTimestamp)
Set the last seen timestamp and also update activeSince
if appropriate |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static int ACTIVITY_TIMEOUT
activeSince
.
Entity#activeSince}
protected long macAddress
protected java.lang.Integer ipv4Address
protected java.lang.Short vlan
protected java.lang.Long switchDPID
protected java.lang.Integer switchPort
protected java.util.Date lastSeenTimestamp
protected java.util.Date activeSince
activeSince
and
lastSeenTimestamp
is a period of activity for this
entity where it was observed repeatedly. If, when the entity is
observed, the is longer ago than the activity timeout,
lastSeenTimestamp
and activeSince
will
be set to the current time.
Constructor Detail |
---|
public Entity(long macAddress, java.lang.Short vlan, java.lang.Integer ipv4Address, java.lang.Long switchDPID, java.lang.Integer switchPort, java.util.Date lastSeenTimestamp)
macAddress
- vlan
- ipv4Address
- switchDPID
- switchPort
- lastSeenTimestamp
- Method Detail |
---|
public long getMacAddress()
public java.lang.Integer getIpv4Address()
public java.lang.Short getVlan()
public java.lang.Long getSwitchDPID()
public java.lang.Integer getSwitchPort()
public boolean hasSwitchPort()
public java.util.Date getLastSeenTimestamp()
public void setLastSeenTimestamp(java.util.Date lastSeenTimestamp)
activeSince
if appropriate
lastSeenTimestamp
- the new last seen timestampEntity#activeSince}
public java.util.Date getActiveSince()
public void setActiveSince(java.util.Date activeSince)
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public int compareTo(Entity o)
compareTo
in interface java.lang.Comparable<Entity>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |