Package org.jboss.as.controller.operations.validation

Examples of org.jboss.as.controller.operations.validation.IntRangeValidator


    /**
     * Create the SocketBindingAddHandler
     */
    protected SocketBindingAddHandler() {
        validator.registerValidator(INTERFACE, new StringLengthValidator(1, Integer.MAX_VALUE, true, true));
        validator.registerValidator(PORT, new IntRangeValidator(0, 65535, false, true));
        validator.registerValidator(FIXED_PORT, new ModelTypeValidator(ModelType.BOOLEAN, true, true));
        validator.registerValidator(MULTICAST_ADDRESS, new InetAddressValidator(true, true));
        validator.registerValidator(MULTICAST_PORT, new IntRangeValidator(0, 65535, true, true));
    }
View Full Code Here


    private void registerReadWriteIntAttribute(ManagementResourceRegistration resourceRegistration, AttributeDefinition attr) {
        resourceRegistration.registerReadWriteAttribute(attr, null, new ThreadWriteAttributeHandler(attr));
    }

    private static SimpleAttributeDefinition createIntAttribute(String name, int defaultValue) {
        return SimpleAttributeDefinitionBuilder.create(name, ModelType.INT, true).setDefaultValue(new ModelNode().set(defaultValue)).setValidator(new IntRangeValidator(1)).build();
    }
View Full Code Here

        //populate validators

        final ParameterValidator filterValidator = new ModelTypeValidator(ModelType.STRING, true, false);
        final ParameterValidator queueNameValidator = new StringLengthValidator(1);
        final ParameterValidator rejectDuplicatesValidator = new ModelTypeValidator(ModelType.BOOLEAN, true);
        final ParameterValidator priorityValidator = new IntRangeValidator(0, 9, false, false);

        singleOptionalFilterValidator.registerValidator(FILTER.getName(), filterValidator);
        singleMessageIdValidator.registerValidator(MESSAGE_ID, messageIdValidator);
        changeMessagePriorityValidator.registerValidator(MESSAGE_ID, messageIdValidator);
        changeMessagePriorityValidator.registerValidator(NEW_PRIORITY, priorityValidator);
View Full Code Here

    private final ParametersValidator streamValidator = new ParametersValidator();

    public DeploymentUploadStreamAttachmentHandler(final DeploymentRepository repository) {
        super(repository);
        this.streamValidator.registerValidator(INPUT_STREAM_INDEX, new IntRangeValidator(0));
    }
View Full Code Here

        //populate validators

        final ParameterValidator filterValidator = new ModelTypeValidator(ModelType.STRING, true, false);
        final ParameterValidator queueNameValidator = new StringLengthValidator(1);
        final ParameterValidator rejectDuplicatesValidator = new ModelTypeValidator(ModelType.BOOLEAN, true);
        final ParameterValidator priorityValidator = new IntRangeValidator(0, 9, false, false);

        singleOptionalFilterValidator.registerValidator(FILTER.getName(), filterValidator);
        singleMessageIdValidator.registerValidator(MESSAGE_ID, messageIdValidator);
        changeMessagePriorityValidator.registerValidator(MESSAGE_ID, messageIdValidator);
        changeMessagePriorityValidator.registerValidator(NEW_PRIORITY, priorityValidator);
View Full Code Here

    private final ParametersValidator idsValidator = new ParametersValidator();
    private final ParametersValidator depthValidator = new ParametersValidator();
    private final ParametersValidator lockedValidator = new ParametersValidator();
    private ThreadMXBeanThreadInfosHandler() {
        idsValidator.registerValidator(PlatformMBeanConstants.IDS, new ListValidator(new LongRangeValidator(1)));
        depthValidator.registerValidator(PlatformMBeanConstants.MAX_DEPTH, new IntRangeValidator(1, Integer.MAX_VALUE, false, false));
        lockedValidator.registerValidator(PlatformMBeanConstants.LOCKED_MONITORS, new ModelTypeValidator(ModelType.BOOLEAN));
        lockedValidator.registerValidator(PlatformMBeanConstants.LOCKED_SYNCHRONIZERS, new ModelTypeValidator(ModelType.BOOLEAN));
    }
View Full Code Here

    public static final ThreadMXBeanThreadInfoHandler INSTANCE = new ThreadMXBeanThreadInfoHandler();

    private final ParametersValidator validator = new ParametersValidator();
    private ThreadMXBeanThreadInfoHandler() {
        validator.registerValidator(PlatformMBeanConstants.ID, new LongRangeValidator(1));
        validator.registerValidator(PlatformMBeanConstants.MAX_DEPTH, new IntRangeValidator(1, Integer.MAX_VALUE, true, false));
    }
View Full Code Here

    public static final ThreadMXBeanThreadInfoHandler INSTANCE = new ThreadMXBeanThreadInfoHandler();

    private final ParametersValidator validator = new ParametersValidator();
    private ThreadMXBeanThreadInfoHandler() {
        validator.registerValidator(PlatformMBeanConstants.ID, new LongRangeValidator(1));
        validator.registerValidator(PlatformMBeanConstants.MAX_DEPTH, new IntRangeValidator(1, Integer.MAX_VALUE, true, false));
    }
View Full Code Here

    private final ParametersValidator idsValidator = new ParametersValidator();
    private final ParametersValidator depthValidator = new ParametersValidator();
    private final ParametersValidator lockedValidator = new ParametersValidator();
    private ThreadMXBeanThreadInfosHandler() {
        idsValidator.registerValidator(PlatformMBeanConstants.IDS, new ListValidator(new LongRangeValidator(1)));
        depthValidator.registerValidator(PlatformMBeanConstants.MAX_DEPTH, new IntRangeValidator(1, Integer.MAX_VALUE, false, false));
        lockedValidator.registerValidator(PlatformMBeanConstants.LOCKED_MONITORS, new ModelTypeValidator(ModelType.BOOLEAN));
        lockedValidator.registerValidator(PlatformMBeanConstants.LOCKED_SYNCHRONIZERS, new ModelTypeValidator(ModelType.BOOLEAN));
    }
View Full Code Here

    private final ParametersValidator runtimeValidator = new ParametersValidator();

    private ServerSocketBindingAddHandler() {
        runtimeValidator.registerValidator(INTERFACE, new StringLengthValidator(1, Integer.MAX_VALUE, true, false));
        runtimeValidator.registerValidator(PORT, new IntRangeValidator(0, 65535, false, false));
        runtimeValidator.registerValidator(FIXED_PORT, new ModelTypeValidator(ModelType.BOOLEAN, true, false));
        runtimeValidator.registerValidator(MULTICAST_ADDRESS, new InetAddressValidator(true, false));
        runtimeValidator.registerValidator(MULTICAST_PORT, new IntRangeValidator(0, 65535, true, false));
    }
View Full Code Here

TOP

Related Classes of org.jboss.as.controller.operations.validation.IntRangeValidator

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.