Package com.volantis.devrep.device.api.xml.identification

Examples of com.volantis.devrep.device.api.xml.identification.HeaderPattern


            buffer.append("    regexp=" + userAgentPattern.getRegularExpression() + "\n");
        }

        Iterator headerPatterns = entry.headerPatterns();
        while (headerPatterns.hasNext()) {
            HeaderPattern headerPattern = (HeaderPattern) headerPatterns.next();
            buffer.append("  HeaderPattern:\n");
            buffer.append("    name=" + headerPattern.getName() + "\n");
            buffer.append("    baseDevice=" + headerPattern.getBaseDevice() + "\n");
            buffer.append("    regexp=" + headerPattern.getRegularExpression() + "\n");
        }
    }
View Full Code Here


        if (headerPatternsIter.hasNext()) {
            while (headerPatternsIter.hasNext()) {
                // try all of the header patterns
                final Map headers = new HashMap();
                headers.put("user-agent", Collections.singletonList(userAgent));
                final HeaderPattern headerPattern =
                    (HeaderPattern) headerPatternsIter.next();
                final String value = generateSample(
                    headerPattern.getRegularExpression(), replacementStr).trim();
                final String key = headerPattern.getName().toLowerCase();
                headers.put(key, Collections.singletonList(value));
                result.testWithHeaders(headers);
            }
        } else {
            final Map headers = new HashMap();
View Full Code Here

            iteratee.next(pattern);
        }

        Iterator headerPatterns = entry.headerPatterns();
        while (headerPatterns.hasNext()) {
            HeaderPattern header = (HeaderPattern) headerPatterns.next();
            final String pattern = convertHeaderPatternToGenericPattern(header);
            iteratee.next(pattern);
        }

    }
View Full Code Here

TOP

Related Classes of com.volantis.devrep.device.api.xml.identification.HeaderPattern

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.