You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

When upgrading from SNMP4J-Agent 2.x to 3.x some changes to your existing code might be necessary, which are described here:

Migration Tasks

SNMP4J ArgumentParser Interface

  • The interface of the org.snmp4j.util.ArgumentParser has changed. Especially, the parse method now returns Map<String,List<Object>> instead Map<String,List<?>> in version 2.x. 
  • You need to change your source code accordingly, although this API change is binary compatible.

MOChangeEvent Granularity Changed

  1. MOChangeEvent in SNMP4J-Agent version 3.0 and later is fired by DefaultMOTable for row level changes too!
  2. In version 2.x and earlier, MOChangeEvent was fired on Variable updates only. If fired in the prepare phase of a SNMP SET request processing it was "deniable" and if fired after then commit it was not deniable.
  3. In version 3.1 and later, in addition to (2.) row level changes (added row, updated, and deleted rows) are fired as MOChangeEvents with a special OidType index.
  4. Note: In version 3.0.x, the new fields OidType and Modification were not set for MOChangeEvents fired on behalf of (2.). In version 3.1 or later OidType is always set to OidType.index and Modification is deducted from the Variable change that happened.
  5. If you trigger operations like writing MIB table objects to disk that itself modify those tables on row level, then you will need to ignore MOChangeEvents while these operations execute - at least you will have to ignore all MOChangeEvents with OidType.index in order to retain the same behaviour of your existing code as with SNMP4J-Agent 2.x or earlier. 

 


  • No labels