All Packages Class Hierarchy This Package Previous Next Index
SnmpPduFactoryIf defines the interface of
the object in charge of encoding and decoding SNMP packets.
You normally don't need to use this interface except if you
decide to replace the default implementation SnmpPduFactory.
An SnmpPduFactoryIf object is attached to an
AdaptorServerImpl
or an SnmpPeer.
It is used each time an SNMP packet needs to be encoded or decoded.
SnmpPduFactory is the default
implementation.
It simply applies the standard ASN.1 encoding and decoding
on the bytes of the SNMP packet.
It's possible to implement its own SnmpPduFactoryIf
object and to add authentication and/or encryption to the
default encoding/decoding process.
SnmpMessage and returns the
resulting SnpmPduPacket.
SnmpPduPacket and
returns the resulting SnmpMessage.
public abstract SnmpPduPacket decodePdu(SnmpMessage msg) throws SnmpStatusException
SnmpMessage and returns the
resulting SnpmPduPacket. If this method returns
null, the message will be considered unsafe
and will be drop.
SnmpMessage to be decoded
SnmpPduPacket
public abstract SnmpMessage encodePdu(SnmpPduPacket pdu,
int maxPktSize) throws SnmpStatusException, SnmpTooBigException
SnmpPduPacket and
returns the resulting SnmpMessage. If this
method returns null, the specified SnmpPduPacket
will be dropped and the current SNMP request will be
aborted.
SnmpPduPacket to be encoded
SnmpMessage
pdu contains
illegal values and cannot be encoded.
maxPktSize bytes.
All Packages Class Hierarchy This Package Previous Next Index