Class Interface

All Implemented Interfaces:
NodeComponent, ZoneMember

public class Interface extends GenericObject implements ZoneMember, NodeComponent
Network interface object
  • Field Details

  • Constructor Details

    • Interface

      public Interface(NXCPMessage msg, NXCSession session)
      Create from NXCP message.
      Parameters:
      msg - NXCP message
      session - owning client session
  • Method Details

    • getParentNode

      public AbstractNode getParentNode()
      Description copied from interface: NodeComponent
      Get parent node object.
      Specified by:
      getParentNode in interface NodeComponent
      Returns:
      parent node object or null if it is not exist or inaccessible
      See Also:
    • getIfIndex

      public int getIfIndex()
      Returns:
      Interface index
    • getIfType

      public int getIfType()
      Returns:
      Interface type
    • getIfTypeName

      public String getIfTypeName()
      Get symbolic name for interface type
      Returns:
      symbolic name for interface type
    • getMacAddress

      public MacAddress getMacAddress()
      Get interface MAC address
      Returns:
      Interface MAC address
    • getRequiredPollCount

      public int getRequiredPollCount()
      Returns:
      Number of polls required to change interface status
    • getNameWithAlias

      public String getNameWithAlias()
      Description copied from class: AbstractObject
      Get name concatenated with alias in brackets if alias is not empty or just name otherwise.
      Overrides:
      getNameWithAlias in class AbstractObject
      Returns:
      name concatenated with alias in brackets if alias is not empty or just name otherwise
      See Also:
    • getObjectClassName

      public String getObjectClassName()
      Description copied from class: AbstractObject
      Get name of NetXMS object's class.
      Overrides:
      getObjectClassName in class AbstractObject
      Returns:
      Name of NetXMS object's class
      See Also:
    • isAllowedOnMap

      public boolean isAllowedOnMap()
      Description copied from class: AbstractObject
      If this method returns true object is allowed to be on custom network map. Default implementation always returns false.
      Overrides:
      isAllowedOnMap in class AbstractObject
      Returns:
      true if object is allowed to be on custom network map
      See Also:
    • getChassis

      public int getChassis()
      Returns:
      the chassis
    • getPIC

      public int getPIC()
      Returns:
      the pic
    • getModule

      public int getModule()
      Returns:
      the slot
    • getPort

      public int getPort()
      Returns:
      the port
    • getLane

      public int getLane()
      Get lane number for interface on split (breakout) port. Lane numbers are reported as numbered by the device, so 0 is a valid lane number.
      Returns:
      lane number or -1 if port is not split
    • isSplitPort

      public boolean isSplitPort()
      Check if this interface is one of the interfaces of split (breakout) port.
      Returns:
      true if this interface is one of the interfaces of split (breakout) port
    • isPhysicalLocationValid

      public boolean isPhysicalLocationValid()
      Check if physical location of this interface is known. If it is not, values of location coordinates (chassis, module, PIC, port, and lane) should be ignored.
      Returns:
      true if physical location of this interface is known
    • getPhysicalLocation

      public String getPhysicalLocation()
      Get string describing interface physical location in form chassis/module/pic/port (or chassis/module/pic/port:lane for interface on split port).
      Returns:
      string describing interface physical location or empty string if interface is not physical port or location is not known
    • getPeerNodeId

      public long getPeerNodeId()
      Returns:
      the peerNodeId
    • getPeerInterfaceId

      public long getPeerInterfaceId()
      Returns:
      the peerInterfaceId
    • getPeerLastUpdateTime

      public Date getPeerLastUpdateTime()
      Returns:
      the peerLastUpdateTime
    • getZoneId

      public int getZoneId()
      Description copied from interface: ZoneMember
      Get ID of the zone this object belongs to
      Specified by:
      getZoneId in interface ZoneMember
      Returns:
      zone ID
      See Also:
    • getZoneName

      public String getZoneName()
      Description copied from interface: ZoneMember
      Get name of the zone this object belongs to
      Specified by:
      getZoneName in interface ZoneMember
      Returns:
      zone name
      See Also:
    • getDescription

      public String getDescription()
      Returns:
      the description
    • getIfAlias

      public String getIfAlias()
      Returns:
      interface's SNMP alias
    • getFlags

      public int getFlags()
      Returns:
      the flags
    • getDot1xPaeState

      public int getDot1xPaeState()
      Get 802.1x PAE state
      Returns:
      802.1x PAE state
    • getDot1xPaeStateAsText

      public String getDot1xPaeStateAsText()
      Get 802.1x PAE state as text
      Returns:
      802.1x PAE state as text
    • getDot1xBackendState

      public int getDot1xBackendState()
      Get 802.1x backend state
      Returns:
      802.1x backend state
    • getDot1xBackendStateAsText

      public String getDot1xBackendStateAsText()
      Get 802.1x backend state as text
      Returns:
      802.1x backend state as text
    • getAdminState

      public int getAdminState()
      Get administrative state
      Returns:
      administrative state
    • getAdminStateAsText

      public String getAdminStateAsText()
      Get administrative state as text
      Returns:
      administrative state as text
    • getOperState

      public int getOperState()
      Get operational state
      Returns:
      operational state
    • getOperStateAsText

      public String getOperStateAsText()
      Get operational state as text
      Returns:
      operational state as text
    • getStpPortState

      public SpanningTreePortState getStpPortState()
      Get Spanning Tree port state for this interface.
      Returns:
      Spanning Tree port state for this interface
    • getExpectedState

      public int getExpectedState()
      Get interface expected state
      Returns:
      interface expected state
    • isPhysicalPort

      public boolean isPhysicalPort()
      Check if this interface is a physical port
      Returns:
      true if this interface is a physical port
    • isLoopback

      public boolean isLoopback()
      Check if this interface is a loopback
      Returns:
      true if this interface is a loopback
    • isOSPF

      public boolean isOSPF()
      Check if OSPF is running on this interface
      Returns:
      true if OSPF is running on this interface
    • isPseudo

      public boolean isPseudo()
      Check if this interface is a pseudo-interface created by server for node without interface list (its address tracks node's primary IP address).
      Returns:
      true if this interface is a pseudo-interface
    • isExcludedFromTopology

      public boolean isExcludedFromTopology()
      Check if this interface is excluded from network topology calculation
      Returns:
      true if this interface is excluded from network topology calculation
    • isIncludedInIcmpPoll

      public boolean isIncludedInIcmpPoll()
      Check if this interface is included in ICMP poll for owning node
      Returns:
      true if this interface is included in ICMP poll for owning node
    • isIcmpStatusPollDisabled

      public boolean isIcmpStatusPollDisabled()
      Check if using ICMP for status polling is disabled for this interface.
      Returns:
      true if using ICMP for status polling is disabled for this interface
    • isSnmpStatusPollDisabled

      public boolean isSnmpStatusPollDisabled()
      Check if using SNMP for status polling is disabled for this interface.
      Returns:
      true if using SNMP for status polling is disabled for this interface
    • isAgentStatusPollDisabled

      public boolean isAgentStatusPollDisabled()
      Check if using NetXMS agent for status polling is disabled for this interface.
      Returns:
      true if using NetXMS agent for status polling is disabled for this interface
    • getPeerDiscoveryProtocol

      public LinkLayerDiscoveryProtocol getPeerDiscoveryProtocol()
      Get peer discovery protocol
      Returns:
      peer discovery protocol
    • getMtu

      public int getMtu()
      Returns:
      the mtu
    • getSpeed

      public long getSpeed()
      Get interface speed in bps.
      Returns:
      interface speed in bps or 0 if not known
    • getMaxSpeed

      public long getMaxSpeed()
      Get interface maximum speed in bps.
      Returns:
      interface maximum speed in bps or 0 if not known
    • getInboundUtilization

      public int getInboundUtilization()
      Get calculated inbound utilization if available.
      Returns:
      inbound utilization in permille or -1 if not available
    • getOutboundUtilization

      public int getOutboundUtilization()
      Get calculated outbound utilization if available.
      Returns:
      outbound utilization in permille or -1 if not available
    • getIfTableSuffix

      public SnmpObjectId getIfTableSuffix()
      Returns:
      the ifTableSuffix
    • getIpAddressList

      public List<InetAddressEx> getIpAddressList()
      Returns:
      the ipAddressList
    • hasAddress

      public boolean hasAddress(InetAddressEx addr)
      Check if given address present on interface
      Parameters:
      addr - IP address
      Returns:
      true if given address present on interface
    • hasAddress

      public boolean hasAddress(InetAddress addr)
      Check if given address present on interface
      Parameters:
      addr - IP address
      Returns:
      true if given address present on interface
    • getFirstUnicastAddress

      public InetAddress getFirstUnicastAddress()
      Get first unicast address
      Returns:
      first unicast address
    • getFirstUnicastAddressEx

      public InetAddressEx getFirstUnicastAddressEx()
      Get first unicast address
      Returns:
      first unicast address
    • getIpAddressListAsString

      public String getIpAddressListAsString()
      Get IP address list as string
      Returns:
      IP address list as string
    • getIfTypeName

      public static String getIfTypeName(int ifType)
      Get symbolic name for interface type
      Parameters:
      ifType - interface type
      Returns:
      symbolic name for interface type
    • getParentInterfaceId

      public long getParentInterfaceId()
      Get object ID of parent interface
      Returns:
      parent interface object ID or 0
    • getParentInterface

      public Interface getParentInterface()
      Get parent interface object
      Returns:
      parent interface object or null
    • getVlans

      public long[] getVlans()
      Returns:
      the vlans
    • getOSPFArea

      public InetAddress getOSPFArea()
      Returns:
      the ospfArea
    • getOSPFState

      public OSPFInterfaceState getOSPFState()
      Returns:
      the ospfState
    • getOSPFType

      public OSPFInterfaceType getOSPFType()
      Returns:
      the ospfType
    • getStrings

      public Set<String> getStrings()
      Description copied from class: AbstractObject
      Get all strings in object
      Overrides:
      getStrings in class AbstractObject
      Returns:
      set of all strings in object
      See Also: