All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----com.sun.jaw.snmp.common.SnmpPduFactory
SnmpPduFactory is the default implementation
of the
SnmpPduFactoryIf interface.
You normally don't need to use this class except if you
decide to implement your own SnmpPduFactoryIf object.
This implementation of SnmpPduFactoryIf is very
basic: it simply calls encoding and decoding methods from
SnmpMessage.
public SnmpPduPacket decodePdu(SnmpMessage msg)
throws SnmpStatusException {
return msg.decodePdu() ;
}
public SnmpMessage encodePdu(SnmpPduPacket pdu, int maxPktSize)
throws SnmpStatusException, SnmpTooBigException {
SnmpMessage result = new SnmpMessage() ;
result.encodePdu(pdu, maxPktSize) ;
return result ;
}
To implement your own object, you can implement SnmpPduFactoryIf
or extend SnmpPduFactory.
SnmpPduPacket.
SnmpPduPacket
and returns the resulting SnmpMessage.
public SnmpPduFactory()
public SnmpPduPacket decodePdu(SnmpMessage msg) throws SnmpStatusException
SnmpPduPacket.
public SnmpMessage encodePdu(SnmpPduPacket pdu,
int maxPktSize) throws SnmpStatusException, SnmpTooBigException
SnmpPduPacket
and returns the resulting SnmpMessage.
SnmpPduPacket to be encoded
pdu contains illegal
values and cannot be encoded.
maxPktSize bytes.
All Packages Class Hierarchy This Package Previous Next Index