All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class examples.snmp.agent.SnmpPduFactoryImpl

java.lang.Object
   |
   +----examples.snmp.agent.SnmpPduFactoryImpl

public class SnmpPduFactoryImpl
extends Object
implements SnmpPduFactoryIf
This class implements the SnmpPduFactoryIf in order to filter the received messages according to the host that sent them.


Constructor Index

 o SnmpPduFactoryImpl(String[])

Method Index

 o decodePdu(SnmpMessage)
This method is called when a pdu is received.
 o encodePdu(SnmpPduPacket, int)
This method is called when a pdu is sent.

Constructors

 o SnmpPduFactoryImpl
 public SnmpPduFactoryImpl(String hostNames[])
Parameters:
hostNames - The array of the host names whose requests will be refused by the agent.

Methods

 o decodePdu
 public SnmpPduPacket decodePdu(SnmpMessage msg) throws SnmpStatusException
This method is called when a pdu is received. If the sender's name figures in the list of "denied" hosts then the method returns null (pdu rejected).

 o encodePdu
 public SnmpMessage encodePdu(SnmpPduPacket pdu,
                              int maxPktSize) throws SnmpStatusException, SnmpTooBigException
This method is called when a pdu is sent.


All Packages  Class Hierarchy  This Package  Previous  Next  Index