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:
Serializable, Comparable<OnmsNode>

public class OnmsNode
extends OnmsEntity
implements Serializable, 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
 void addArpInterface(OnmsArpInterface iface)
           
 boolean addCategory(OnmsCategory category)
           
 void addIpInterface(OnmsIpInterface iface)
           
 void addSnmpInterface(OnmsSnmpInterface snmpIface)
           
 int compareTo(OnmsNode o)
           
 Set<OnmsArpInterface> getArpInterfaces()
          The arp interfaces on this node
 OnmsAssetRecord getAssetRecord()
          The assert record associated with this node
 Set<OnmsCategory> getCategories()
           
 Date getCreateTime()
          Time node was added to the database.
 OnmsDistPoller getDistPoller()
          Distributed Poller responsible for this node
 String getForeignId()
           
 String getForeignSource()
           
 Integer getId()
          Unique identifier for node.
 OnmsIpInterface getInterfaceWithService(String svcName)
           
 OnmsIpInterface getIpInterfaceByIpAddress(String ipAddress)
           
 Set<OnmsIpInterface> getIpInterfaces()
          The interfaces on this node
 String getLabel()
          User-friendly name associated with the node.
 String getLabelSource()
          Flag indicating source of nodeLabel - 'U' = user defined - 'H' = IP hostname - 'S' = sysName - 'A' = IP address TODO: change this to an enum
 Date getLastCapsdPoll()
          Date and time of last Capsd scan.
 String getNetBiosDomain()
          NetBIOS damain name associated with the node.
 String getNetBiosName()
          NetBIOS workstation name associated with the node.
 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.
 PathElement getPathElement()
           
 OnmsIpInterface getPrimaryInterface()
           
 Set<OnmsSnmpInterface> getSnmpInterfaces()
          The information from the SNMP interfaces/ipAddrTables for the node
 OnmsSnmpInterface getSnmpInterfaceWithIfIndex(int ifIndex)
           
 String getSysContact()
          SNMP MIB-2 system.sysContact.0
 String getSysDescription()
          SNMP MIB-2 system.sysDescr.0
 String getSysLocation()
          SNMP MIB-2 system.sysLocation.0
 String getSysName()
          SNMP MIB-2 system.sysName.0
 String getSysObjectId()
          SNMP MIB-2 system.sysObjectID.0
 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 setArpInterfaces(Set<OnmsArpInterface> arpInterfaces)
           
 void setAssetRecord(OnmsAssetRecord asset)
           
 void setCategories(Set<OnmsCategory> categories)
           
 void setCreateTime(Date nodecreatetime)
           
 void setDistPoller(OnmsDistPoller distpoller)
           
 void setForeignId(String foreignId)
           
 void setForeignSource(String foreignSource)
           
 void setId(Integer nodeid)
           
 void setIpInterfaces(Set<OnmsIpInterface> ipinterfaces)
           
 void setLabel(String nodelabel)
           
 void setLabelSource(String nodelabelsource)
           
 void setLastCapsdPoll(Date lastcapsdpoll)
           
 void setNetBiosDomain(String nodedomainname)
           
 void setNetBiosName(String nodenetbiosname)
           
 void setOperatingSystem(String operatingsystem)
           
 void setParent(OnmsNode parent)
           
 void setPathElement(PathElement pathElement)
           
 void setSnmpInterfaces(Set<OnmsSnmpInterface> snmpinterfaces)
           
 void setSysContact(String nodesyscontact)
           
 void setSysDescription(String nodesysdescription)
           
 void setSysLocation(String nodesyslocation)
           
 void setSysName(String nodesysname)
           
 void setSysObjectId(String nodesysoid)
           
 void setType(String nodetype)
           
 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 Integer getId()
Unique identifier for node.


setId

public void setId(Integer nodeid)

getCreateTime

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


setCreateTime

public void setCreateTime(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 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(String nodetype)

getSysObjectId

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


setSysObjectId

public void setSysObjectId(String nodesysoid)

getSysName

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


setSysName

public void setSysName(String nodesysname)

getSysDescription

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


setSysDescription

public void setSysDescription(String nodesysdescription)

getSysLocation

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


setSysLocation

public void setSysLocation(String nodesyslocation)

getSysContact

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


setSysContact

public void setSysContact(String nodesyscontact)

getLabel

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


setLabel

public void setLabel(String nodelabel)

getLabelSource

public 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(String nodelabelsource)

getNetBiosName

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


setNetBiosName

public void setNetBiosName(String nodenetbiosname)

getNetBiosDomain

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


setNetBiosDomain

public void setNetBiosDomain(String nodedomainname)

getOperatingSystem

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


setOperatingSystem

public void setOperatingSystem(String operatingsystem)

getLastCapsdPoll

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


setLastCapsdPoll

public void setLastCapsdPoll(Date lastcapsdpoll)

getForeignId

public String getForeignId()

setForeignId

public void setForeignId(String foreignId)

getForeignSource

public String getForeignSource()

setForeignSource

public void setForeignSource(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)

getPathElement

public PathElement getPathElement()

setPathElement

public void setPathElement(PathElement pathElement)

getIpInterfaces

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


setIpInterfaces

public void setIpInterfaces(Set<OnmsIpInterface> ipinterfaces)

addIpInterface

public void addIpInterface(OnmsIpInterface iface)

getSnmpInterfaces

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


setSnmpInterfaces

public void setSnmpInterfaces(Set<OnmsSnmpInterface> snmpinterfaces)

getArpInterfaces

public Set<OnmsArpInterface> getArpInterfaces()
The arp interfaces on this node


setArpInterfaces

public void setArpInterfaces(Set<OnmsArpInterface> arpInterfaces)

addArpInterface

public void addArpInterface(OnmsArpInterface iface)

getCategories

public Set<OnmsCategory> getCategories()

setCategories

public void setCategories(Set<OnmsCategory> categories)

addCategory

public boolean addCategory(OnmsCategory category)

removeCategory

public boolean removeCategory(OnmsCategory category)

toString

public String toString()
Overrides:
toString in class 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(String ipAddress)

compareTo

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

getPrimaryInterface

public OnmsIpInterface getPrimaryInterface()

getInterfaceWithService

public OnmsIpInterface getInterfaceWithService(String svcName)


Copyright © 2009. All Rights Reserved.