当前位置: 首页>>代码示例>>Java>>正文


Java SearchByClass.getSearchResults方法代码示例

本文整理汇总了Java中org.apache.jorphan.collections.SearchByClass.getSearchResults方法的典型用法代码示例。如果您正苦于以下问题:Java SearchByClass.getSearchResults方法的具体用法?Java SearchByClass.getSearchResults怎么用?Java SearchByClass.getSearchResults使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.jorphan.collections.SearchByClass的用法示例。


在下文中一共展示了SearchByClass.getSearchResults方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: selectThreadGroup

import org.apache.jorphan.collections.SearchByClass; //导入方法依赖的package包/类
private void selectThreadGroup(AbstractThreadGroup tg) {
    debugger.selectThreadGroup(tg);
    treeModel.clearTestPlan();
    HashTree origTree = debugger.getSelectedTree();
    TreeCloner cloner = new TreeCloner();
    origTree.traverse(cloner);
    HashTree selectedTree = cloner.getClonedTree();

    // Hack to resolve ModuleControllers from JMeter.java
    SearchClass<ReplaceableController> replaceableControllers = new SearchClass<>(ReplaceableController.class);
    selectedTree.traverse(replaceableControllers);
    Collection<ReplaceableController> replaceableControllersRes = replaceableControllers.getSearchResults();
    for (ReplaceableController replaceableController : replaceableControllersRes) {
        replaceableController.resolveReplacementSubTree((JMeterTreeNode) treeModel.getRoot());
    }

    JMeter.convertSubTree(selectedTree);
    try {
        treeModel.addSubTree(selectedTree, (JMeterTreeNode) treeModel.getRoot());
    } catch (IllegalUserActionException e) {
        throw new RuntimeException(e);
    }

    // select TG for visual convenience
    SearchByClass<DebuggingThreadGroup> tgs = new SearchByClass<>(DebuggingThreadGroup.class);
    selectedTree.traverse(tgs);
    for (DebuggingThreadGroup forSel : tgs.getSearchResults()) {
        Wrapper<AbstractThreadGroup> wtg = new ThreadGroupWrapper();
        wtg.setWrappedElement(forSel);
        selectTargetInTree(wtg);
    }
}
 
开发者ID:Blazemeter,项目名称:jmeter-debugger,代码行数:33,代码来源:DebuggerDialog.java

示例2: notifyTestListenersOfEnd

import org.apache.jorphan.collections.SearchByClass; //导入方法依赖的package包/类
private void notifyTestListenersOfEnd(SearchByClass<TestStateListener> testListeners) {
    log.info("Notifying test listeners of end of test");
    for (TestStateListener tl : testListeners.getSearchResults()) {
        try {
            if (host == null) {
                tl.testEnded();
            } else {
                tl.testEnded(host);
            }
        } catch (Exception e) {
            log.warn("Error encountered during shutdown of "+tl.toString(),e);
        }
    }
    if (host != null) {
        log.info("Test has ended on host "+host);
        long now=System.currentTimeMillis();
        System.out.println("Finished the test on host " + host + " @ "+new Date(now)+" ("+now+")"
        +(exitAfterTest ? " - exit requested." : ""));
        if (exitAfterTest){
            exit();
        }
    }
    active=false;
}
 
开发者ID:johrstrom,项目名称:cloud-meter,代码行数:25,代码来源:StandardJMeterEngine.java

示例3: notifyTestListenersOfStart

import org.apache.jorphan.collections.SearchByClass; //导入方法依赖的package包/类
private void notifyTestListenersOfStart(SearchByClass<TestStateListener> testListeners) {
    for (TestStateListener tl : testListeners.getSearchResults()) {
        if (tl instanceof TestBean) {
            TestBeanHelper.prepare((TestElement) tl);
        }
        if (host == null) {
            tl.testStarted();
        } else {
            tl.testStarted(host);
        }
    }
}
 
开发者ID:johrstrom,项目名称:cloud-meter,代码行数:13,代码来源:StandardJMeterEngine.java

示例4: JMeterThread

import org.apache.jorphan.collections.SearchByClass; //导入方法依赖的package包/类
public JMeterThread(HashTree test, JMeterThreadMonitor monitor, ListenerNotifier note) {
    this.monitor = monitor;
    threadVars = new JMeterVariables();
    testTree = test;
    compiler = new TestCompiler(testTree);
    threadGroupLoopController = (Controller) testTree.getArray()[0];
    SearchByClass<TestIterationListener> threadListenerSearcher = new SearchByClass<>(TestIterationListener.class); // TL - IS
    test.traverse(threadListenerSearcher);
    testIterationStartListeners = threadListenerSearcher.getSearchResults();
    SearchByClass<SampleMonitor> sampleMonitorSearcher = new SearchByClass<>(SampleMonitor.class);
    test.traverse(sampleMonitorSearcher);
    sampleMonitors = sampleMonitorSearcher.getSearchResults();
    notifier = note;
    running = true;
}
 
开发者ID:johrstrom,项目名称:cloud-meter,代码行数:16,代码来源:JMeterThread.java

示例5: notifyTestListenersOfStart

import org.apache.jorphan.collections.SearchByClass; //导入方法依赖的package包/类
@SuppressWarnings("deprecation") // Deliberate use of deprecated method
private void notifyTestListenersOfStart(SearchByClass<TestStateListener> testListeners) {
    for (TestStateListener tl : testListeners.getSearchResults()) {
        if (tl instanceof TestBean) {
            TestBeanHelper.prepare((TestElement) tl);
        }
        if (host == null) {
            tl.testStarted();
        } else {
            tl.testStarted(host);
        }
    }
}
 
开发者ID:botelhojp,项目名称:apache-jmeter-2.10,代码行数:14,代码来源:StandardJMeterEngine.java

示例6: JMeterThread

import org.apache.jorphan.collections.SearchByClass; //导入方法依赖的package包/类
public JMeterThread(HashTree test, JMeterThreadMonitor monitor, ListenerNotifier note) {
    this.monitor = monitor;
    threadVars = new JMeterVariables();
    testTree = test;
    compiler = new TestCompiler(testTree);
    controller = (Controller) testTree.getArray()[0];
    SearchByClass<TestIterationListener> threadListenerSearcher = new SearchByClass<TestIterationListener>(TestIterationListener.class); // TL - IS
    test.traverse(threadListenerSearcher);
    testIterationStartListeners = threadListenerSearcher.getSearchResults();
    notifier = note;
    running = true;
}
 
开发者ID:botelhojp,项目名称:apache-jmeter-2.10,代码行数:13,代码来源:JMeterThread.java


注:本文中的org.apache.jorphan.collections.SearchByClass.getSearchResults方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。