Class OnmsMonitoringSystem

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    OnmsDistPoller, OnmsMinion

    @Entity
    public class OnmsMonitoringSystem
    extends java.lang.Object
    implements java.io.Serializable

    Represents an OpenNMS monitoring system that can poll status of nodes and report events that occur on the network. Examples of monitoring systems include:

    • OpenNMS
    • OpenNMS Remote Poller
    • OpenNMS Minion

    CAUTION: Don't add final modifiers to methods here because they need to be proxyable to the child classes and Javassist doesn't override final methods.

    Author:
    Seth
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String TYPE_MINION  
      static java.lang.String TYPE_OPENNMS  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getId()
      A human-readable name for each system.
      java.lang.String getLabel()
      A human-readable name for each system.
      java.util.Date getLastUpdated()
      The timestamp of the last message passed from the remote system.
      java.lang.String getLocation()
      The monitoring location that this system is located in.
      java.util.Map<java.lang.String,​java.lang.String> getProperties()
      setIpAddress
      java.lang.String getType()
      The type of monitoring system.
      void setId​(java.lang.String id)
      setName
      void setLabel​(java.lang.String label)  
      void setLastUpdated​(java.util.Date lastUpdated)  
      void setLocation​(java.lang.String location)  
      void setProperties​(java.util.Map<java.lang.String,​java.lang.String> properties)  
      void setProperty​(java.lang.String property, java.lang.String value)  
      void setType​(java.lang.String type)  
      java.lang.String toString()
      toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • OnmsMonitoringSystem

        public OnmsMonitoringSystem()
        default constructor
      • OnmsMonitoringSystem

        public OnmsMonitoringSystem​(java.lang.String id,
                                    java.lang.String location)
        Minimal constructor.
        Parameters:
        id - a String object.
        ipAddress - a String object.
    • Method Detail

      • getId

        public java.lang.String getId()
        A human-readable name for each system. Typically, the system's hostname (not fully qualified).
        Returns:
        a String object.
      • setId

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

        setName

        Parameters:
        id - a String object.
      • getLabel

        public java.lang.String getLabel()
        A human-readable name for each system. Typically, the system's hostname (not fully qualified).
        Returns:
        a String object.
      • setLabel

        public void setLabel​(java.lang.String label)
        Parameters:
        label - a String object.
      • getLocation

        public java.lang.String getLocation()
        The monitoring location that this system is located in.
        Returns:
        a String object.
      • setLocation

        public void setLocation​(java.lang.String location)
        Parameters:
        location - a String object.
      • getType

        public java.lang.String getType()
        The type of monitoring system. Mark this as insertable=false and updatable=false because it is also used as the @DiscriminatorColumn.
        Returns:
        a String object.
      • setType

        public void setType​(java.lang.String type)
        Parameters:
        type - a String object.
      • getLastUpdated

        public java.util.Date getLastUpdated()
        The timestamp of the last message passed from the remote system. TODO: Should this be nullable=false?
        Returns:
        a String object.
      • setLastUpdated

        public void setLastUpdated​(java.util.Date lastUpdated)
      • getProperties

        public java.util.Map<java.lang.String,​java.lang.String> getProperties()

        setIpAddress

        Parameters:
        ipAddress - a String object.
      • setProperties

        public void setProperties​(java.util.Map<java.lang.String,​java.lang.String> properties)
        Parameters:
        properties - a Map object.
      • setProperty

        public void setProperty​(java.lang.String property,
                                java.lang.String value)
      • toString

        public java.lang.String toString()

        toString

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