org.opennms.netmgt.model
Class OnmsNode

java.lang.Object
  extended by org.opennms.netmgt.model.OnmsEntity
      extended by org.opennms.netmgt.model.OnmsNode
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<OnmsNode>

public class OnmsNode
extends OnmsEntity
implements java.io.Serializable, java.lang.Comparable<OnmsNode>

Contains information on nodes discovered and potentially managed by OpenNMS. sys* properties map to SNMP MIB 2 system table information.

See Also:
Serialized Form

Constructor Summary
OnmsNode()
           
OnmsNode(OnmsDistPoller distPoller)
           
 
Method Summary
 boolean addCategory(OnmsCategory category)
           
 void addIpInterface(OnmsIpInterface iface)
           
 void addSnmpInterface(OnmsSnmpInterface snmpIface)
           
 int compareTo(OnmsNode o)
           
 OnmsAssetRecord getAssetRecord()
          The assert record associated with this node
 java.util.Set<OnmsCategory> getCategories()
           
 java.util.Date getCreateTime()
          Time node was added to the database.
 OnmsDistPoller getDistPoller()
          Distributed Poller responsible for this node
 java.lang.String getForeignId()
           
 java.lang.String getForeignSource()
           
 java.lang.Integer getId()
          Unique identifier for node.
 OnmsIpInterface getIpInterfaceByIpAddress(java.lang.String ipAddress)
           
 java.util.Set<OnmsIpInterface> getIpInterfaces()
          The interfaces on this node
 java.lang.String getLabel()
          User-friendly name associated with the node.
 java.lang.String getLabelSource()
          Flag indicating source of nodeLabel - 'U' = user defined - 'H' = IP hostname - 'S' = sysName - 'A' = IP address TODO: change this to an enum
 java.util.Date getLastCapsdPoll()
          Date and time of last Capsd scan.
 java.lang.String getNetBiosDomain()
          NetBIOS damain name associated with the node.
 java.lang.String getNetBiosName()
          NetBIOS workstation name associated with the node.
 java.lang.String getOperatingSystem()
          Operating system running on the node.
 OnmsNode getParent()
          In the case that the node is virtual or an independent device in a chassis that should be reflected as a subcomponent or "child", this field reflects the nodeID of the chassis/physical node/"parent" device.
 java.util.Set<OnmsSnmpInterface> getSnmpInterfaces()
          The information from the SNMP interfaces/ipAddrTables for the node
 OnmsSnmpInterface getSnmpInterfaceWithIfIndex(int ifIndex)
           
 java.lang.String getSysContact()
          SNMP MIB-2 system.sysContact.0
 java.lang.String getSysDescription()
          SNMP MIB-2 system.sysDescr.0
 java.lang.String getSysLocation()
          SNMP MIB-2 system.sysLocation.0
 java.lang.String getSysName()
          SNMP MIB-2 system.sysName.0
 java.lang.String getSysObjectId()
          SNMP MIB-2 system.sysObjectID.0
 java.lang.String getType()
          Flag indicating status of node - 'A' - active - 'D' - deleted TODO: Eventually this will be deprecated and deleted nodes will actually be deleted.
 boolean isDown()
           
 boolean removeCategory(OnmsCategory category)
           
 void setAssetRecord(OnmsAssetRecord asset)
           
 void setCategories(java.util.Set<OnmsCategory> categories)
           
 void setCreateTime(java.util.Date nodecreatetime)
           
 void setDistPoller(OnmsDistPoller distpoller)
           
 void setForeignId(java.lang.String foreignId)
           
 void setForeignSource(java.lang.String foreignSource)
           
 void setId(java.lang.Integer nodeid)
           
 void setIpInterfaces(java.util.Set<OnmsIpInterface> ipinterfaces)
           
 void setLabel(java.lang.String nodelabel)
           
 void setLabelSource(java.lang.String nodelabelsource)
           
 void setLastCapsdPoll(java.util.Date lastcapsdpoll)
           
 void setNetBiosDomain(java.lang.String nodedomainname)
           
 void setNetBiosName(java.lang.String nodenetbiosname)
           
 void setOperatingSystem(java.lang.String operatingsystem)
           
 void setParent(OnmsNode parent)
           
 void setSnmpInterfaces(java.util.Set<OnmsSnmpInterface> snmpinterfaces)
           
 void setSysContact(java.lang.String nodesyscontact)
           
 void setSysDescription(java.lang.String nodesysdescription)
           
 void setSysLocation(java.lang.String nodesyslocation)
           
 void setSysName(java.lang.String nodesysname)
           
 void setSysObjectId(java.lang.String nodesysoid)
           
 void setType(java.lang.String nodetype)
           
 java.lang.String toString()
           
 void visit(EntityVisitor visitor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OnmsNode

public OnmsNode()

OnmsNode

public OnmsNode(OnmsDistPoller distPoller)
Method Detail

getId

public java.lang.Integer getId()
Unique identifier for node.


setId

public void setId(java.lang.Integer nodeid)

getCreateTime

public java.util.Date getCreateTime()
Time node was added to the database.


setCreateTime

public void setCreateTime(java.util.Date nodecreatetime)

getParent

public OnmsNode getParent()
In the case that the node is virtual or an independent device in a chassis that should be reflected as a subcomponent or "child", this field reflects the nodeID of the chassis/physical node/"parent" device.


setParent

public void setParent(OnmsNode parent)

getType

public java.lang.String getType()
Flag indicating status of node - 'A' - active - 'D' - deleted TODO: Eventually this will be deprecated and deleted nodes will actually be deleted.


setType

public void setType(java.lang.String nodetype)

getSysObjectId

public java.lang.String getSysObjectId()
SNMP MIB-2 system.sysObjectID.0


setSysObjectId

public void setSysObjectId(java.lang.String nodesysoid)

getSysName

public java.lang.String getSysName()
SNMP MIB-2 system.sysName.0


setSysName

public void setSysName(java.lang.String nodesysname)

getSysDescription

public java.lang.String getSysDescription()
SNMP MIB-2 system.sysDescr.0


setSysDescription

public void setSysDescription(java.lang.String nodesysdescription)

getSysLocation

public java.lang.String getSysLocation()
SNMP MIB-2 system.sysLocation.0


setSysLocation

public void setSysLocation(java.lang.String nodesyslocation)

getSysContact

public java.lang.String getSysContact()
SNMP MIB-2 system.sysContact.0


setSysContact

public void setSysContact(java.lang.String nodesyscontact)

getLabel

public java.lang.String getLabel()
User-friendly name associated with the node.


setLabel

public void setLabel(java.lang.String nodelabel)

getLabelSource

public java.lang.String getLabelSource()
Flag indicating source of nodeLabel - 'U' = user defined - 'H' = IP hostname - 'S' = sysName - 'A' = IP address TODO: change this to an enum


setLabelSource

public void setLabelSource(java.lang.String nodelabelsource)

getNetBiosName

public java.lang.String getNetBiosName()
NetBIOS workstation name associated with the node.


setNetBiosName

public void setNetBiosName(java.lang.String nodenetbiosname)

getNetBiosDomain

public java.lang.String getNetBiosDomain()
NetBIOS damain name associated with the node.


setNetBiosDomain

public void setNetBiosDomain(java.lang.String nodedomainname)

getOperatingSystem

public java.lang.String getOperatingSystem()
Operating system running on the node.


setOperatingSystem

public void setOperatingSystem(java.lang.String operatingsystem)

getLastCapsdPoll

public java.util.Date getLastCapsdPoll()
Date and time of last Capsd scan.


setLastCapsdPoll

public void setLastCapsdPoll(java.util.Date lastcapsdpoll)

getForeignId

public java.lang.String getForeignId()

setForeignId

public void setForeignId(java.lang.String foreignId)

getForeignSource

public java.lang.String getForeignSource()

setForeignSource

public void setForeignSource(java.lang.String foreignSource)

getDistPoller

public OnmsDistPoller getDistPoller()
Distributed Poller responsible for this node


setDistPoller

public void setDistPoller(OnmsDistPoller distpoller)

getAssetRecord

public OnmsAssetRecord getAssetRecord()
The assert record associated with this node


setAssetRecord

public void setAssetRecord(OnmsAssetRecord asset)

getIpInterfaces

public java.util.Set<OnmsIpInterface> getIpInterfaces()
The interfaces on this node


setIpInterfaces

public void setIpInterfaces(java.util.Set<OnmsIpInterface> ipinterfaces)

addIpInterface

public void addIpInterface(OnmsIpInterface iface)

getSnmpInterfaces

public java.util.Set<OnmsSnmpInterface> getSnmpInterfaces()
The information from the SNMP interfaces/ipAddrTables for the node


setSnmpInterfaces

public void setSnmpInterfaces(java.util.Set<OnmsSnmpInterface> snmpinterfaces)

getCategories

public java.util.Set<OnmsCategory> getCategories()

setCategories

public void setCategories(java.util.Set<OnmsCategory> categories)

addCategory

public boolean addCategory(OnmsCategory category)

removeCategory

public boolean removeCategory(OnmsCategory category)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

visit

public void visit(EntityVisitor visitor)
Specified by:
visit in class OnmsEntity

addSnmpInterface

public void addSnmpInterface(OnmsSnmpInterface snmpIface)

isDown

public boolean isDown()

getSnmpInterfaceWithIfIndex

public OnmsSnmpInterface getSnmpInterfaceWithIfIndex(int ifIndex)

getIpInterfaceByIpAddress

public OnmsIpInterface getIpInterfaceByIpAddress(java.lang.String ipAddress)

compareTo

public int compareTo(OnmsNode o)
Specified by:
compareTo in interface java.lang.Comparable<OnmsNode>


Copyright © 2007. All Rights Reserved.