public static class DisplayString.DisplayStringValidation extends ValueConstraintValidator
DisplayStringValidation
can be used to validate the
contents of OctetString
variables that follow the
DisplayString TC rules.Constructor and Description |
---|
DisplayStringValidation(Constraints valueConstraint) |
DisplayStringValidation(int minSize,
int maxSize) |
Modifier and Type | Method and Description |
---|---|
void |
validate(MOValueValidationEvent validationEvent)
Validates a value by returning a SNMP error code if validation fails
or 0 (
SnmpConstants.SNMP_ERROR_SUCCESS ) if the validation was
successful. |
getValueConstraint
public DisplayStringValidation(Constraints valueConstraint)
public DisplayStringValidation(int minSize, int maxSize)
public void validate(MOValueValidationEvent validationEvent)
ValueConstraintValidator
SnmpConstants.SNMP_ERROR_SUCCESS
) if the validation was
successful. The validation is returned by calling the
MOValueValidationEvent.setValidationStatus(int)
method. If an error
occured the returned status value should be one of the following values:
SnmpConstants.SNMP_ERROR_WRONG_LENGTH
SnmpConstants.SNMP_ERROR_WRONG_VALUE
SnmpConstants.SNMP_ERROR_WRONG_TYPE
SnmpConstants.SNMP_ERROR_WRONG_ENCODING
SnmpConstants.SNMP_ERROR_BAD_VALUE
validate
in interface MOValueValidationListener
validate
in class ValueConstraintValidator
validationEvent
- the MOValueValidationEvent
containing the value to
validate.Copyright © 2016 SNMP4J.org. All rights reserved.