Package org.opennms.netmgt.model
Class OnmsIpInterface
- java.lang.Object
-
- org.opennms.netmgt.model.OnmsEntity
-
- org.opennms.netmgt.model.OnmsIpInterface
-
- All Implemented Interfaces:
Serializable
@Entity public class OnmsIpInterface extends OnmsEntity implements Serializable
OnmsIpInterface class.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description OnmsIpInterface()
Constructor for OnmsIpInterface.OnmsIpInterface(String ipAddr, OnmsNode node)
Deprecated.Use theInetAddress
version instead.OnmsIpInterface(InetAddress ipAddr, OnmsNode node)
minimal constructor
-
Method Summary
-
Methods inherited from class org.opennms.netmgt.model.OnmsEntity
hasNewValue
-
-
-
-
Constructor Detail
-
OnmsIpInterface
public OnmsIpInterface()
Constructor for OnmsIpInterface.
-
OnmsIpInterface
public OnmsIpInterface(String ipAddr, OnmsNode node)
Deprecated.Use theInetAddress
version instead.minimal constructor
-
OnmsIpInterface
public OnmsIpInterface(InetAddress ipAddr, OnmsNode node)
minimal constructor
-
-
Method Detail
-
setInterfaceId
public void setInterfaceId(String id)
-
getLastIngressFlow
public Date getLastIngressFlow()
-
getLastEgressFlow
public Date getLastEgressFlow()
-
getIpAddressAsString
public String getIpAddressAsString()
Deprecated.getIpAddress
- Returns:
- a
String
object.
-
setIfIndex
public void setIfIndex(Integer ifindex)
setIfIndex
- Parameters:
ifindex
- aInteger
object.
-
setIpHostName
public void setIpHostName(String iphostname)
setIpHostName
- Parameters:
iphostname
- aString
object.
-
setIsManaged
public void setIsManaged(String ismanaged)
setIsManaged
- Parameters:
ismanaged
- aString
object.
-
isManaged
public boolean isManaged()
isManaged
- Returns:
- a boolean.
-
setIpLastCapsdPoll
public void setIpLastCapsdPoll(Date iplastcapsdpoll)
setIpLastCapsdPoll
- Parameters:
iplastcapsdpoll
- aDate
object.
-
getSnmpPrimary
public String getSnmpPrimary()
-
setSnmpPrimary
public void setSnmpPrimary(String primary)
-
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 List<OnmsMetaData> getRequisitionedMetaData()
-
setRequisionedMetaData
public void setRequisionedMetaData(List<OnmsMetaData> requisitionedMetaData)
-
addRequisionedMetaData
public void addRequisionedMetaData(OnmsMetaData onmsMetaData)
-
getMetaData
public List<OnmsMetaData> getMetaData()
-
setMetaData
public void setMetaData(List<OnmsMetaData> metaData)
-
removeMetaData
public void removeMetaData(String context)
-
getNodeId
public Integer getNodeId()
-
getMonitoredServices
public Set<OnmsMonitoredService> getMonitoredServices()
The services on this interface- Returns:
- a
Set
object.
-
setMonitoredServices
public void setMonitoredServices(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 String toString()
toString
-
visit
public void visit(EntityVisitor visitor)
visit
- Specified by:
visit
in classOnmsEntity
- Parameters:
visitor
- aEntityVisitor
object.
-
getIpAddress
public InetAddress getIpAddress()
getInetAddress
- Returns:
- a
InetAddress
object.
-
setIpAddress
public void setIpAddress(InetAddress ipaddr)
setInetAddress
- Parameters:
ipaddr
- aString
object.
-
getNetMask
public InetAddress getNetMask()
-
setNetMask
public void setNetMask(InetAddress netMask)
-
isDown
public boolean isDown()
isDown
- Returns:
- a boolean.
-
getMonitoredServiceCount
public int getMonitoredServiceCount()
-
getMonitoredServiceByServiceType
public OnmsMonitoredService getMonitoredServiceByServiceType(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 String getForeignSource()
-
getForeignId
public String getForeignId()
-
-