Package org.apache.jmeter.protocol.http.control

Examples of org.apache.jmeter.protocol.http.control.DNSCacheManager


    public void modifyTestElement(TestElement dnsRes) {
        GuiUtils.stopTableEditing(dnsServersTable);
        dnsRes.clear();
        configureTestElement(dnsRes);
        if (dnsRes instanceof DNSCacheManager) {
            DNSCacheManager dnsCacheManager = (DNSCacheManager) dnsRes;
            for (int i = 0; i < dnsServersTableModel.getRowCount(); i++) {
                String server = (String) dnsServersTableModel.getRowData(i)[0];
                dnsCacheManager.addServer(server);
            }
            dnsCacheManager.setClearEachIteration(clearEachIteration.isSelected());
            if (providerDNSradioGroup.isSelected(custResButton.getModel())) {
                dnsCacheManager.setCustomResolver(true);
            } else {
                dnsCacheManager.setCustomResolver(false);
            }
        }
    }
View Full Code Here


        }
    }

    @Override
    public TestElement createTestElement() {
        DNSCacheManager dnsCacheManager = new DNSCacheManager();
        modifyTestElement(dnsCacheManager);
        return dnsCacheManager;
    }
View Full Code Here

    @Override
    public void configure(TestElement el) {
        super.configure(el);

        DNSCacheManager dnsCacheManager = (DNSCacheManager) el;
        populateTable(dnsCacheManager);
        clearEachIteration.setSelected(dnsCacheManager.isClearEachIteration());
        if (dnsCacheManager.isCustomResolver()) {
            providerDNSradioGroup.setSelected(custResButton.getModel(), true);
            deleteButton.setEnabled(dnsServersTable.getColumnCount() > 0);
            addButton.setEnabled(true);
        } else {
            providerDNSradioGroup.setSelected(sysResButton.getModel(), true);
View Full Code Here

    public DNSCacheManager getDNSResolver() {
        return (DNSCacheManager) getProperty(DNS_CACHE_MANAGER).getObjectValue();
    }

    public void setDNSResolver(DNSCacheManager cacheManager) {
        DNSCacheManager mgr = getDNSResolver();
        if (mgr != null) {
            log.warn("Existing DNSCacheManager " + mgr.getName() + " superseded by " + cacheManager.getName());
        }
        setProperty(new TestElementProperty(DNS_CACHE_MANAGER, cacheManager));
    }
View Full Code Here

TOP

Related Classes of org.apache.jmeter.protocol.http.control.DNSCacheManager

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.