public class WaarpSnmpAgent
extends org.snmp4j.agent.BaseAgent
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 and Description |
---|
WaarpSnmpAgent(File configurationFile,
WaarpInterfaceMonitor monitor,
WaarpInterfaceMib mib) |
Modifier and Type | Method and Description |
---|---|
protected void |
addCommunities(org.snmp4j.agent.mo.snmp.SnmpCommunityMIB communityMIB)
The table of community strings configured in the SNMP engine's Local
Configuration Datastore (LCD).
|
protected void |
addNotificationTargets(org.snmp4j.agent.mo.snmp.SnmpTargetMIB targetMIB,
org.snmp4j.agent.mo.snmp.SnmpNotificationMIB notificationMIB)
Adds initial notification targets and filters.
|
protected void |
addUsmUser(org.snmp4j.security.USM usm)
Adds all the necessary initial users to the USM.
|
protected void |
addViews(org.snmp4j.agent.mo.snmp.VacmMIB vacm)
Minimal View based Access Control
http://www.faqs.org/rfcs/rfc2575.html
|
WaarpInterfaceMib |
getMib() |
WaarpInterfaceMonitor |
getMonitor() |
int |
getTrapLevel() |
long |
getUptime() |
long |
getUptimeSystemTime() |
protected void |
initTransportMappings() |
protected void |
registerManagedObjects()
Register additional managed objects at the agent's server.
|
protected void |
sendColdStartNotification() |
protected void |
sendShutdownNotification()
Send a Notification just before Shutdown the SNMP service.
|
void |
setTrapLevel(int trapLevel) |
void |
start()
Start method invokes some initialization methods needed to start the
agent
|
void |
stop() |
void |
unregisterManagedObject(org.snmp4j.agent.MOGroup moGroup) |
protected void |
unregisterManagedObjects()
Unregister the basic MIB modules from the agent's MOServer.
|
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, setAgent, setBootCounterFile, setConfigFile, setDefaultContext, setDefaultProxyForwarder, setSysDescr, setSysOID, setSysServices, setupDefaultProxyForwarder, unregisterSnmpMIBs, updateEngineBoots, updateSession
public WaarpSnmpAgent(File configurationFile, WaarpInterfaceMonitor monitor, WaarpInterfaceMib mib) throws IllegalArgumentException
configurationFile
- XML formatmonitor
- the associated monitormib
- the associated MIBIllegalArgumentException
public final WaarpInterfaceMonitor getMonitor()
public final WaarpInterfaceMib getMib()
public final long getUptime()
public final long getUptimeSystemTime()
protected final void registerManagedObjects()
registerManagedObjects
in class org.snmp4j.agent.BaseAgent
protected final void unregisterManagedObjects()
unregisterManagedObjects
in class org.snmp4j.agent.BaseAgent
public final void unregisterManagedObject(org.snmp4j.agent.MOGroup moGroup)
moGroup
- protected final void addUsmUser(org.snmp4j.security.USM usm)
addUsmUser
in class org.snmp4j.agent.BaseAgent
protected final void addNotificationTargets(org.snmp4j.agent.mo.snmp.SnmpTargetMIB targetMIB, org.snmp4j.agent.mo.snmp.SnmpNotificationMIB notificationMIB)
addNotificationTargets
in class org.snmp4j.agent.BaseAgent
protected final void addViews(org.snmp4j.agent.mo.snmp.VacmMIB vacm)
http://www.faqs.org/rfcs/rfc2575.html
addViews
in class org.snmp4j.agent.BaseAgent
protected final void addCommunities(org.snmp4j.agent.mo.snmp.SnmpCommunityMIB communityMIB)
We only configure one, "public".
addCommunities
in class org.snmp4j.agent.BaseAgent
protected final void initTransportMappings() throws IOException
initTransportMappings
in class org.snmp4j.agent.BaseAgent
IOException
public final void start() throws IOException
IOException
protected final void sendColdStartNotification()
sendColdStartNotification
in class org.snmp4j.agent.BaseAgent
protected final void sendShutdownNotification()
public final void stop()
stop
in class org.snmp4j.agent.BaseAgent
public final int getTrapLevel()
public final void setTrapLevel(int trapLevel)
trapLevel
- the trapLevel to setCopyright © 2009–2022 Waarp. All rights reserved.