public class LinkInfoDTO extends Object implements LinkInfo, Serializable
LinkInfo, representing the link status
and the time of discovery of a layer 2 link in the network.
Instances of this class are mutable and hence not thread-safe.
| Constructor and Description |
|---|
LinkInfoDTO(long unicastDiscoveryTime,
long multicastDiscoveryTime,
Set<PortState> srcPortState,
Set<PortState> dstPortState)
Creates a DTO representing the link status and the time of discovery
of a layer 2 link in the network.
|
| Modifier and Type | Method and Description |
|---|---|
Set<PortState> |
dstPortState()
Returns the state of the destination port of the associated link.
|
boolean |
equals(Object obj) |
int |
hashCode() |
long |
multicastDiscoveryTime()
Returns the time at which the direct link was discovered by means other
than standard LLDP packet.
|
Set<PortState> |
srcPortState()
Returns the state of the source port of the associated link.
|
String |
toKeyString() |
String |
toString() |
Link.Type |
type()
Returns the type of the associated link, i.e.
|
long |
unicastDiscoveryTime()
Returns the time at which the direct link was discovered.
|
void |
updateDstPortState(Set<PortState> dstPortState)
Updates the state of the destination port of the associated link.
|
void |
updateMulticastDiscoveryTime(long multicastDiscoveryTime)
Updates the time at which the direct link was discovered by means other
than standard LLDP packet, with the specified value.
|
void |
updateSrcPortState(Set<PortState> srcPortState)
Updates the state of the source port of the associated link.
|
void |
updateUnicastDiscoveryTime(long unicastDiscoveryTime)
Updates the time at which the direct link was discovered with the
specified value.
|
static LinkInfoDTO |
valueOf(String str) |
public LinkInfoDTO(long unicastDiscoveryTime,
long multicastDiscoveryTime,
Set<PortState> srcPortState,
Set<PortState> dstPortState)
unicastDiscoveryTime - the time at which the direct link was
discoveredmulticastDiscoveryTime - the time at which the direct link was
discovered by means other than standard LLDP packetsrcPortState - the state of the source port of the associated linkdstPortState - the state of the destination port of the associated
linkNullPointerException - if srcPortState or dstPortState is nullpublic long unicastDiscoveryTime()
LinkInfoThe term unicast may be slightly misleading here; the standard LLDP destination MAC address that is currently used is a multicast address, however since this address is specified in the standard, we expect all switches to absorb the standard packet, thus making the standard LLDP packet describe only one link.
unicastDiscoveryTime in interface LinkInfopublic long multicastDiscoveryTime()
LinkInfomulticastDiscoveryTime in interface LinkInfopublic Set<PortState> srcPortState()
LinkInfosrcPortState in interface LinkInfopublic Set<PortState> dstPortState()
LinkInfodstPortState in interface LinkInfopublic Link.Type type()
LinkInfopublic String toKeyString()
public static LinkInfoDTO valueOf(String str)
public void updateUnicastDiscoveryTime(long unicastDiscoveryTime)
LinkInfoupdateUnicastDiscoveryTime in interface LinkInfounicastDiscoveryTime - the time of discovery to setpublic void updateMulticastDiscoveryTime(long multicastDiscoveryTime)
LinkInfoupdateMulticastDiscoveryTime in interface LinkInfomulticastDiscoveryTime - the time of discovery to setpublic void updateSrcPortState(Set<PortState> srcPortState)
LinkInfoupdateSrcPortState in interface LinkInfosrcPortState - the state of the source portpublic void updateDstPortState(Set<PortState> dstPortState)
LinkInfoupdateDstPortState in interface LinkInfodstPortState - the state of the destination portCopyright © 2014. All Rights Reserved.