org.apache.jmeter.threads

Class 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)

Method Details

clear

public void clear()

getCurrentSampler

public Sampler getCurrentSampler()

getEngine

public StandardJMeterEngine getEngine()

getPreviousResult

public SampleResult getPreviousResult()

getPreviousSampler

public Sampler getPreviousSampler()
Returns the previousSampler.
Returns:
Sampler

getReadBuffer

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

getThread

public JMeterThread getThread()

getThreadGroup

public ThreadGroup getThreadGroup()

getThreadNum

public int getThreadNum()
Returns the threadNum.
Returns:
int

getVariables

public JMeterVariables getVariables()
Gives access to the JMeter variables for the current thread.
Returns:
a pointer to the JMeter variables.

isSamplingStarted

public boolean isSamplingStarted()

setCurrentSampler

public void setCurrentSampler(Sampler sampler)

setEngine

public void setEngine(StandardJMeterEngine engine)

setPreviousResult

public void setPreviousResult(SampleResult result)

setSamplingStarted

public void setSamplingStarted(boolean b)

setThread

public void setThread(JMeterThread thread)

setThreadGroup

public void setThreadGroup(ThreadGroup threadgrp)

setThreadNum

public void setThreadNum(int threadNum)
Sets the threadNum.
Parameters:
threadNum - the threadNum to set

setVariables

public void setVariables(JMeterVariables vars)

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