Class SnmpDetector
- java.lang.Object
-
- org.opennms.netmgt.provision.support.AbstractDetector
-
- org.opennms.netmgt.provision.support.AgentBasedSyncAbstractDetector<SnmpAgentConfig>
-
- org.opennms.netmgt.provision.detector.snmp.SnmpDetector
-
- All Implemented Interfaces:
ServiceDetector
,SyncServiceDetector
- Direct Known Subclasses:
BgpSessionDetector
,CiscoIpSlaDetector
,DiskUsageDetector
,HostResourceSWRunDetector
,OmsaStorageDetector
,OpenManageChassisDetector
,PercDetector
,Win32ServiceDetector
public class SnmpDetector extends AgentBasedSyncAbstractDetector<SnmpAgentConfig>
SnmpDetector class.
- Version:
- $Id: $
- Author:
- ranger
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SnmpDetector.MatchType
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String
DEFAULT_SERVICE_NAME
ConstantDEFAULT_SERVICE_NAME="SNMP"
-
Fields inherited from class org.opennms.netmgt.provision.support.AgentBasedSyncAbstractDetector
HAS_MULTIPLE_AGENT_CONFIGS
-
-
Constructor Summary
Constructors Constructor Description SnmpDetector()
Constructor for SnmpDetector.SnmpDetector(java.lang.String serviceName, int port)
Constructor for creating a non-default service based on this protocol
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
configureAgentPTR(SnmpAgentConfig agentConfig)
configureAgentPTRprotected void
configureAgentVersion(SnmpAgentConfig agentConfig)
configureAgentVersionvoid
dispose()
disposeSnmpAgentConfig
getAgentConfig(DetectRequest request)
java.lang.String
getForceVersion()
getForceVersionjava.lang.String
getHex()
java.lang.String
getIsTable()
java.util.List<SnmpAgentConfig>
getListOfAgentConfigs(DetectRequest request)
Override this if detector can support multiple agent configs.java.lang.String
getMatchType()
java.lang.String
getOid()
getOidprotected static java.lang.String
getValue(SnmpAgentConfig agentConfig, java.lang.String oid, boolean hex)
getValuejava.lang.String
getVbvalue()
getVbvalueprotected boolean
isHex()
boolean
isServiceDetected(java.net.InetAddress address, java.util.List<SnmpAgentConfig> agentConfigList)
boolean
isServiceDetected(java.net.InetAddress address, SnmpAgentConfig agentConfig)
protected void
onInit()
onInitvoid
setForceVersion(java.lang.String forceVersion)
setForceVersionvoid
setHex(java.lang.String hex)
void
setIsTable(java.lang.String table)
void
setMatchType(java.lang.String matchType)
void
setOid(java.lang.String oid)
setOidvoid
setSnmpDetectorExecutor(java.util.concurrent.ExecutorService snmpDetectorExecutor)
void
setUseSnmpProfiles(java.lang.String useSnmpProfiles)
void
setVbvalue(java.lang.String vbvalue)
setVbvalue-
Methods inherited from class org.opennms.netmgt.provision.support.AgentBasedSyncAbstractDetector
detect, hasMultipleAgentConfigs
-
Methods inherited from class org.opennms.netmgt.provision.support.AbstractDetector
getIpMatch, getPort, getRetries, getServiceName, getTimeout, init, setIpMatch, setPort, setRetries, setServiceName, setTimeout
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opennms.netmgt.provision.ServiceDetector
getIpMatch, getPort, getServiceName, getTimeout, init, setIpMatch, setPort, setServiceName, setTimeout
-
-
-
-
Field Detail
-
DEFAULT_SERVICE_NAME
protected static final java.lang.String DEFAULT_SERVICE_NAME
ConstantDEFAULT_SERVICE_NAME="SNMP"
- See Also:
- Constant Field Values
-
-
Method Detail
-
getIsTable
public java.lang.String getIsTable()
-
setIsTable
public void setIsTable(java.lang.String table)
-
setHex
public void setHex(java.lang.String hex)
-
getHex
public java.lang.String getHex()
-
isHex
protected boolean isHex()
-
getAgentConfig
public SnmpAgentConfig getAgentConfig(DetectRequest request)
- Specified by:
getAgentConfig
in classAgentBasedSyncAbstractDetector<SnmpAgentConfig>
-
isServiceDetected
public boolean isServiceDetected(java.net.InetAddress address, SnmpAgentConfig agentConfig)
- Specified by:
isServiceDetected
in classAgentBasedSyncAbstractDetector<SnmpAgentConfig>
-
getListOfAgentConfigs
public java.util.List<SnmpAgentConfig> getListOfAgentConfigs(DetectRequest request)
Description copied from class:AgentBasedSyncAbstractDetector
Override this if detector can support multiple agent configs.- Overrides:
getListOfAgentConfigs
in classAgentBasedSyncAbstractDetector<SnmpAgentConfig>
-
isServiceDetected
public boolean isServiceDetected(java.net.InetAddress address, java.util.List<SnmpAgentConfig> agentConfigList)
- Overrides:
isServiceDetected
in classAgentBasedSyncAbstractDetector<SnmpAgentConfig>
-
configureAgentVersion
protected void configureAgentVersion(SnmpAgentConfig agentConfig)
configureAgentVersion
- Parameters:
agentConfig
- aSnmpAgentConfig
object.
-
configureAgentPTR
protected void configureAgentPTR(SnmpAgentConfig agentConfig)
configureAgentPTR
- Parameters:
agentConfig
- aSnmpAgentConfig
object.
-
getValue
protected static java.lang.String getValue(SnmpAgentConfig agentConfig, java.lang.String oid, boolean hex)
getValue
- Parameters:
agentConfig
- aSnmpAgentConfig
object.oid
- aString
object.- Returns:
- a
String
object.
-
setOid
public void setOid(java.lang.String oid)
setOid
- Parameters:
oid
- aString
object.
-
getOid
public java.lang.String getOid()
getOid
- Returns:
- a
String
object.
-
setForceVersion
public void setForceVersion(java.lang.String forceVersion)
setForceVersion
- Parameters:
forceVersion
- aString
object.
-
getForceVersion
public java.lang.String getForceVersion()
getForceVersion
- Returns:
- a
String
object.
-
setVbvalue
public void setVbvalue(java.lang.String vbvalue)
setVbvalue
- Parameters:
vbvalue
- aString
object.
-
getVbvalue
public java.lang.String getVbvalue()
getVbvalue
- Returns:
- a
String
object.
-
onInit
protected void onInit()
onInit
- Specified by:
onInit
in classAbstractDetector
-
dispose
public void dispose()
dispose
- Specified by:
dispose
in interfaceServiceDetector
- Specified by:
dispose
in classAbstractDetector
-
setMatchType
public void setMatchType(java.lang.String matchType)
-
getMatchType
public java.lang.String getMatchType()
-
setSnmpDetectorExecutor
public void setSnmpDetectorExecutor(java.util.concurrent.ExecutorService snmpDetectorExecutor)
-
setUseSnmpProfiles
public void setUseSnmpProfiles(java.lang.String useSnmpProfiles)
-
-