|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.snmp4j.agent.BaseAgent
org.snmp4j.agent.mo.jmx.example.JMXTestAgent
public class JMXTestAgent
The JMXTestAgent is a sample SNMP agent implementation of all
features (MIB implementations) provided by the SNMP4J-AgentJMX framework.
For demonstration purposes, the agent implements the JVM-MANAGEMENT-MIB as
far as this can be done without violating the SNMP standard. There are flaws
in that MIB module that violate the SNMP standard which have been implemented
in a standard conforming way.
| Field Summary | |
|---|---|
protected java.lang.String |
address
|
| Fields inherited from class org.snmp4j.agent.BaseAgent |
|---|
agent, agentState, bootCounterFile, configFile, defaultContext, defaultProxyForwarder, dispatcher, mpv3, notificationOriginator, server, session, snmp4jConfigMIB, snmp4jLogMIB, snmpCommunityMIB, snmpFrameworkMIB, 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 | |
|---|---|
JMXTestAgent(java.io.File bootCounterFile,
java.io.File configFile)
Creates the test agent with a file to read and store the boot counter and a file to read and store its configuration. |
|
| Method Summary | |
|---|---|
protected void |
addCommunities(org.snmp4j.agent.mo.snmp.SnmpCommunityMIB communityMIB)
|
protected void |
addNotificationTargets(org.snmp4j.agent.mo.snmp.SnmpTargetMIB targetMIB,
org.snmp4j.agent.mo.snmp.SnmpNotificationMIB notificationMIB)
|
protected void |
addUsmUser(org.snmp4j.security.USM usm)
|
protected void |
addViews(org.snmp4j.agent.mo.snmp.VacmMIB vacm)
|
protected void |
initTransportMappings()
|
static void |
main(java.lang.String[] args)
|
protected void |
registerManagedObjects()
|
protected void |
registerSnmpMIBs()
|
protected void |
unregisterManagedObjects()
|
| 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, getSnmpNotificationMIB, getSnmpProxyMIB, getSnmpTargetMIB, getSnmpv2MIB, getSysDescr, getSysOID, getSysServices, getUsm, getUsmMIB, getVacmMIB, init, initMessageDispatcher, initSnmpSession, loadConfig, loadConfig, run, saveConfig, saveConfig, sendColdStartNotification, setAgent, setBootCounterFile, setConfigFile, setDefaultContext, setDefaultProxyForwarder, setEngineBoots, setSysDescr, setSysOID, setSysServices, setupDefaultProxyForwarder, stop, unregisterSnmpMIBs, updateEngineBoots |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String address
| Constructor Detail |
|---|
public JMXTestAgent(java.io.File bootCounterFile,
java.io.File configFile)
throws java.io.IOException
bootCounterFile - a file containing the boot counter in serialized form (as expected by
BaseAgent).configFile - a configuration file with serialized management information.
java.io.IOException - if the boot counter or config file cannot be read properly.| Method Detail |
|---|
protected void registerManagedObjects()
registerManagedObjects in class org.snmp4j.agent.BaseAgent
protected void addNotificationTargets(org.snmp4j.agent.mo.snmp.SnmpTargetMIB targetMIB,
org.snmp4j.agent.mo.snmp.SnmpNotificationMIB notificationMIB)
addNotificationTargets in class org.snmp4j.agent.BaseAgentprotected void addViews(org.snmp4j.agent.mo.snmp.VacmMIB vacm)
addViews in class org.snmp4j.agent.BaseAgentprotected void addUsmUser(org.snmp4j.security.USM usm)
addUsmUser in class org.snmp4j.agent.BaseAgent
protected void initTransportMappings()
throws java.io.IOException
initTransportMappings in class org.snmp4j.agent.BaseAgentjava.io.IOExceptionpublic static void main(java.lang.String[] args)
protected void unregisterManagedObjects()
unregisterManagedObjects in class org.snmp4j.agent.BaseAgentprotected void addCommunities(org.snmp4j.agent.mo.snmp.SnmpCommunityMIB communityMIB)
addCommunities in class org.snmp4j.agent.BaseAgentprotected void registerSnmpMIBs()
registerSnmpMIBs in class org.snmp4j.agent.BaseAgent
|
Copyright 2006-2007 Frank Fock (SNMP4J.org) | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||