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
FieldsFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddCommunities(SnmpCommunityMIB communityMIB) Adds community to security name mappings needed for SNMPv1 and SNMPv2c.protected voidaddNotificationTargets(SnmpTargetMIB targetMIB, SnmpNotificationMIB notificationMIB) Adds initial notification targets and filters.protected voidaddUsmUser(org.snmp4j.security.USM usm) Adds all the necessary initial users to the USM.protected voidAdds initial VACM configuration.protected voidInitializes the transport mappings (ports) to be used by the agent.static voidprotected voidRegister additional managed objects at the agent's server.protected voidUnregister 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:
addCommunitiesin classBaseAgent- Parameters:
communityMIB- the SnmpCommunityMIB holding coexistence configuration for community based security models.
-
addNotificationTargets
Adds initial notification targets and filters.- Specified by:
addNotificationTargetsin 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:
addUsmUserin 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:
registerManagedObjectsin classBaseAgent
-
unregisterManagedObjects
protected void unregisterManagedObjects()Unregister additional managed objects from the agent's server.- Specified by:
unregisterManagedObjectsin classBaseAgent
-
initTransportMappings
Description copied from class:BaseAgentInitializes the transport mappings (ports) to be used by the agent.- Overrides:
initTransportMappingsin classBaseAgent- Throws:
IOException- if an IO exception occurs while initializing the default transport mapping on all local IP addresses on port 161.
-
main
-