Apache JMeter
2.0.1.20050615

org.apache.jmeter.protocol.tcp.sampler
Class TCPSampler

java.lang.Object
  extended byorg.apache.jmeter.testelement.AbstractTestElement
      extended byorg.apache.jmeter.samplers.AbstractSampler
          extended byorg.apache.jmeter.protocol.tcp.sampler.TCPSampler
All Implemented Interfaces:
Cloneable, Sampler, Serializable, TestElement, TestListener

public class TCPSampler
extends AbstractSampler
implements TestListener

A sampler which understands Tcp requests.

Version:
$Revision: 1.5.2.7 $ $Date: 2004/10/06 01:56:56 $
See Also:
Serialized Form

Field Summary
static String CLASSNAME
           
static String FILENAME
           
static String NODELAY
           
static String PORT
           
static String REQUEST
           
static String SERVER
           
static String TIMEOUT
           
 
Fields inherited from interface org.apache.jmeter.testelement.TestElement
ENABLED, GUI_CLASS, NAME, TEST_CLASS
 
Constructor Summary
TCPSampler()
           
 
Method Summary
 String getFilename()
           
 String getLabel()
          Returns a formatted string label describing this sampler Example output: Tcp://Tcp.nowhere.com/pub/README.txt
 boolean getNoDelay()
           
 String getPassword()
           
 int getPort()
           
 String getRequestData()
           
 String getServer()
           
 int getTimeout()
           
 String getUsername()
           
 SampleResult sample(Entry e)
          Obtains statistics about the given Entry, and packages the information into a SampleResult.
 void setFilename(String newFilename)
           
 void setNoDelay(String newNoDelay)
           
 void setPort(String newFilename)
           
 void setRequestData(String newRequestData)
           
 void setServer(String newServer)
           
 void setTimeout(String newTimeout)
           
 void testEnded()
          Called once for all threads after the end of a test
 void testEnded(String host)
           
 void testIterationStart(LoopIterationEvent event)
          Each time through a Thread Group's test script, an iteration event is fired.
 void testStarted()
          Called just before the start of the test Note that not all the test variables will have been set up at this point.
 void testStarted(String host)
           
 
Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement
addProperty, addTestElement, canRemove, clear, clearTemporary, clone, emptyTemporary, equals, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsLong, getPropertyAsString, getThreadContext, getThreadName, isRunningVersion, isTemporary, logProperties, mergeIn, nextIsNull, propertyIterator, recoverRunningVersion, removeProperty, setName, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, threadFinished, threadStarted, traverse, traverseCollection, traverseMap, traverseProperty
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.jmeter.testelement.TestElement
addTestElement, canRemove, clear, clone, getProperty, getPropertyAsBoolean, getPropertyAsFloat, getPropertyAsInt, getPropertyAsLong, getPropertyAsString, getThreadContext, getThreadName, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removeProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, threadFinished, threadStarted, traverse
 

Field Detail

SERVER

public static final String SERVER
See Also:
Constant Field Values

PORT

public static final String PORT
See Also:
Constant Field Values

FILENAME

public static final String FILENAME
See Also:
Constant Field Values

CLASSNAME

public static final String CLASSNAME
See Also:
Constant Field Values

NODELAY

public static final String NODELAY
See Also:
Constant Field Values

TIMEOUT

public static final String TIMEOUT
See Also:
Constant Field Values

REQUEST

public static final String REQUEST
See Also:
Constant Field Values
Constructor Detail

TCPSampler

public TCPSampler()
Method Detail

getUsername

public String getUsername()

getPassword

public String getPassword()

setServer

public void setServer(String newServer)

getServer

public String getServer()

setPort

public void setPort(String newFilename)

getPort

public int getPort()

setFilename

public void setFilename(String newFilename)

getFilename

public String getFilename()

setRequestData

public void setRequestData(String newRequestData)

getRequestData

public String getRequestData()

setTimeout

public void setTimeout(String newTimeout)

getTimeout

public int getTimeout()

setNoDelay

public void setNoDelay(String newNoDelay)

getNoDelay

public boolean getNoDelay()

getLabel

public String getLabel()
Returns a formatted string label describing this sampler Example output: Tcp://Tcp.nowhere.com/pub/README.txt

Returns:
a formatted string label describing this sampler

sample

public SampleResult sample(Entry e)
Description copied from interface: Sampler
Obtains statistics about the given Entry, and packages the information into a SampleResult.

Specified by:
sample in interface Sampler

testStarted

public void testStarted()
Description copied from interface: TestListener
Called just before the start of the test Note that not all the test variables will have been set up at this point.

Specified by:
testStarted in interface TestListener
See Also:
StandardJMeterEngine.run()

testEnded

public void testEnded()
Description copied from interface: TestListener
Called once for all threads after the end of a test

Specified by:
testEnded in interface TestListener
See Also:
StandardJMeterEngine.stopTest()

testStarted

public void testStarted(String host)
Specified by:
testStarted in interface TestListener

testEnded

public void testEnded(String host)
Specified by:
testEnded in interface TestListener

testIterationStart

public void testIterationStart(LoopIterationEvent event)
Description copied from interface: TestListener
Each time through a Thread Group's test script, an iteration event is fired.

Specified by:
testIterationStart in interface TestListener
Parameters:
event -

Apache JMeter
2.0.1.20050615

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