Package org.xnio

Examples of org.xnio.Option


            final String xnioOptionName = property.getName();
            final String value = property.getValue().asString();

            final String fullyQualifiedOptionName = Options.class.getName() + "." + xnioOptionName;
            // create the XNIO option for the option name
            final Option connectionCreationOption = Option.fromString(fullyQualifiedOptionName, Options.class.getClassLoader());
            // now parse and set the value
            optionMapBuilder.parse(connectionCreationOption, value);
        }
        return optionMapBuilder.getMap();
    }
View Full Code Here


        Set<ResourceEntry> entries = resource.getChildren(CommonAttributes.PROPERTY);
        if (entries.size() > 0) {
            OptionMap.Builder builder = OptionMap.builder();
            final ClassLoader loader = SecurityActions.getClassLoader(this.getClass());
            for (ResourceEntry entry : entries) {
                final Option option = Option.fromString(entry.getName(), loader);
                builder.set(option, option.parseValue(entry.getModel().get(CommonAttributes.VALUE).asString(), loader));
            }
            optionMap = builder.getMap();
        } else {
            optionMap = OptionMap.EMPTY;
        }
View Full Code Here

                final String name = optionProperty.getName();
                final ModelNode propValueModel = optionProperty.getValue();
                final String type = ChannelCreationOptionResource.CHANNEL_CREATION_OPTION_TYPE.resolveModelAttribute(context,propValueModel).asString();
                final String optionClassName = this.getClassNameForChannelOptionType(type);
                final String fullyQualifiedOptionName = optionClassName + "." + name;
                final Option option = Option.fromString(fullyQualifiedOptionName, loader);
                final String value = ChannelCreationOptionResource.CHANNEL_CREATION_OPTION_VALUE.resolveModelAttribute(context, propValueModel).asString();
                builder.set(option, option.parseValue(value, loader));
            }
            return builder.getMap();
        } else {
            return OptionMap.EMPTY;
        }
View Full Code Here

        for (Property property : properties.asPropertyList()) {
            String name = property.getName();
            if (!name.contains(".")) {
                name = "org.xnio.Options." + name;
            }
            final Option option = Option.fromString(name, loader);
            builder.set(option, option.parseValue(property.getValue().get(CommonAttributes.VALUE).asString(), loader));
        }
    }
View Full Code Here

                final String name = optionProperty.getName();
                final ModelNode propValueModel = optionProperty.getValue();
                final String type = ChannelCreationOptionResource.CHANNEL_CREATION_OPTION_TYPE.resolveModelAttribute(context,propValueModel).asString();
                final String optionClassName = this.getClassNameForChannelOptionType(type);
                final String fullyQualifiedOptionName = optionClassName + "." + name;
                final Option option = Option.fromString(fullyQualifiedOptionName, loader);
                final String value = ChannelCreationOptionResource.CHANNEL_CREATION_OPTION_VALUE.resolveModelAttribute(context, propValueModel).asString();
                builder.set(option, option.parseValue(value, loader));
            }
            return builder.getMap();
        }
        return OptionMap.EMPTY;
    }
View Full Code Here

        Set<ResourceEntry> entries = resource.getChildren(CommonAttributes.PROPERTY);
        if (entries.size() > 0) {
            OptionMap.Builder builder = OptionMap.builder();
            final ClassLoader loader = SecurityActions.getClassLoader(this.getClass());
            for (ResourceEntry entry : entries) {
                final Option option = Option.fromString(entry.getName(), loader);
                builder.set(option, option.parseValue(entry.getModel().get(CommonAttributes.VALUE).asString(), loader));
            }
            optionMap = builder.getMap();
        } else {
            optionMap = OptionMap.EMPTY;
        }
View Full Code Here

        for (Property property : properties.asPropertyList()) {
            String name = property.getName();
            if (!name.contains(".")) {
                name = "org.xnio.Options." + name;
            }
            final Option option = Option.fromString(name, loader);
            String value = PropertyResource.VALUE.resolveModelAttribute(context, property.getValue()).asString();
            builder.set(option, option.parseValue(value, loader));
        }
    }
View Full Code Here

                final String name = optionProperty.getName();
                final ModelNode propValueModel = optionProperty.getValue();
                final String type = propValueModel.get(TYPE).asString();
                final String optionClassName = this.getClassNameForChannelOptionType(type);
                final String fullyQualifiedOptionName = optionClassName + "." + name;
                final Option option = Option.fromString(fullyQualifiedOptionName, loader);
                final String value = propValueModel.get(EJB3SubsystemModel.VALUE).asString();
                builder.set(option, option.parseValue(value, loader));
            }
            return builder.getMap();
        } else {
            return OptionMap.EMPTY;
        }
View Full Code Here

            for (Property property : properties.asPropertyList()) {
                String name = property.getName();
                if (!name.contains(".")){
                    name = "org.xnio.Options."+name;
                }
                final Option option = Option.fromString(name, loader);
                builder.set(option, option.parseValue(property.getValue().get(CommonAttributes.VALUE).asString(), loader));
            }
            optionMap = builder.getMap();
        } else {
            optionMap = OptionMap.EMPTY;
        }
View Full Code Here

        Set<ResourceEntry> entries = resource.getChildren(CommonAttributes.PROPERTY);
        if (entries.size() > 0) {
            OptionMap.Builder builder = OptionMap.builder();
            final ClassLoader loader = SecurityActions.getClassLoader(this.getClass());
            for (ResourceEntry entry : entries) {
                final Option option = Option.fromString(entry.getName(), loader);
                builder.set(option, option.parseValue(entry.getModel().get(CommonAttributes.VALUE).asString(), loader));
            }
            optionMap = builder.getMap();
        } else {
            optionMap = OptionMap.EMPTY;
        }
View Full Code Here

TOP

Related Classes of org.xnio.Option

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.