Package org.snmp4j.agent.mo.snmp.smi

Examples of org.snmp4j.agent.mo.snmp.smi.ValueConstraintValidator


                                null);
    ValueConstraint jvmThreadContentionMonitoringVC = new EnumerationConstraint(
      new int[] { JvmManagementMib.JvmThreadContentionMonitoringEnum.enabled,
                  JvmManagementMib.JvmThreadContentionMonitoringEnum.disabled });
    scalar.addMOValueValidationListener(
        new ValueConstraintValidator(jvmThreadContentionMonitoringVC));
    scalar = (MOScalar)
        server.getManagedObject(JvmManagementMib.oidJvmThreadCpuTimeMonitoring,
                                null);
    ValueConstraint jvmThreadCpuTimeMonitoringVC = new EnumerationConstraint(
      new int[] { JvmManagementMib.JvmThreadContentionMonitoringEnum.enabled,
                  JvmManagementMib.JvmThreadContentionMonitoringEnum.disabled });
    scalar.addMOValueValidationListener(
        new ValueConstraintValidator(jvmThreadCpuTimeMonitoringVC));
  }
View Full Code Here


    MOColumn c;
    if (access.isAccessibleForWrite()) {
      c = new MOMutableColumn(columnID, SMIConstants.SYNTAX_INTEGER32,
                              access, defaultValue);
      ((MOMutableColumn)c).addMOValueValidationListener(
          new ValueConstraintValidator(constraint));
    }
    else {
      c = new MOColumn(columnID, SMIConstants.SYNTAX_INTEGER32, access);
    }
    return c;
View Full Code Here

    if (constraint.validate(scalar.getValue()) !=
        SnmpConstants.SNMP_ERROR_SUCCESS) {
      throw new IllegalArgumentException("Illegal TruthValue "+value);
    }
    scalar.
        addMOValueValidationListener(new ValueConstraintValidator(constraint));
    return scalar;
  }
View Full Code Here

TOP

Related Classes of org.snmp4j.agent.mo.snmp.smi.ValueConstraintValidator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.