Class TestAndIncr

    • Constructor Detail

      • TestAndIncr

        public TestAndIncr​(org.snmp4j.smi.OID oid)
    • Method Detail

      • commit

        public void commit​(SubRequest<?> request)
        Description copied from interface: ManagedObject
        Commits a previously prepared SET (sub)request. This is the second phase of a two phase commit. The change is committed but the resources locked during prepare not freed yet.
        Specified by:
        commit in interface ManagedObject<SubRequest<?>>
        Overrides:
        commit in class MOScalar<org.snmp4j.smi.Integer32>
        Parameters:
        request - the SubRequest to process.
      • prepare

        public void prepare​(SubRequest<?> request)
        Description copied from interface: ManagedObject
        Prepares a SET (sub)request. This method represents the first phase of a two phase commit. During preparation all necessary resources should be locked in order to be able to execute the commit without claiming additional resources.
        Specified by:
        prepare in interface ManagedObject<SubRequest<?>>
        Overrides:
        prepare in class MOScalar<org.snmp4j.smi.Integer32>
        Parameters:
        request - the SubRequest to process.
      • isValueOK

        public int isValueOK​(SubRequest<?> request)
        Description copied from class: MOScalar
        Checks whether the new value contained in the supplied sub-request is a valid value for this object. The checks are performed by firing a MOValueValidationEvent the registered listeners.
        Overrides:
        isValueOK in class MOScalar<org.snmp4j.smi.Integer32>
        Parameters:
        request - the SubRequest with the new value.
        Returns:
        SnmpConstants.SNMP_ERROR_SUCCESS if the new value is OK, any other appropriate SNMPv2/v3 error status if not.