Package org.jscsi.parser.datasegment

Examples of org.jscsi.parser.datasegment.SettingEntry


            // we had not find a session/connection entry, so we have to search
            // in the
            // global settings
        }

        final SettingEntry se;
        synchronized (globalConfig) {
            se = globalConfig.get(textKey);

            synchronized (se) {
                if (se != null) { return se.getValue(); }
            }
        }

        throw new OperationalTextKeyException("No OperationalTextKey entry found for key: " + textKey.value());
    }
View Full Code Here


            synchronized (sc) {
                if (sc == null) { throw new NoSuchSessionException("A session with the ID '" + targetName + "' does not exist."); }

                synchronized (response) {
                    SettingEntry se;
                    for (Map.Entry<OperationalTextKey , String> e : response.entrySet()) {
                        synchronized (globalConfig) {
                            se = globalConfig.get(e.getKey());

                            if (se == null) {
                                if (LOGGER.isWarnEnabled()) {
                                    LOGGER.warn("This key " + e.getKey() + " is not in the globalConfig.");
                                }
                                continue;
                            }

                            synchronized (se) {
                                if (se.getScope().compareTo(VALUE_SCOPE_SESSION) == 0) {
                                    sc.updateSessionSetting(e.getKey(), e.getValue(), se.getResult());
                                } else if (se.getScope().compareTo(VALUE_SCOPE_CONNECTION) == 0) {
                                    sc.updateConnectionSetting(connectionID, e.getKey(), e.getValue(), se.getResult());
                                }
                            }
                        }
                    }
                }
View Full Code Here

        final ResultFunctionFactory resultFunctionFactory = new ResultFunctionFactory();
        Node parameter;
        NodeList parameters;
        NamedNodeMap attributes;
        SettingEntry key;
        for (int i = 0; i < globalConfiguration.getLength(); i++) {
            parameters = globalConfiguration.item(i).getChildNodes();

            for (int j = 0; j < parameters.getLength(); j++) {
                parameter = parameters.item(j);

                if (parameter.getNodeType() == Node.ELEMENT_NODE) {
                    attributes = parameter.getAttributes();

                    key = new SettingEntry();
                    key.setScope(attributes.getNamedItem(ATTRIBUTE_SCOPE).getNodeValue());
                    key.setResult(resultFunctionFactory.create(attributes.getNamedItem(ATTRIBUTE_RESULT).getNodeValue()));
                    // key.setSender(attributes.getNamedItem(ATTRIBUTE_SENDER).getNodeValue
                    // ());
                    key.setValue(parameter.getTextContent());

                    synchronized (globalConfig) {
                        globalConfig.put(OperationalTextKey.valueOfEx(parameter.getNodeName()), key);
                    }
                }
View Full Code Here

TOP

Related Classes of org.jscsi.parser.datasegment.SettingEntry

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.