Package org.opennms.netmgt.model
Class OnmsIpInterface
- java.lang.Object
-
- org.opennms.netmgt.model.OnmsEntity
-
- org.opennms.netmgt.model.OnmsIpInterface
-
- All Implemented Interfaces:
java.io.Serializable
@Entity public class OnmsIpInterface extends OnmsEntity implements java.io.Serializable
OnmsIpInterface class.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description OnmsIpInterface()
Constructor for OnmsIpInterface.OnmsIpInterface(java.lang.String ipAddr, OnmsNode node)
Deprecated.Use theInetAddress
version instead.OnmsIpInterface(java.net.InetAddress ipAddr, OnmsNode node)
minimal constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addMetaData(java.lang.String context, java.lang.String key, java.lang.String value)
void
addMonitoredService(OnmsMonitoredService svc)
void
addRequisionedMetaData(OnmsMetaData onmsMetaData)
java.util.Optional<OnmsMetaData>
findMetaDataForContextAndKey(java.lang.String context, java.lang.String key)
java.lang.String
getForeignId()
java.lang.String
getForeignSource()
java.lang.Integer
getId()
Unique identifier for ipInterface.java.lang.Integer
getIfIndex()
getIfIndexjava.lang.String
getInterfaceId()
getInterfaceIdjava.net.InetAddress
getIpAddress()
getInetAddressjava.lang.String
getIpAddressAsString()
Deprecated.java.lang.String
getIpHostName()
getIpHostNamejava.util.Date
getIpLastCapsdPoll()
getIpLastCapsdPolljava.lang.String
getIsManaged()
getIsManagedPrimaryType
getIsSnmpPrimary()
getIsSnmpPrimaryjava.util.Date
getLastEgressFlow()
java.util.Date
getLastIngressFlow()
java.util.List<OnmsMetaData>
getMetaData()
OnmsMonitoredService
getMonitoredServiceByServiceType(java.lang.String svcName)
getMonitoredServiceByServiceTypeint
getMonitoredServiceCount()
java.util.Set<OnmsMonitoredService>
getMonitoredServices()
The services on this interfacejava.net.InetAddress
getNetMask()
OnmsNode
getNode()
getNodejava.lang.Integer
getNodeId()
java.lang.String
getPrimaryString()
getPrimaryStringjava.util.List<OnmsMetaData>
getRequisitionedMetaData()
OnmsSnmpInterface
getSnmpInterface()
The SnmpInterface associated with this interface if anyprotected static boolean
hasNewCollectionTypeValue(PrimaryType newVal, PrimaryType existingVal)
hasNewCollectionTypeValueboolean
isDown()
isDownboolean
isManaged()
isManagedboolean
isPrimary()
isPrimaryvoid
mergeInterface(OnmsIpInterface scannedIface, EventForwarder eventForwarder, boolean deleteMissing)
mergeInterfacevoid
mergeInterfaceAttributes(OnmsIpInterface scannedIface)
mergeInterfaceAttributesvoid
mergeMetaData(OnmsIpInterface scanned)
void
mergeMonitoredServices(OnmsIpInterface scannedIface, EventForwarder eventForwarder, boolean deleteMissing)
mergeMonitoredServicesvoid
removeMetaData(java.lang.String context)
void
removeMetaData(java.lang.String context, java.lang.String key)
void
removeMonitoredService(OnmsMonitoredService svc)
void
setId(java.lang.Integer id)
setIdvoid
setIfIndex(java.lang.Integer ifindex)
setIfIndexvoid
setInterfaceId(java.lang.String id)
void
setIpAddress(java.net.InetAddress ipaddr)
setInetAddressvoid
setIpHostName(java.lang.String iphostname)
setIpHostNamevoid
setIpLastCapsdPoll(java.util.Date iplastcapsdpoll)
setIpLastCapsdPollvoid
setIsManaged(java.lang.String ismanaged)
setIsManagedvoid
setIsSnmpPrimary(PrimaryType issnmpprimary)
setIsSnmpPrimaryvoid
setMetaData(java.util.List<OnmsMetaData> metaData)
void
setMonitoredServices(java.util.Set<OnmsMonitoredService> ifServices)
setMonitoredServicesvoid
setNetMask(java.net.InetAddress netMask)
void
setNode(OnmsNode node)
setNodevoid
setPrimaryString(java.lang.String primaryType)
setPrimaryStringvoid
setRequisionedMetaData(java.util.List<OnmsMetaData> requisitionedMetaData)
void
setSnmpInterface(OnmsSnmpInterface snmpInterface)
setSnmpInterfacejava.lang.String
toString()
toStringvoid
updateSnmpInterface(OnmsIpInterface scannedIface)
updateSnmpInterfacevoid
visit(EntityVisitor visitor)
visit-
Methods inherited from class org.opennms.netmgt.model.OnmsEntity
hasNewValue
-
-
-
-
Constructor Detail
-
OnmsIpInterface
public OnmsIpInterface()
Constructor for OnmsIpInterface.
-
OnmsIpInterface
public OnmsIpInterface(java.lang.String ipAddr, OnmsNode node)
Deprecated.Use theInetAddress
version instead.minimal constructor- Parameters:
ipAddr
- aString
object.node
- aOnmsNode
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
- aInteger
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
- aInteger
object.
-
getIpHostName
public java.lang.String getIpHostName()
getIpHostName
- Returns:
- a
String
object.
-
setIpHostName
public void setIpHostName(java.lang.String iphostname)
setIpHostName
- Parameters:
iphostname
- aString
object.
-
getIsManaged
public java.lang.String getIsManaged()
getIsManaged
- Returns:
- a
String
object.
-
setIsManaged
public void setIsManaged(java.lang.String ismanaged)
setIsManaged
- Parameters:
ismanaged
- aString
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
- aDate
object.
-
getPrimaryString
public java.lang.String getPrimaryString()
getPrimaryString
- Returns:
- a
String
object.
-
setPrimaryString
public void setPrimaryString(java.lang.String primaryType)
setPrimaryString
- Parameters:
primaryType
- aString
object.
-
getIsSnmpPrimary
public PrimaryType getIsSnmpPrimary()
getIsSnmpPrimary
- Returns:
- a
PrimaryType
object.
-
setIsSnmpPrimary
public void setIsSnmpPrimary(PrimaryType issnmpprimary)
setIsSnmpPrimary
- Parameters:
issnmpprimary
- aPrimaryType
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)
-
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
- aSet
object.
-
addMonitoredService
public void addMonitoredService(OnmsMonitoredService svc)
-
removeMonitoredService
public void removeMonitoredService(OnmsMonitoredService svc)
-
getSnmpInterface
public OnmsSnmpInterface getSnmpInterface()
The SnmpInterface associated with this interface if any- Returns:
- a
OnmsSnmpInterface
object.
-
setSnmpInterface
public void setSnmpInterface(OnmsSnmpInterface snmpInterface)
setSnmpInterface
- Parameters:
snmpInterface
- aOnmsSnmpInterface
object.
-
toString
public java.lang.String toString()
toString
- Overrides:
toString
in classjava.lang.Object
- Returns:
- a
String
object.
-
visit
public void visit(EntityVisitor visitor)
visit
- Specified by:
visit
in classOnmsEntity
- Parameters:
visitor
- aEntityVisitor
object.
-
getIpAddress
public java.net.InetAddress getIpAddress()
getInetAddress
- Returns:
- a
InetAddress
object.
-
setIpAddress
public void setIpAddress(java.net.InetAddress ipaddr)
setInetAddress
- Parameters:
ipaddr
- aString
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
- aString
object.- Returns:
- a
OnmsMonitoredService
object.
-
mergeInterfaceAttributes
public void mergeInterfaceAttributes(OnmsIpInterface scannedIface)
mergeInterfaceAttributes
- Parameters:
scannedIface
- aOnmsIpInterface
object.
-
hasNewCollectionTypeValue
protected static boolean hasNewCollectionTypeValue(PrimaryType newVal, PrimaryType existingVal)
hasNewCollectionTypeValue
- Parameters:
newVal
- aPrimaryType
object.existingVal
- aPrimaryType
object.- Returns:
- a boolean.
-
mergeMonitoredServices
public void mergeMonitoredServices(OnmsIpInterface scannedIface, EventForwarder eventForwarder, boolean deleteMissing)
mergeMonitoredServices
- Parameters:
scannedIface
- aOnmsIpInterface
object.eventForwarder
- aEventForwarder
object.deleteMissing
- a boolean.
-
mergeMetaData
public void mergeMetaData(OnmsIpInterface scanned)
-
updateSnmpInterface
public void updateSnmpInterface(OnmsIpInterface scannedIface)
updateSnmpInterface
- Parameters:
scannedIface
- aOnmsIpInterface
object.
-
mergeInterface
public void mergeInterface(OnmsIpInterface scannedIface, EventForwarder eventForwarder, boolean deleteMissing)
mergeInterface
- Parameters:
scannedIface
- aOnmsIpInterface
object.eventForwarder
- aEventForwarder
object.deleteMissing
- a boolean.
-
getForeignSource
public java.lang.String getForeignSource()
-
getForeignId
public java.lang.String getForeignId()
-
-