Package org.jboss.as.controller.interfaces

Examples of org.jboss.as.controller.interfaces.ParsedInterfaceCriteria


        }
    }

    protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException {
        String name = getInterfaceName(operation);
        ParsedInterfaceCriteria parsed = getCriteria(context, operation);
        if (parsed.getFailureMessage() != null) {
            throw new OperationFailedException(new ModelNode().set(parsed.getFailureMessage()));
        }
        performRuntime(context, operation, model, verificationHandler, newControllers, name, parsed);
    }
View Full Code Here


        }
    }

    protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException {
        String name = getInterfaceName(operation);
        ParsedInterfaceCriteria parsed = getCriteria(context, operation);
        if (parsed.getFailureMessage() != null) {
            throw new OperationFailedException(new ModelNode().set(parsed.getFailureMessage()));
        }
        performRuntime(context, operation, model, verificationHandler, newControllers, name, parsed);
    }
View Full Code Here

    public String getHttpManagementSecurityRealm() {
        return httpManagementSecurityRealm;
    }

    public NetworkInterfaceBinding getNetworkInterfaceBinding(String name) throws SocketException, UnknownHostException {
        ParsedInterfaceCriteria criteria = parsedInterfaceCriteria.get(name);
        if (criteria == null) {
            throw new IllegalArgumentException(String.format("No interface named %s exists ", name));
        }
        return NetworkInterfaceService.createBinding(name, criteria);
    }
View Full Code Here

     * @param serviceTarget the service target
     */
    static void activateNetworkInterfaces(final ModelNode host, final ServiceTarget serviceTarget) {
        for(final Property iFace : host.get(INTERFACE).asPropertyList()) {
            final String interfaceName = iFace.getName();
            final ParsedInterfaceCriteria criteria = ParsedInterfaceCriteria.parse(iFace.getValue().require(CRITERIA));
            serviceTarget.addService(NetworkInterfaceService.JBOSS_NETWORK_INTERFACE.append(interfaceName), NetworkInterfaceService.create(interfaceName, criteria))
                .setInitialMode(Mode.ON_DEMAND)
                .install();
        }
    }
View Full Code Here

        String name = address.getLastElement().getValue();
        ModelNode model = context.getSubModel();
        model.get(NAME).set(name);

        ModelNode criteriaNode = operation.get(CRITERIA);
        ParsedInterfaceCriteria parsed = ParsedInterfaceCriteria.parse(criteriaNode.clone(), specified);
        if (parsed.getFailureMessage() != null) {
            throw new OperationFailedException(new ModelNode().set(parsed.getFailureMessage()));
        }
        model.get(CRITERIA).set(criteriaNode);
        ModelNode compensating = Util.getResourceRemoveOperation(operation.get(OP_ADDR));
        return installInterface(name, parsed, context, resultHandler, compensating);
    }
View Full Code Here

        for(final AttributeDefinition definition : ATTRIBUTES) {
            validateAndSet(definition, operation, config);
        }

        ParsedInterfaceCriteria parsed = ParsedInterfaceCriteria.parse(config, true, context);
        if (parsed.getFailureMessage() != null) {
            throw new OperationFailedException(new ModelNode().set(parsed.getFailureMessage()));
        }

        try {
            NetworkInterfaceBinding nib = NetworkInterfaceService.createBinding(parsed);
            context.getResult().set(nib.getAddress().getHostAddress());
View Full Code Here

        for(final AttributeDefinition definition : ATTRIBUTES) {
            validateAndSet(definition, operation, config);
        }

        ParsedInterfaceCriteria parsed = ParsedInterfaceCriteria.parse(config, true, context);
        if (parsed.getFailureMessage() != null) {
            throw new OperationFailedException(new ModelNode().set(parsed.getFailureMessage()));
        }

        try {
            NetworkInterfaceBinding nib = NetworkInterfaceService.createBinding(parsed);
            context.getResult().set(nib.getAddress().getHostAddress());
View Full Code Here

        for(final AttributeDefinition definition : ATTRIBUTES) {
            validateAndSet(definition, operation, config);
        }

        ParsedInterfaceCriteria parsed = ParsedInterfaceCriteria.parse(config, true);
        if (parsed.getFailureMessage() != null) {
            throw new OperationFailedException(new ModelNode().set(parsed.getFailureMessage()));
        }

        try {
            NetworkInterfaceBinding nib = NetworkInterfaceService.createBinding(parsed);
            context.getResult().set(nib.getAddress().getHostAddress());
View Full Code Here

    @Override
    public void execute(final OperationContext context, final ModelNode operation) throws OperationFailedException {
        final Resource resource = context.readResourceForUpdate(PathAddress.EMPTY_ADDRESS);
        final ModelNode value = operation.require(ModelDescriptionConstants.VALUE);
        final ParsedInterfaceCriteria criteria = ParsedInterfaceCriteria.parse(value, false);
        if(criteria.getFailureMessage() != null) {
            context.getFailureDescription().set(criteria.getFailureMessage());
        } else {
            final ModelNode subModel = resource.getModel();
            subModel.get(ModelDescriptionConstants.CRITERIA).set(value);
            if(context.getType() == OperationContext.Type.SERVER) {
                context.reloadRequired();
View Full Code Here

        model.get(CRITERIA).set(criteriaNode);
    }

    protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException {
        String name = getInterfaceName(operation);
        ParsedInterfaceCriteria parsed = getCriteria(operation);
        if (parsed.getFailureMessage() != null) {
            throw new OperationFailedException(new ModelNode().set(parsed.getFailureMessage()));
        }
        performRuntime(context, operation, model, verificationHandler, newControllers, name, parsed);
    }
View Full Code Here

TOP

Related Classes of org.jboss.as.controller.interfaces.ParsedInterfaceCriteria

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.