Apache JMeter

org.apache.jmeter.threads
Class JMeterContext

java.lang.Object
  extended by org.apache.jmeter.threads.JMeterContext

public class JMeterContext
extends Object

Holds context for a thread. Generated by JMeterContextService.


Method Summary
 void clear()
           
 Sampler getCurrentSampler()
           
 StandardJMeterEngine getEngine()
           
 SampleResult getPreviousResult()
           
 Sampler getPreviousSampler()
          Returns the previousSampler.
 byte[] getReadBuffer()
          A temporary buffer that can be shared between samplers in a thread.
 JMeterThread getThread()
           
 ThreadGroup getThreadGroup()
           
 int getThreadNum()
          Returns the threadNum.
 JMeterVariables getVariables()
          Gives access to the JMeter variables for the current thread.
 boolean isSamplingStarted()
           
 void setCurrentSampler(Sampler sampler)
           
 void setEngine(StandardJMeterEngine engine)
           
 void setPreviousResult(SampleResult result)
           
 void setSamplingStarted(boolean b)
           
 void setThread(JMeterThread thread)
           
 void setThreadGroup(ThreadGroup threadgrp)
           
 void setThreadNum(int threadNum)
          Sets the threadNum.
 void setVariables(JMeterVariables vars)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

clear

public void clear()

getVariables

public JMeterVariables getVariables()
Gives access to the JMeter variables for the current thread.

Returns:
a pointer to the JMeter variables.

getReadBuffer

public byte[] getReadBuffer()
A temporary buffer that can be shared between samplers in a thread.

Returns:
the shared read buffer

setVariables

public void setVariables(JMeterVariables vars)

getPreviousResult

public SampleResult getPreviousResult()

setPreviousResult

public void setPreviousResult(SampleResult result)

getCurrentSampler

public Sampler getCurrentSampler()

setCurrentSampler

public void setCurrentSampler(Sampler sampler)

getPreviousSampler

public Sampler getPreviousSampler()
Returns the previousSampler.

Returns:
Sampler

getThreadNum

public int getThreadNum()
Returns the threadNum.

Returns:
int

setThreadNum

public void setThreadNum(int threadNum)
Sets the threadNum.

Parameters:
threadNum - the threadNum to set

getThread

public JMeterThread getThread()

setThread

public void setThread(JMeterThread thread)

getThreadGroup

public ThreadGroup getThreadGroup()

setThreadGroup

public void setThreadGroup(ThreadGroup threadgrp)

getEngine

public StandardJMeterEngine getEngine()

setEngine

public void setEngine(StandardJMeterEngine engine)

isSamplingStarted

public boolean isSamplingStarted()

setSamplingStarted

public void setSamplingStarted(boolean b)

Apache JMeter

Copyright © 1998-2009 Apache Software Foundation. All Rights Reserved.