Method Summary |
|
abstract protected void | addCommunities(SnmpCommunityMIB communityMIB) Adds community to security name mappings needed for SNMPv1 and SNMPv2c. |
abstract protected void | addNotificationTargets(SnmpTargetMIB targetMIB, SnmpNotificationMIB notificationMIB) Adds initial notification targets and filters. |
protected void | addShutdownHook() Adds a shutdown hook that saves the internal config into the config file
when a SIGTERM (Ctrl-C) is terminating the agent. |
abstract protected void | addUsmUser(USM usm) Adds all the necessary initial users to the USM. |
abstract protected void | addViews(VacmMIB vacmMIB) Adds initial VACM configuration. |
protected void | finishInit() Finishes intialization of the agent by connecting server and command
processor, setting up USM, VACM, notification targets, and finally sending
a coldStart notification to configured targets. |
public CommandProcessor | getAgent() |
public int | getAgentState() Returns the agent's state. |
public File | getBootCounterFile() |
public File | getConfigFile() |
protected OctetString | getContext(MOGroup mibGroup) This method can be overwritten by a subagent to specify the contexts
each MIB module (group) will be registered to. |
public OctetString | getDefaultContext() Returns the default context - which is the context that is used by the
base agent to register its MIB objects. |
public ProxyForwarder | getDefaultProxyForwarder() |
protected int | getEngineBoots() Reads the engine boots counter from the corresponding input stream (file). |
public MPv3 | getMPv3() |
public NotificationOriginator | getNotificationOriginator() |
public DefaultMOServer | getServer() |
public Snmp | getSession() |
public Snmp4jConfigMib | getSnmp4jConfigMIB() |
public Snmp4jLogMib | getSnmp4jLogMIB() |
public SnmpCommunityMIB | getSnmpCommunityMIB() |
public SnmpFrameworkMIB | getSnmpFrameworkMIB() |
public SnmpNotificationMIB | getSnmpNotificationMIB() |
public SnmpProxyMIB | getSnmpProxyMIB() |
public SnmpTargetMIB | getSnmpTargetMIB() |
public SNMPv2MIB | getSnmpv2MIB() |
public OctetString | getSysDescr() |
public OID | getSysOID() |
public Integer32 | getSysServices() |
public USM | getUsm() |
public UsmMIB | getUsmMIB() |
public VacmMIB | getVacmMIB() |
public void | init() Initialize transport mappings, message dispatcher, basic MIB modules,
proxy forwarder, VACM and USM security, and custom MIB modules and objects
provided by sub-classes. |
protected void | initMessageDispatcher() Initializes the message dispatcher (
MessageDispatcherImpl ) with
the transport mappings. |
protected void | initSnmpSession() |
protected void | initTransportMappings() Initializes the transport mappings (ports) to be used by the agent. |
public void | loadConfig(int importMode) Loads the configuration using the specified import mode from the set
config file. |
public void | loadConfig(InputStream configFile, int importMode) Loads the configuration using the specified import mode from the set
config file. |
abstract protected void | registerManagedObjects() Register additional managed objects at the agent's server. |
protected void | registerSnmpMIBs() Register the basic MIB modules at the agent's MOServer . |
public void | run() Starts the agent by let it listen on the configured SNMP agent ports
(transpot mappings). |
public void | saveConfig() Save the current (serializable) managed object configuration into
the config file. |
public void | saveConfig(OutputStream configFile) Saves the current (serializable) managed object configuration into the
specified config file (output stream). |
protected void | sendColdStartNotification() |
public void | setAgent(CommandProcessor agent) |
public void | setBootCounterFile(File bootCounterFile) |
public void | setConfigFile(File configFile) |
public void | setDefaultContext(OctetString defaultContext) Sets the default context for this base agent. |
public void | setDefaultProxyForwarder(ProxyForwarder defaultProxyForwarder) |
protected void | setEngineBoots(int engineBoots) |
public void | setSysDescr(OctetString sysDescr) |
public void | setSysOID(OID sysOID) |
public void | setSysServices(Integer32 sysServices) |
protected void | setupDefaultProxyForwarder() Creates and registers the default proxy forwarder application
(
ProxyForwarderImpl ). |
public void | stop() Stops the agent by closing the SNMP session and associated transport
mappings. |
abstract protected void | unregisterManagedObjects() Unregister additional managed objects from the agent's server. |
protected void | unregisterSnmpMIBs() Unregister the basic MIB modules from the agent's MOServer . |
protected int | updateEngineBoots() Updates the engine boots counter and returns the actual value. |