|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jpragma.snmp.SnmpAgent
public class SnmpAgent
Snmp agent listens to snmp requests (get, getnext, set), invokes appropriate handler and returns snmp response. Default port is 161. Typical usage:
It is strongly recommended to set up the agent using Spring framework. Examples of both standard and annotated spring configurations are included in documentation.
Constructor Summary | |
---|---|
SnmpAgent()
|
Method Summary | |
---|---|
java.lang.String[] |
getHandledOidPrefixes()
|
int |
getListeningPort()
|
Mib2System |
getMib2System()
|
java.lang.String |
getReadOnlyComunity()
|
java.lang.String |
getReadWriteComunity()
|
void |
run()
|
void |
setHandledOidPrefixes(java.lang.String[] handledOidPrefixes)
Sets the list of OID prefixes served by this agent. |
void |
setListeningPort(int listeningPort)
Sets the port this agent is listening to. |
void |
setMib2System(Mib2System mib2System)
Sets the object containing properties to serve mib2 system (1.3.6.1.2.1) subtree. |
void |
setMibEntries(java.util.Set mibEntrySet)
Sets the list MIB entries served by this agent. |
void |
setProxySnmpClient(SnmpClient proxySnmpClient)
|
void |
setReadOnlyComunity(java.lang.String readOnlyComunity)
Sets read-only community. |
void |
setReadWriteComunity(java.lang.String readWriteComunity)
Sets read-write community. |
void |
start()
|
void |
stop()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SnmpAgent()
Method Detail |
---|
public void run()
run
in interface java.lang.Runnable
public void setMibEntries(java.util.Set mibEntrySet)
mibEntrySet
- mib entriespublic int getListeningPort()
public void setListeningPort(int listeningPort)
listeningPort
- listening portpublic java.lang.String getReadOnlyComunity()
public void setReadOnlyComunity(java.lang.String readOnlyComunity)
readOnlyComunity
- read-only communitypublic java.lang.String getReadWriteComunity()
public void setReadWriteComunity(java.lang.String readWriteComunity)
readWriteComunity
- read-write communitypublic Mib2System getMib2System()
public void setMib2System(Mib2System mib2System)
mib2System
- object describing system propertiespublic java.lang.String[] getHandledOidPrefixes()
public void setHandledOidPrefixes(java.lang.String[] handledOidPrefixes)
handledOidPrefixes
- array of oid prefixes e.g. ["1.3.6.1.2.1","1.3.6.1.4.1.28824"]public void setProxySnmpClient(SnmpClient proxySnmpClient)
public void start()
public void stop()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |