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.
-
SnmpPduFactoryImpl(String[])
-
-
decodePdu(SnmpMessage)
- This method is called when a pdu is received.
-
encodePdu(SnmpPduPacket, int)
- This method is called when a pdu is sent.
SnmpPduFactoryImpl
public SnmpPduFactoryImpl(String hostNames[])
- Parameters:
- hostNames - The array of the host names whose requests
will be refused by the agent.
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).
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