|
Luky Library - 4.1.1 (20061117-1148) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectluky.events.MyEventManager
luky.snmp.AdvancedSnmpManager
public class AdvancedSnmpManager
The AdvancedSnmpManager creates a re-entrend version of the SnmpManager the idea is to save significant memory and boost performance.
The fired ExtendedEvents hold event data "host" "oid" and "result"
Revision Changes :
![]() |
![]() |
| Field Summary |
|---|
| Fields inherited from class luky.events.MyEventManager |
|---|
listenerList |
| Constructor Summary | |
|---|---|
AdvancedSnmpManager(String community,
int port,
int interval)
Constructor. |
|
| Method Summary | |
|---|---|
String |
addOid(String host,
String oidName,
String mib)
adds a new Oid for this manager |
boolean |
initOk()
tells if the constructor could initialize the snmp context correctly better not use the manager is it is false |
String |
performGet(String host,
String oidName,
String mib)
performs a snmp get for oidName (optionally in mib) with value decodes the result |
String |
performGet(String host,
String oidName,
String mib,
boolean decode)
performs a snmp get for oidName (optionally in mib) with value |
String |
performSet(String host,
String oidName,
String mib,
String value)
performs a snmp set for oidName (optionally in mib) with value |
void |
run()
performs a get operation for the added oid, in a continious polling |
void |
start()
starts a new thread to poll stored oid, sends event on state change |
void |
stop()
stop the polling, destoys the context of the poll |
void |
update(Observable obs,
Object ov)
Implementing the Observer interface. |
| Methods inherited from class luky.events.MyEventManager |
|---|
addMyEventListener, fireMyEvent, removeMyEventListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AdvancedSnmpManager(String community,
int port,
int interval)
community - snmp community string (suggest: "public")port - snmp port, 161 is normalinterval - delay between polls, in microseconds| Method Detail |
|---|
public String addOid(String host,
String oidName,
String mib)
host - the host to be polledoidName - can be a number .1.3.etc or a id eg. sysUptime.0mib - mib file (full path) to translate a mib, if the oid needs it e.g. sysUptime.0
public void update(Observable obs,
Object ov)
update in interface Observerobs - the AdvancedSnmpManagerObject variableov - the varbindvarbind
public String performSet(String host,
String oidName,
String mib,
String value)
oidName - can be a number .1.3.etc or a id eg. sysUptime.0mib - mib file (full path) to translate a mib, if the oid needs it e.g. sysUptime.0
public String performGet(String host,
String oidName,
String mib)
oidName - can be a number .1.3.etc or a id eg. sysUptime.0mib - mib file (full path) to translate a mib, if the oid needs it e.g. sysUptime.0
public String performGet(String host,
String oidName,
String mib,
boolean decode)
oidName - can be a number .1.3.etc or a id eg. sysUptime.0mib - mib file (full path) to translate a mib, if the oid needs it e.g. sysUptime.0decode - boolean, specifing if the result should be decoded
public void run()
run in interface Runnablepublic boolean initOk()
public void start()
public void stop()
|
Luky Library - 4.1.1 (20061117-1148) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||