HOME

com.ireasoning.protocol.snmp
Class SnmpBaseGroup

java.lang.Object
  extended bycom.ireasoning.protocol.snmp.SnmpBaseGroup
All Implemented Interfaces:
Serializable, SnmpBaseGroupMBean

public abstract class SnmpBaseGroup
extends Object
implements SnmpBaseGroupMBean

This class is the base class of Snmp group objects, such as system group in RFC1213

See Also:
Serialized Form

Constructor Summary
SnmpBaseGroup(OIDTreeNode root, String oid)
           
 
Method Summary
 void postSetValue(SnmpVarBind newValue, Collection varbinds)
          Deprecated, use postSetValue instead
 void postSetValue(SnmpVarBind newValue, SnmpPdu pdu)
          It gets called after agent processes SNMP SET request.
 boolean preSetValue(SnmpVarBind newValue, Collection varbinds)
          Deprecated, use preSetValue instead
 void preSetValue(SnmpVarBind newValue, SnmpPdu pdu)
          It gets called before agent is going to process SNMP SET request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SnmpBaseGroup

public SnmpBaseGroup(OIDTreeNode root,
                     String oid)
Method Detail

preSetValue

public void preSetValue(SnmpVarBind newValue,
                        SnmpPdu pdu)
Description copied from interface: SnmpBaseGroupMBean
It gets called before agent is going to process SNMP SET request.

Because SNMP SET operation is atomic, you may need to override this method in the sub class which accept SET operations. And checks the validity of passed newValue and the pdu object. If value is not acceptable, SnmpException needs to be thrown, so this SET operation fails and proper error status code will be returned to SNMP manager.

Note: SNMP version information of the received packet can be retrieved by calling pdu.getVersion()

Specified by:
preSetValue in interface SnmpBaseGroupMBean
Parameters:
newValue - the new value which is being processed
pdu - PDU object received

postSetValue

public void postSetValue(SnmpVarBind newValue,
                         SnmpPdu pdu)
Description copied from interface: SnmpBaseGroupMBean
It gets called after agent processes SNMP SET request.

Specified by:
postSetValue in interface SnmpBaseGroupMBean
Parameters:
newValue - the new value which is being processed
pdu - PDU object received

preSetValue

public boolean preSetValue(SnmpVarBind newValue,
                           Collection varbinds)
Deprecated, use preSetValue instead

Specified by:
preSetValue in interface SnmpBaseGroupMBean

postSetValue

public void postSetValue(SnmpVarBind newValue,
                         Collection varbinds)
Deprecated, use postSetValue instead

Specified by:
postSetValue in interface SnmpBaseGroupMBean

HOME

Copyright © 2002 iReasoning Inc. All Rights Reserved.