Class SnmpContextv3Basis

java.lang.Object
uk.co.westhawk.snmp.stack.AbstractSnmpContext
uk.co.westhawk.snmp.stack.SnmpContextv3Basis
All Implemented Interfaces:
Cloneable, Runnable, EventListener, RawPduListener, SnmpContextBasisFace, SnmpContextv3Face
Direct Known Subclasses:
SnmpContextv3, SnmpContextv3Discovery

public abstract class SnmpContextv3Basis extends AbstractSnmpContext implements SnmpContextv3Face, Cloneable
This class contains the basis for the SNMP v3 contexts that is needed by every PDU to send a SNMP v3 request.

This class will perform the v3 discovery of the SNMP engine ID and time line if necessary. This is done with the classes TimeWindow and UsmDiscoveryBean.

Now that the stack can send traps and receive requests, it needs to be able to act as an authoritative SNMP engine. This is done via the interface UsmAgent. The DefaultUsmAgent is not guaranteed to work; agents (or rather authoritative engines) should provide a better implementation.

This class will use the User Security Model (USM) as described in SNMP-USER-BASED-SM-MIB. See also RFC 3411.

It is advised to set all the properties of this class before any PDU, using this class, is sent. All properties are being used to encode the message. Some properties are being used to decode the Response or Report PDU. When any of these last properties were changed in between flight there is a possibility the decoding fails, causing a DecodingException.

destroy() should be called when the context is no longer used. This is the only way the threads will be stopped and garbage collected.

Since:
4_14
Version:
$Revision: 3.17 $ $Date: 2009/03/05 15:51:42 $
Author:
Birgit Arkesteijn
See Also: