Package org.apache.jmeter.samplers

Examples of org.apache.jmeter.samplers.SampleEvent


            }
        }
    }

    private void notifyListeners(List listeners, SampleResult result) {
        SampleEvent event = new SampleEvent(result, threadGroup.getName(), threadVars);
        notifier.notifyListeners(event, listeners);

    }
View Full Code Here


                SamplePackage pack = (SamplePackage) threadVars.getObject(JMeterThread.PACKAGE_OBJECT);
                if (pack == null) {
                    log.warn("Could not fetch SamplePackage");
                } else {
                    SampleEvent event = new SampleEvent(res, threadContext.getThreadGroup().getName(),threadVars);
                    // We must set res to null now, before sending the event for the transaction,
                    // so that we can ignore that event in our sampleOccured method
                    res = null;
                    lnf.notifyListeners(event, pack.getSampleListeners());
                }
View Full Code Here

            // from it (only from a single thread) we don't have to remove
            // these two items in one atomic operation.  Each individual
            // remove is atomic (because we use a synchronized buffer),
            // which is necessary since the buffer can be accessed from
            // other threads (to add things to the buffer).
            SampleEvent res = (SampleEvent)listenerEvents.remove();
            List listeners = (List)listenerEvents.remove();

            notifyListeners (res, listeners);

            listenerEventsSize -= 2;
View Full Code Here

        }
    }

    private void notifyListeners(List listeners, SampleResult result)
    {
        SampleEvent event =
            new SampleEvent(
                result,
                controller.getPropertyAsString(TestElement.NAME));
        compiler.sampleOccurred(event);
        notifier.notifyListeners(event, listeners);
View Full Code Here

                log.debug("Sample excluded based on url or content-type: " + result.getUrlAsString() + " - " + result.getContentType());
            }
            result.setSampleLabel("["+result.getSampleLabel()+"]");
        }
        // SampleEvent is not passed JMeterVariables, because they don't make sense for Proxy Recording
        notifySampleListeners(new SampleEvent(result, "WorkBench")); // TODO - is this the correct threadgroup name?
    }
View Full Code Here

            // If child of TransactionController is a ThroughputController and TPC does
            // not sample its children, then we will have this
            // TODO Should this be at warn level ?
            log.warn("Could not fetch SamplePackage");
        } else {
            SampleEvent event = new SampleEvent(res, threadContext.getThreadGroup().getName(),threadVars, true);
            // We must set res to null now, before sending the event for the transaction,
            // so that we can ignore that event in our sampleOccured method
            res = null;
            // bug 50032
            if (!getThreadContext().isReinitializingSubControllers()) {
View Full Code Here

            // from it (only from a single thread) we don't have to remove
            // these two items in one atomic operation.  Each individual
            // remove is atomic (because we use a synchronized buffer),
            // which is necessary since the buffer can be accessed from
            // other threads (to add things to the buffer).
            SampleEvent res = (SampleEvent)listenerEvents.remove();
            List listeners = (List)listenerEvents.remove();

            notifyListeners (res, listeners);

            listenerEventsSize -= 2;
View Full Code Here

        }
    }

    private void notifyListeners(List listeners, SampleResult result)
    {
        SampleEvent event =
            new SampleEvent(
                result,
                controller.getPropertyAsString(TestElement.NAME));
        compiler.sampleOccurred(event);
        notifier.notifyListeners(event, listeners);
View Full Code Here

         *
         * @see java.lang.Runnable#run()
         */
        public void run()
        {
            SampleEvent event = null;
            while (true)
            {
                try
                {
                    event = (SampleEvent) occurredQ.remove(0);
View Full Code Here

            }
        }
    }

    private void notifyListeners(List<SampleListener> listeners, SampleResult result) {
        SampleEvent event = new SampleEvent(result, threadGroup.getName(), threadVars);
        notifier.notifyListeners(event, listeners);

    }
View Full Code Here

TOP

Related Classes of org.apache.jmeter.samplers.SampleEvent

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.