Class SnmpEventInfo


  • public class SnmpEventInfo
    extends Object
    Class for handling data passed as parms in a configureSNMP event. Provides for generating a config package based SNMP Definition class for merging into a current running config.
    Author:
    David Hustace
    • Constructor Detail

      • SnmpEventInfo

        public SnmpEventInfo()
        Default constructor
      • SnmpEventInfo

        public SnmpEventInfo​(IEvent event)

        Constructor for SnmpEventInfo.

        Parameters:
        event - a IEvent object.
    • Method Detail

      • getCommunityString

        @Deprecated
        public String getCommunityString()
        Deprecated.
        Returns the read community string if there is any, otherwise null is returned.
        Returns:
        the read community string if there is any, otherwise null is returned.
      • setCommunityString

        @Deprecated
        public void setCommunityString​(String communityString)
        Deprecated.

        sets the read community string.

        Parameters:
        communityString - a read community string.
      • setReadCommunityString

        public void setReadCommunityString​(String readCommunityString)
      • getReadCommunityString

        public String getReadCommunityString()
      • setWriteCommunityString

        public void setWriteCommunityString​(String writeCommunityString)
      • getWriteCommunityString

        public String getWriteCommunityString()
      • getFirstIPAddress

        public String getFirstIPAddress()

        getFirstIPAddress

        Returns:
        a String object.
      • setFirstIPAddress

        public void setFirstIPAddress​(InetAddress firstIPAddress)

        setFirstIPAddress

        Parameters:
        firstIPAddress - a InetAddress object.
      • getLastIPAddress

        public String getLastIPAddress()

        getLastIPAddress

        Returns:
        a String object.
      • setLastIPAddress

        public void setLastIPAddress​(InetAddress lastIPAddress)

        setLastIPAddress

        Parameters:
        lastIPAddress - a InetAddress object.
      • getMaxVarsPerPdu

        public int getMaxVarsPerPdu()
      • setMaxVarsPerPdu

        public void setMaxVarsPerPdu​(int maxVarsPerPdu)
      • getMaxRepetitions

        public int getMaxRepetitions()
      • setMaxRepetitions

        public void setMaxRepetitions​(int maxRepetitions)
      • getAuthPassphrase

        public String getAuthPassphrase()
      • setAuthPassPhrase

        public void setAuthPassPhrase​(String authPassPhrase)
      • getAuthProtocol

        public String getAuthProtocol()
      • setAuthProtocol

        public void setAuthProtocol​(String authProtocol)
      • setPrivProtocol

        public void setPrivProtocol​(String privProtocol)
      • getPrivProtocol

        public String getPrivProtocol()
      • getPrivPassPhrase

        public String getPrivPassPhrase()
      • setPrivPassPhrase

        public void setPrivPassPhrase​(String privPassPhrase)
      • getEngineId

        public String getEngineId()
      • setEngineId

        public void setEngineId​(String engineId)
      • getContextEngineId

        public String getContextEngineId()
      • setContextEngineId

        public void setContextEngineId​(String contextEngineId)
      • setContextName

        public void setContextName​(String contextName)
      • getContextName

        public String getContextName()
      • setEnterpriseId

        public void setEnterpriseId​(String enterpriseId)
      • getEnterpriseId

        public String getEnterpriseId()
      • getSecurityName

        public String getSecurityName()
      • setSecurityName

        public void setSecurityName​(String securityName)
      • setSecurityLevel

        public void setSecurityLevel​(int securityLevel)
      • getSecurityLevel

        public int getSecurityLevel()
      • getRetryCount

        public int getRetryCount()

        getRetryCount

        Returns:
        a int.
      • setRetryCount

        public void setRetryCount​(int retryCount)

        setRetryCount

        Parameters:
        retryCount - a int.
      • getTimeout

        public int getTimeout()

        getTimeout

        Returns:
        a int.
      • setTimeout

        public void setTimeout​(int timeout)

        setTimeout

        Parameters:
        timeout - a int.
      • getVersion

        public String getVersion()

        getVersion

        Returns:
        a String object.
      • setVersion

        public void setVersion​(String version)

        setVersion

        Parameters:
        version - a String object.
      • getPort

        public int getPort()

        getPort

        Returns:
        a int.
      • setPort

        public void setPort​(int port)

        setPort

        Parameters:
        port - a int.
      • getMaxRequestSize

        public int getMaxRequestSize()
      • setMaxRequestSize

        public void setMaxRequestSize​(int maxRequestSize)
      • getProxyHost

        public String getProxyHost()
      • setProxyHost

        public void setProxyHost​(String proxyHost)
      • getLocation

        public String getLocation()
      • setLocation

        public void setLocation​(String location)
      • getTTL

        public Long getTTL()
      • setTTL

        public void setTTL​(Long ttl)
      • getRange

        public Range getRange()

        getRange

        Returns:
        a Range object.
      • isSpecific

        public boolean isSpecific()
        Determines if the configureSNMP event is for a specific address.
        Returns:
        true if there is no last IP address specified or if first and last are equal
      • createEvent

        public Event createEvent​(String source)
        Creates an event from this.
        Parameters:
        source - The source to set in the Event. Must not be null.
        Returns:
        The event which represents this.
      • createDef

        public Definition createDef()
        Creates an SNMP config definition representing the data in this class. The defintion will either have one specific IP element or one Range element.
        Returns:
        a Definition object.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object