Package org.opennms.netmgt.config
Class SnmpEventInfo
- java.lang.Object
-
- org.opennms.netmgt.config.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 Summary
Constructors Constructor Description SnmpEventInfo()
Default constructorSnmpEventInfo(IEvent event)
Constructor for SnmpEventInfo.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Definition
createDef()
Creates an SNMP config definition representing the data in this class.Event
createEvent(String source)
Creates an event fromthis
.boolean
equals(Object obj)
String
getAuthPassphrase()
String
getAuthProtocol()
String
getCommunityString()
Deprecated.usegetReadCommunityString()
instead.String
getContextEngineId()
String
getContextName()
String
getEngineId()
String
getEnterpriseId()
String
getFirstIPAddress()
getFirstIPAddressString
getLastIPAddress()
getLastIPAddressString
getLocation()
int
getMaxRepetitions()
int
getMaxRequestSize()
int
getMaxVarsPerPdu()
int
getPort()
getPortString
getPrivPassPhrase()
String
getPrivProtocol()
String
getProxyHost()
Range
getRange()
getRangeString
getReadCommunityString()
int
getRetryCount()
getRetryCountint
getSecurityLevel()
String
getSecurityName()
int
getTimeout()
getTimeoutLong
getTTL()
String
getVersion()
getVersionString
getWriteCommunityString()
int
hashCode()
boolean
isSpecific()
Determines if the configureSNMP event is for a specific address.void
setAuthPassPhrase(String authPassPhrase)
void
setAuthProtocol(String authProtocol)
void
setCommunityString(String communityString)
Deprecated.usesetReadCommunityString(String)
instead.void
setContextEngineId(String contextEngineId)
void
setContextName(String contextName)
void
setEngineId(String engineId)
void
setEnterpriseId(String enterpriseId)
void
setFirstIPAddress(String firstIPAddress)
setFirstIPAddressvoid
setFirstIPAddress(InetAddress firstIPAddress)
setFirstIPAddressvoid
setLastIPAddress(String lastIPAddress)
setLastIPAddressvoid
setLastIPAddress(InetAddress lastIPAddress)
setLastIPAddressvoid
setLocation(String location)
void
setMaxRepetitions(int maxRepetitions)
void
setMaxRequestSize(int maxRequestSize)
void
setMaxVarsPerPdu(int maxVarsPerPdu)
void
setPort(int port)
setPortvoid
setPrivPassPhrase(String privPassPhrase)
void
setPrivProtocol(String privProtocol)
void
setProxyHost(String proxyHost)
void
setReadCommunityString(String readCommunityString)
void
setRetryCount(int retryCount)
setRetryCountvoid
setSecurityLevel(int securityLevel)
void
setSecurityName(String securityName)
void
setTimeout(int timeout)
setTimeoutvoid
setTTL(Long ttl)
void
setVersion(String version)
setVersionvoid
setWriteCommunityString(String writeCommunityString)
String
toString()
-
-
-
Method Detail
-
getCommunityString
@Deprecated public String getCommunityString()
Deprecated.usegetReadCommunityString()
instead.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.usesetReadCommunityString(String)
instead.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()
-
setFirstIPAddress
public void setFirstIPAddress(String firstIPAddress) throws UnknownHostException
setFirstIPAddress
- Parameters:
firstIPAddress
- aString
object.- Throws:
UnknownHostException
- if any.
-
setFirstIPAddress
public void setFirstIPAddress(InetAddress firstIPAddress)
setFirstIPAddress
- Parameters:
firstIPAddress
- aInetAddress
object.
-
setLastIPAddress
public void setLastIPAddress(String lastIPAddress) throws UnknownHostException
setLastIPAddress
- Parameters:
lastIPAddress
- aString
object.- Throws:
UnknownHostException
- if any.
-
setLastIPAddress
public void setLastIPAddress(InetAddress lastIPAddress)
setLastIPAddress
- Parameters:
lastIPAddress
- aInetAddress
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.
-
setVersion
public void setVersion(String version)
setVersion
- Parameters:
version
- aString
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)
-
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 fromthis
.- 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.
-
-