Package org.snmp4j.agent.test
Class SnapshotAgent
java.lang.Object
org.snmp4j.agent.BaseAgent
org.snmp4j.agent.test.SnapshotAgent
- All Implemented Interfaces:
Runnable
- Version:
- 1.0
- Author:
- Frank Fock
-
Field Summary
Fields inherited from class 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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addCommunities
(SnmpCommunityMIB communityMIB) Adds community to security name mappings needed for SNMPv1 and SNMPv2c.protected void
addNotificationTargets
(SnmpTargetMIB targetMIB, 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
Adds initial VACM configuration.protected void
Initializes the transport mappings (ports) to be used by the agent.static void
protected void
Register additional managed objects at the agent's server.protected void
Unregister additional managed objects from the agent's server.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, 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
-
Field Details
-
address
-
snapshot
-
groups
-
-
Constructor Details
-
SnapshotAgent
- Throws:
IOException
-
-
Method Details
-
addCommunities
Adds community to security name mappings needed for SNMPv1 and SNMPv2c.- Specified by:
addCommunities
in classBaseAgent
- Parameters:
communityMIB
- the SnmpCommunityMIB holding coexistence configuration for community based security models.
-
addNotificationTargets
Adds initial notification targets and filters.- Specified by:
addNotificationTargets
in classBaseAgent
- Parameters:
targetMIB
- the SnmpTargetMIB holding the target configuration.notificationMIB
- the SnmpNotificationMIB holding the notification (filter) configuration.
-
addUsmUser
protected void addUsmUser(org.snmp4j.security.USM usm) Adds all the necessary initial users to the USM.- Specified by:
addUsmUser
in classBaseAgent
- Parameters:
usm
- the USM instance used by this agent.
-
addViews
Adds initial VACM configuration. -
registerManagedObjects
protected void registerManagedObjects()Register additional managed objects at the agent's server.- Specified by:
registerManagedObjects
in classBaseAgent
-
unregisterManagedObjects
protected void unregisterManagedObjects()Unregister additional managed objects from the agent's server.- Specified by:
unregisterManagedObjects
in classBaseAgent
-
initTransportMappings
Description copied from class:BaseAgent
Initializes the transport mappings (ports) to be used by the agent.- Overrides:
initTransportMappings
in classBaseAgent
- Throws:
IOException
- if an IO exception occurs while initializing the default transport mapping on all local IP addresses on port 161.
-
main
-