Examples of require()


Examples of org.jboss.dmr.ModelNode.require()

        final ModelNode result = execute(op);
        String error = getFailureDescription(result);
        if (error != null) {
            throw new IllegalStateException(error);
        }
        standalone = result.require(RESULT).asString().equals("STANDALONE");
    }

    int getMBeanCount() {
        return new RootResourceIterator<Integer>(getRootResourceAndRegistration().getResource(), new ResourceAction<Integer>() {
            int count;
View Full Code Here

Examples of org.jboss.dmr.ModelNode.require()

        public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
            final ModelNode model = context.readModel(PathAddress.EMPTY_ADDRESS);
            context.getResult().add(createAddOperation(model.hasDefined(CommonAttributes.SHOW_MODEL) ? model.get(CommonAttributes.SHOW_MODEL).asBoolean() : null));
            if (model.hasDefined(CommonAttributes.SERVER_BINDING)) {
                context.getResult().add(createAddConnectorOperation(model.require(CommonAttributes.SERVER_BINDING).asString(), model.require(CommonAttributes.REGISTRY_BINDING).asString()));
            }
            context.completeStep();
        }

        @Override
View Full Code Here

Examples of org.jboss.dmr.ModelNode.require()

        public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
            final ModelNode model = context.readModel(PathAddress.EMPTY_ADDRESS);
            context.getResult().add(createAddOperation(model.hasDefined(CommonAttributes.SHOW_MODEL) ? model.get(CommonAttributes.SHOW_MODEL).asBoolean() : null));
            if (model.hasDefined(CommonAttributes.SERVER_BINDING)) {
                context.getResult().add(createAddConnectorOperation(model.require(CommonAttributes.SERVER_BINDING).asString(), model.require(CommonAttributes.REGISTRY_BINDING).asString()));
            }
            context.completeStep();
        }

        @Override
View Full Code Here

Examples of org.jboss.dmr.ModelNode.require()

    protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) {
        final PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR));
        final String name = address.getLastElement().getValue();
        ModelNode transport = operation.get(ModelKeys.TRANSPORT);
        Transport transportConfig = new Transport(transport.require(ModelKeys.TYPE).asString());
        ProtocolStack stackConfig = new ProtocolStack(name, transportConfig);

        ServiceBuilder<ChannelFactory> builder = context.getServiceTarget()
                .addService(ChannelFactoryService.getServiceName(name), new ChannelFactoryService(stackConfig))
                .addDependency(ProtocolDefaultsService.SERVICE_NAME, ProtocolDefaults.class, stackConfig.getDefaultsInjector())
View Full Code Here

Examples of org.jboss.dmr.ModelNode.require()

            for (ModelNode stack : stacks) {
                writer.writeStartElement(Element.LOGIN_MODULE_STACK.getLocalName());
                List<ModelNode> nodes = stack.asList();
                Iterator<ModelNode> iter = nodes.iterator();
                ModelNode nameNode = iter.next();
                writeAttribute(writer, Attribute.NAME, nameNode.require(NAME));
                while (iter.hasNext()) {
                    ModelNode loginModuleNode = iter.next();
                    List<ModelNode> lms = loginModuleNode.asList();
                    for (ModelNode loginModule : lms) {
                        writer.writeStartElement(Element.LOGIN_MODULE.getLocalName());
View Full Code Here

Examples of org.jboss.dmr.ModelNode.require()

        //Read the whole model and make sure it looks as expected
        ModelNode model = services.readWholeModel();
        Assert.assertTrue(model.get(SUBSYSTEM).hasDefined(OtherServicesSubsystemExtension.SUBSYSTEM_NAME));

        Assert.assertEquals("testing123", model.require(SYSTEM_PROPERTY).require("test123").require(VALUE).asString());
    }

    /**
     * Test that socket binding got added properly
     */
 
View Full Code Here

Examples of org.jboss.dmr.ModelNode.require()

        //Read the whole model and make sure it looks as expected
        ModelNode model = services.readWholeModel();
        Assert.assertTrue(model.get(SUBSYSTEM).hasDefined(OtherServicesSubsystemExtension.SUBSYSTEM_NAME));

        ModelNode iface = model.require(INTERFACE).require(ControllerInitializer.INTERFACE_NAME);
        Assert.assertEquals("127.0.0.1", iface.require(INET_ADDRESS).asString());

        ModelNode group = model.require(SOCKET_BINDING_GROUP).require(ControllerInitializer.SOCKET_BINDING_GROUP_NAME);
        Assert.assertEquals(ControllerInitializer.INTERFACE_NAME, group.require(DEFAULT_INTERFACE).asString());
        Assert.assertEquals(ControllerInitializer.SOCKET_BINDING_GROUP_NAME, group.require(NAME).asString());
        Assert.assertEquals(0, group.require(PORT_OFFSET).asInt());
View Full Code Here

Examples of org.jboss.dmr.ModelNode.require()

        ModelNode iface = model.require(INTERFACE).require(ControllerInitializer.INTERFACE_NAME);
        Assert.assertEquals("127.0.0.1", iface.require(INET_ADDRESS).asString());

        ModelNode group = model.require(SOCKET_BINDING_GROUP).require(ControllerInitializer.SOCKET_BINDING_GROUP_NAME);
        Assert.assertEquals(ControllerInitializer.INTERFACE_NAME, group.require(DEFAULT_INTERFACE).asString());
        Assert.assertEquals(ControllerInitializer.SOCKET_BINDING_GROUP_NAME, group.require(NAME).asString());
        Assert.assertEquals(0, group.require(PORT_OFFSET).asInt());

        ModelNode bindings = group.require(SOCKET_BINDING);
        Assert.assertEquals(3, bindings.asList().size());
View Full Code Here

Examples of org.jboss.dmr.ModelNode.require()

        ModelNode iface = model.require(INTERFACE).require(ControllerInitializer.INTERFACE_NAME);
        Assert.assertEquals("127.0.0.1", iface.require(INET_ADDRESS).asString());

        ModelNode group = model.require(SOCKET_BINDING_GROUP).require(ControllerInitializer.SOCKET_BINDING_GROUP_NAME);
        Assert.assertEquals(ControllerInitializer.INTERFACE_NAME, group.require(DEFAULT_INTERFACE).asString());
        Assert.assertEquals(ControllerInitializer.SOCKET_BINDING_GROUP_NAME, group.require(NAME).asString());
        Assert.assertEquals(0, group.require(PORT_OFFSET).asInt());

        ModelNode bindings = group.require(SOCKET_BINDING);
        Assert.assertEquals(3, bindings.asList().size());
        Assert.assertEquals(123, group.require(SOCKET_BINDING).require("test1").require(PORT).asInt());
View Full Code Here

Examples of org.jboss.dmr.ModelNode.require()

        Assert.assertEquals("127.0.0.1", iface.require(INET_ADDRESS).asString());

        ModelNode group = model.require(SOCKET_BINDING_GROUP).require(ControllerInitializer.SOCKET_BINDING_GROUP_NAME);
        Assert.assertEquals(ControllerInitializer.INTERFACE_NAME, group.require(DEFAULT_INTERFACE).asString());
        Assert.assertEquals(ControllerInitializer.SOCKET_BINDING_GROUP_NAME, group.require(NAME).asString());
        Assert.assertEquals(0, group.require(PORT_OFFSET).asInt());

        ModelNode bindings = group.require(SOCKET_BINDING);
        Assert.assertEquals(3, bindings.asList().size());
        Assert.assertEquals(123, group.require(SOCKET_BINDING).require("test1").require(PORT).asInt());
        Assert.assertEquals(234, group.require(SOCKET_BINDING).require("test2").require(PORT).asInt());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.