Runnable
public class SnmpmanAgent
extends org.snmp4j.agent.BaseAgent
Snmpman
. The agent simulates the SNMP-capable devices.
SnmpmanAgent(com.oneandone.snmpman.configuration.AgentConfiguration)
, which
requires an instance of the AgentConfiguration
.agent, agentState, bootCounterFile, configFileURI, defaultContext, defaultPersistenceProvider, defaultProxyForwarder, dispatcher, mpv3, notificationOriginator, server, session, snmp4jConfigMIB, snmp4jLogMIB, snmpCommunityMIB, snmpFrameworkMIB, snmpMpdMib, snmpNotificationMIB, snmpProxyMIB, snmpTargetMIB, snmpv2MIB, STATE_CREATED, STATE_INIT_FINISHED, STATE_INIT_STARTED, STATE_RUNNING, STATE_STOPPED, sysDescr, sysOID, sysServices, transportMappings, usm, usmMIB, vacmMIB
Constructor | Description |
---|---|
SnmpmanAgent(AgentConfiguration configuration) |
Initializes a new instance of an SNMP agent.
|
Modifier and Type | Method | Description |
---|---|---|
protected void |
addCommunities(org.snmp4j.agent.mo.snmp.SnmpCommunityMIB snmpCommunityMIB) |
|
protected void |
addNotificationTargets(org.snmp4j.agent.mo.snmp.SnmpTargetMIB snmpTargetMIB,
org.snmp4j.agent.mo.snmp.SnmpNotificationMIB snmpNotificationMIB) |
|
protected void |
addUsmUser(org.snmp4j.security.USM usm) |
|
protected void |
addViews(org.snmp4j.agent.mo.snmp.VacmMIB vacmMIB) |
|
void |
execute() |
Starts this agent instance.
|
String |
getName() |
Returns the name of
this agent. |
protected void |
initTransportMappings() |
|
protected void |
registerManagedObjects() |
|
protected void |
unregisterManagedObjects() |
addShutdownHook, finishInit, getAgent, getAgentState, getBootCounterFile, getConfigFile, getContext, getDefaultContext, getDefaultProxyForwarder, getEngineBoots, getMPv3, getNotificationOriginator, getServer, getSession, getSnmp4jConfigMIB, getSnmp4jLogMIB, getSnmpCommunityMIB, getSnmpFrameworkMIB, getSnmpMpdMib, getSnmpNotificationMIB, getSnmpProxyMIB, getSnmpTargetMIB, getSnmpv2MIB, getSysDescr, getSysOID, getSysServices, getUsm, getUsmMIB, getVacmMIB, init, initConfigMIB, initMessageDispatcher, initSnmpSession, loadConfig, registerSnmpMIBs, run, saveConfig, sendColdStartNotification, setAgent, setBootCounterFile, setConfigFile, setDefaultContext, setDefaultProxyForwarder, setSysDescr, setSysOID, setSysServices, setupDefaultProxyForwarder, stop, unregisterSnmpMIBs, updateEngineBoots, updateSession
public SnmpmanAgent(AgentConfiguration configuration)
configuration
- the configuration for this agentpublic String getName()
this
agent.
AgentConfiguration.name
for more information on the return value.this
agent.public void execute() throws IOException
IOException
- signals that this agent could not be initialized by the BaseAgent.init()
methodprotected void initTransportMappings() throws IOException
initTransportMappings
in class org.snmp4j.agent.BaseAgent
IOException
protected void registerManagedObjects()
registerManagedObjects
in class org.snmp4j.agent.BaseAgent
protected void unregisterManagedObjects()
unregisterManagedObjects
in class org.snmp4j.agent.BaseAgent
protected void addUsmUser(org.snmp4j.security.USM usm)
addUsmUser
in class org.snmp4j.agent.BaseAgent
protected void addNotificationTargets(org.snmp4j.agent.mo.snmp.SnmpTargetMIB snmpTargetMIB, org.snmp4j.agent.mo.snmp.SnmpNotificationMIB snmpNotificationMIB)
addNotificationTargets
in class org.snmp4j.agent.BaseAgent
protected void addViews(org.snmp4j.agent.mo.snmp.VacmMIB vacmMIB)
addViews
in class org.snmp4j.agent.BaseAgent
protected void addCommunities(org.snmp4j.agent.mo.snmp.SnmpCommunityMIB snmpCommunityMIB)
addCommunities
in class org.snmp4j.agent.BaseAgent
Copyright © 2018. All rights reserved.