com.h3c.sdn.common

## Interface LinkInfo

- All Known Implementing Classes:
    LinkInfoDTO

      public interface LinkInfo

  Represents the link status and the time of discovery of a layer 2 link in the network. The implementation is mutable and hence not thread-safe.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Set<PortState>` | `dstPortState()` Returns the state of the destination port of the associated link.
    `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.
    `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> portState)` 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> portState)` 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.

- - ### Method Detail

    - #### unicastDiscoveryTime

          long unicastDiscoveryTime()

      Returns the time at which the direct link was discovered.

      The 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.

      Returns:
        the time of discovery of the associated link

    - #### multicastDiscoveryTime

          long multicastDiscoveryTime()

      Returns the time at which the direct link was discovered by means other than standard LLDP packet. For example, from a BDDP packet.
      Returns:
        the time of discovery of the associated link

    - #### srcPortState

          Set<PortState> srcPortState()

      Returns the state of the source port of the associated link.
      Returns:
        the state of the source port

    - #### dstPortState

          Set<PortState> dstPortState()

      Returns the state of the destination port of the associated link.
      Returns:
        the state of the destination port

    - #### type

          Link.Type type()

      Returns the type of the associated link, i.e. a direct link, multi-hop link or a tunnel.
      Returns:
        the type of the associated link

    - #### updateUnicastDiscoveryTime

          void updateUnicastDiscoveryTime(long unicastDiscoveryTime)

      Updates the time at which the direct link was discovered with the specified value.
      Parameters:
        `unicastDiscoveryTime` - the time of discovery to set

    - #### updateMulticastDiscoveryTime

          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.
      Parameters:
        `multicastDiscoveryTime` - the time of discovery to set

    - #### updateSrcPortState

          void updateSrcPortState(Set<PortState> portState)

      Updates the state of the source port of the associated link.
      Parameters:
        `portState` - the state of the source port
      Throws:
        `NullPointerException` - if portState is null

    - #### updateDstPortState

          void updateDstPortState(Set<PortState> portState)

      Updates the state of the destination port of the associated link.
      Parameters:
        `portState` - the state of the destination port
      Throws:
        `NullPointerException` - if portState is null

Copyright © 2014. All Rights Reserved.