Package org.apache.jmeter.samplers

Examples of org.apache.jmeter.samplers.SampleEvent


                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


                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, 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

      this.notify();
    }

    public void run()
    {
      SampleEvent event = null;
      while(true)
      {
        try
        {
          event = (SampleEvent)occurredQ.remove(0);
View Full Code Here

    }
  }

  private void notifyListeners(SampleResult result)
  {
    SampleEvent event = new SampleEvent(result, group.getName());
    Iterator iter = listeners.iterator();
    while (iter.hasNext())
    {
      SampleListener item = (SampleListener)iter.next();
      item.sampleOccurred(event);
View Full Code Here

                TestElement.GUI_CLASS,
                "org.apache.jmeter.protocol.http.control.gui.HttpTestSampleGui");

            placeSampler(sampler, subConfigs, myTarget);
           
            notifySampleListeners(new SampleEvent(result,sampler.getName()));
        }
    }
View Full Code Here

        {
          log.warn("Could not fetch SamplePackage");
        }
        else
        {
          lnf.notifyListeners(new SampleEvent(res,getName()),pack.getSampleListeners());
        }
        res=null;
          }
        }
View Full Code Here

                TestElement.GUI_CLASS,
                "org.apache.jmeter.protocol.http.control.gui.HttpTestSampleGui");

            placeSampler(sampler, subConfigs, myTarget);
           
            notifySampleListeners(new SampleEvent(result,sampler.getName()));
        }
    }
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

  public void run()
  {
    Iterator iter;
    while (running || this.size() > 1)
    {
      SampleEvent res = (SampleEvent) this.removeFirst();
      if (res != null)
      {
        List listeners = (List) this.removeFirst();
        notifyListeners(res, listeners);
      }
View Full Code Here

      ((ThreadListener)iter.next()).iterationStarted(threadVars.getIteration());
    }
  }
 
  private void notifyListeners(List listeners, SampleResult result) {
    SampleEvent event =
      new SampleEvent(result, (String) controller.getProperty(TestElement.NAME));
    compiler.sampleOccurred(event);
    notifier.addLast(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.