Class Interface

All Implemented Interfaces:
NodeChild, ZoneMember

public class Interface extends GenericObject implements ZoneMember, NodeChild
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()
      Get parent node object.
      Specified by:
      getParentNode in interface NodeChild
      Returns:
      parent node object or null if it is not exist or inaccessible
    • 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
    • getPhysicalLocation

      public String getPhysicalLocation()
      Get string describing interface physical location in form chassis/module/pic/port
      Returns:
      string describing interface physical location in form chassis/module/pic/port or emoty string if interface is not physical port
    • getPeerNodeId

      public long getPeerNodeId()
      Returns:
      the peerNodeId
    • getPeerInterfaceId

      public long getPeerInterfaceId()
      Returns:
      the peerInterfaceId
    • 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
    • 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()
      Returns:
      the speed
    • 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: