|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.snmp4j.agent.BaseAgent
org.opennms.mock.snmp.MockSnmpAgent
public class MockSnmpAgent
MockSnmpAgent class.
| Field Summary | |
|---|---|
static boolean |
allowSetOnMissingOid
|
| Fields inherited from class org.snmp4j.agent.BaseAgent |
|---|
agent, agentState, bootCounterFile, configFileURI, defaultContext, defaultPersistenceProvider, defaultProxyForwarder, dispatcher, mpv3, notificationOriginator, server, session, snmp4jConfigMIB, snmp4jLogMIB, snmpCommunityMIB, snmpFrameworkMIB, snmpNotificationMIB, snmpProxyMIB, snmpTargetMIB, snmpv2MIB, STATE_CREATED, STATE_INIT_FINISHED, STATE_INIT_STARTED, STATE_RUNNING, STATE_STOPPED, sysDescr, sysOID, sysServices, transportMappings, usm, usmMIB, vacmMIB |
| Constructor Summary | |
|---|---|
MockSnmpAgent(File confFile,
org.springframework.core.io.Resource moFile)
|
|
MockSnmpAgent(File confFile,
org.springframework.core.io.Resource moFile,
String bindAddress)
Constructor for MockSnmpAgent. |
|
| Method Summary | |
|---|---|
protected void |
addCommunities(org.snmp4j.agent.mo.snmp.SnmpCommunityMIB communityMIB)
|
protected void |
addNotificationTargets(org.snmp4j.agent.mo.snmp.SnmpTargetMIB targetMIB,
org.snmp4j.agent.mo.snmp.SnmpNotificationMIB notificationMIB)
|
protected void |
addUsmUser(org.snmp4j.security.USM usm)
|
protected void |
addViews(org.snmp4j.agent.mo.snmp.VacmMIB vacm)
|
static MockSnmpAgent |
createAgentAndRun(org.springframework.core.io.Resource moFile,
String bindAddress)
createAgentAndRun |
protected List<org.snmp4j.agent.ManagedObject> |
createMockMOs()
createMockMOs |
protected void |
initMessageDispatcher()
|
protected void |
initTransportMappings()
|
boolean |
isRunning()
isRunning |
boolean |
isStopped()
isStopped |
static void |
main(String[] args)
main |
static AgentConfigData |
parseCli(String[] args)
parseCli |
protected void |
registerManagedObjects()
|
protected void |
registerSnmpMIBs()
|
void |
run()
run |
void |
shutDown()
shutDown |
void |
shutDownAndWait()
shutDownAndWait |
String |
toString()
toString |
protected void |
unregisterManagedObjects()
|
protected void |
unregisterSnmpMIBs()
|
void |
updateCounter32Value(String oid,
int val)
updateCounter32Value |
void |
updateCounter64Value(String oid,
long val)
updateCounter64Value |
void |
updateIntValue(String oid,
int val)
updateIntValue |
void |
updateStringValue(String oid,
String val)
updateStringValue |
void |
updateValue(org.snmp4j.smi.OID oid,
org.snmp4j.smi.Variable value)
updateValue |
void |
updateValue(String oid,
org.snmp4j.smi.Variable value)
updateValue |
void |
updateValuesFromResource(org.springframework.core.io.Resource moFile)
updateValuesFromResource |
| Methods inherited from class org.snmp4j.agent.BaseAgent |
|---|
addShutdownHook, finishInit, getAgent, getAgentState, getBootCounterFile, getConfigFile, getContext, getDefaultContext, getDefaultProxyForwarder, getEngineBoots, getMPv3, getNotificationOriginator, getServer, getSession, getSnmp4jConfigMIB, getSnmp4jLogMIB, getSnmpCommunityMIB, getSnmpFrameworkMIB, getSnmpNotificationMIB, getSnmpProxyMIB, getSnmpTargetMIB, getSnmpv2MIB, getSysDescr, getSysOID, getSysServices, getUsm, getUsmMIB, getVacmMIB, init, initConfigMIB, initSnmpSession, loadConfig, saveConfig, sendColdStartNotification, setAgent, setBootCounterFile, setConfigFile, setDefaultContext, setDefaultProxyForwarder, setEngineBoots, setSysDescr, setSysOID, setSysServices, setupDefaultProxyForwarder, stop, updateEngineBoots, updateSession |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static boolean allowSetOnMissingOid
| Constructor Detail |
|---|
public MockSnmpAgent(File confFile,
org.springframework.core.io.Resource moFile)
public MockSnmpAgent(File confFile,
org.springframework.core.io.Resource moFile,
String bindAddress)
Constructor for MockSnmpAgent.
bootFile - a File object.confFile - a File object.moFile - a Resource object.bindAddress - a String object.
IOException| Method Detail |
|---|
public static MockSnmpAgent createAgentAndRun(org.springframework.core.io.Resource moFile,
String bindAddress)
throws InterruptedException
createAgentAndRun
moFile - a Resource object.bindAddress - a String object.
MockSnmpAgent object.
InterruptedException - if any.public static void main(String[] args)
main
args - an array of String objects.public static AgentConfigData parseCli(String[] args)
parseCli
args - an array of String objects.
AgentConfigData object.protected void initMessageDispatcher()
initMessageDispatcher in class org.snmp4j.agent.BaseAgent
public void shutDownAndWait()
throws InterruptedException
shutDownAndWait
InterruptedException - if any.public void run()
run
run in interface Runnablerun in class org.snmp4j.agent.BaseAgentpublic void shutDown()
shutDown
public boolean isRunning()
isRunning
public boolean isStopped()
isStopped
protected void addCommunities(org.snmp4j.agent.mo.snmp.SnmpCommunityMIB communityMIB)
addCommunities in class org.snmp4j.agent.BaseAgentprotected void addViews(org.snmp4j.agent.mo.snmp.VacmMIB vacm)
addViews in class org.snmp4j.agent.BaseAgent
protected void addNotificationTargets(org.snmp4j.agent.mo.snmp.SnmpTargetMIB targetMIB,
org.snmp4j.agent.mo.snmp.SnmpNotificationMIB notificationMIB)
addNotificationTargets in class org.snmp4j.agent.BaseAgentprotected void addUsmUser(org.snmp4j.security.USM usm)
addUsmUser in class org.snmp4j.agent.BaseAgent
protected void initTransportMappings()
throws IOException
initTransportMappings in class org.snmp4j.agent.BaseAgentIOExceptionprotected void registerSnmpMIBs()
registerSnmpMIBs in class org.snmp4j.agent.BaseAgentprotected void unregisterSnmpMIBs()
unregisterSnmpMIBs in class org.snmp4j.agent.BaseAgentprotected void registerManagedObjects()
registerManagedObjects in class org.snmp4j.agent.BaseAgentprotected void unregisterManagedObjects()
unregisterManagedObjects in class org.snmp4j.agent.BaseAgentprotected List<org.snmp4j.agent.ManagedObject> createMockMOs()
createMockMOs
List object.
public void updateValue(org.snmp4j.smi.OID oid,
org.snmp4j.smi.Variable value)
updateValue
oid - a OID object.value - a Variable object.
public void updateValue(String oid,
org.snmp4j.smi.Variable value)
updateValue
oid - a String object.value - a Variable object.
public void updateIntValue(String oid,
int val)
updateIntValue
oid - a String object.val - a int.
public void updateStringValue(String oid,
String val)
updateStringValue
oid - a String object.val - a String object.
public void updateCounter32Value(String oid,
int val)
updateCounter32Value
oid - a String object.val - a int.
public void updateCounter64Value(String oid,
long val)
updateCounter64Value
oid - a String object.val - a long.public void updateValuesFromResource(org.springframework.core.io.Resource moFile)
updateValuesFromResource
moFile - a Resource object.public String toString()
toString
toString in class ObjectString object.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||