Class OnmsIpInterface

  • All Implemented Interfaces:
    java.io.Serializable

    @Entity
    public class OnmsIpInterface
    extends OnmsEntity
    implements java.io.Serializable

    OnmsIpInterface class.

    See Also:
    Serialized Form
    • Constructor Detail

      • OnmsIpInterface

        public OnmsIpInterface()

        Constructor for OnmsIpInterface.

      • OnmsIpInterface

        public OnmsIpInterface​(java.lang.String ipAddr,
                               OnmsNode node)
        Deprecated.
        Use the InetAddress version instead.
        minimal constructor
        Parameters:
        ipAddr - a String object.
        node - a OnmsNode object.
      • OnmsIpInterface

        public OnmsIpInterface​(java.net.InetAddress ipAddr,
                               OnmsNode node)
        minimal constructor
        Parameters:
        ipAddr - a String object.
        node - a OnmsNode object.
    • Method Detail

      • getId

        public java.lang.Integer getId()
        Unique identifier for ipInterface.
        Returns:
        a Integer object.
      • setId

        public void setId​(java.lang.Integer id)

        setId

        Parameters:
        id - a Integer object.
      • getInterfaceId

        public java.lang.String getInterfaceId()

        getInterfaceId

        Returns:
        a String object.
      • setInterfaceId

        public void setInterfaceId​(java.lang.String id)
      • getLastIngressFlow

        public java.util.Date getLastIngressFlow()
      • getLastEgressFlow

        public java.util.Date getLastEgressFlow()
      • getIpAddressAsString

        public java.lang.String getIpAddressAsString()
        Deprecated.

        getIpAddress

        Returns:
        a String object.
      • getIfIndex

        public java.lang.Integer getIfIndex()

        getIfIndex

        Returns:
        a Integer object.
      • setIfIndex

        public void setIfIndex​(java.lang.Integer ifindex)

        setIfIndex

        Parameters:
        ifindex - a Integer object.
      • getIpHostName

        public java.lang.String getIpHostName()

        getIpHostName

        Returns:
        a String object.
      • setIpHostName

        public void setIpHostName​(java.lang.String iphostname)

        setIpHostName

        Parameters:
        iphostname - a String object.
      • getIsManaged

        public java.lang.String getIsManaged()

        getIsManaged

        Returns:
        a String object.
      • setIsManaged

        public void setIsManaged​(java.lang.String ismanaged)

        setIsManaged

        Parameters:
        ismanaged - a String object.
      • isManaged

        public boolean isManaged()

        isManaged

        Returns:
        a boolean.
      • getIpLastCapsdPoll

        public java.util.Date getIpLastCapsdPoll()

        getIpLastCapsdPoll

        Returns:
        a Date object.
      • setIpLastCapsdPoll

        public void setIpLastCapsdPoll​(java.util.Date iplastcapsdpoll)

        setIpLastCapsdPoll

        Parameters:
        iplastcapsdpoll - a Date object.
      • getPrimaryString

        public java.lang.String getPrimaryString()

        getPrimaryString

        Returns:
        a String object.
      • setPrimaryString

        public void setPrimaryString​(java.lang.String primaryType)

        setPrimaryString

        Parameters:
        primaryType - a String object.
      • setIsSnmpPrimary

        public void setIsSnmpPrimary​(PrimaryType issnmpprimary)

        setIsSnmpPrimary

        Parameters:
        issnmpprimary - a PrimaryType object.
      • isPrimary

        public boolean isPrimary()

        isPrimary

        Returns:
        a boolean.
      • getRequisitionedMetaData

        public java.util.List<OnmsMetaData> getRequisitionedMetaData()
      • setRequisionedMetaData

        public void setRequisionedMetaData​(java.util.List<OnmsMetaData> requisitionedMetaData)
      • addRequisionedMetaData

        public void addRequisionedMetaData​(OnmsMetaData onmsMetaData)
      • findMetaDataForContextAndKey

        public java.util.Optional<OnmsMetaData> findMetaDataForContextAndKey​(java.lang.String context,
                                                                             java.lang.String key)
      • getMetaData

        public java.util.List<OnmsMetaData> getMetaData()
      • setMetaData

        public void setMetaData​(java.util.List<OnmsMetaData> metaData)
      • addMetaData

        public void addMetaData​(java.lang.String context,
                                java.lang.String key,
                                java.lang.String value)
      • removeMetaData

        public void removeMetaData​(java.lang.String context,
                                   java.lang.String key)
      • removeMetaData

        public void removeMetaData​(java.lang.String context)
      • setNode

        public void setNode​(OnmsNode node)

        setNode

        Parameters:
        node - a OnmsNode object.
      • getNodeId

        public java.lang.Integer getNodeId()
      • getMonitoredServices

        public java.util.Set<OnmsMonitoredService> getMonitoredServices()
        The services on this interface
        Returns:
        a Set object.
      • setMonitoredServices

        public void setMonitoredServices​(java.util.Set<OnmsMonitoredService> ifServices)

        setMonitoredServices

        Parameters:
        ifServices - a Set object.
      • toString

        public java.lang.String toString()

        toString

        Overrides:
        toString in class java.lang.Object
        Returns:
        a String object.
      • getIpAddress

        public java.net.InetAddress getIpAddress()

        getInetAddress

        Returns:
        a InetAddress object.
      • setIpAddress

        public void setIpAddress​(java.net.InetAddress ipaddr)

        setInetAddress

        Parameters:
        ipaddr - a String object.
      • getNetMask

        public java.net.InetAddress getNetMask()
      • setNetMask

        public void setNetMask​(java.net.InetAddress netMask)
      • isDown

        public boolean isDown()

        isDown

        Returns:
        a boolean.
      • getMonitoredServiceCount

        public int getMonitoredServiceCount()
      • getMonitoredServiceByServiceType

        public OnmsMonitoredService getMonitoredServiceByServiceType​(java.lang.String svcName)

        getMonitoredServiceByServiceType

        Parameters:
        svcName - a String object.
        Returns:
        a OnmsMonitoredService object.
      • mergeInterfaceAttributes

        public void mergeInterfaceAttributes​(OnmsIpInterface scannedIface)

        mergeInterfaceAttributes

        Parameters:
        scannedIface - a OnmsIpInterface object.
      • hasNewCollectionTypeValue

        protected static boolean hasNewCollectionTypeValue​(PrimaryType newVal,
                                                           PrimaryType existingVal)

        hasNewCollectionTypeValue

        Parameters:
        newVal - a PrimaryType object.
        existingVal - a PrimaryType object.
        Returns:
        a boolean.
      • mergeMonitoredServices

        public void mergeMonitoredServices​(OnmsIpInterface scannedIface,
                                           EventForwarder eventForwarder,
                                           boolean deleteMissing)

        mergeMonitoredServices

        Parameters:
        scannedIface - a OnmsIpInterface object.
        eventForwarder - a EventForwarder object.
        deleteMissing - a boolean.
      • updateSnmpInterface

        public void updateSnmpInterface​(OnmsIpInterface scannedIface)

        updateSnmpInterface

        Parameters:
        scannedIface - a OnmsIpInterface object.
      • getForeignSource

        public java.lang.String getForeignSource()
      • getForeignId

        public java.lang.String getForeignId()