|
|||||||||
| Home >> All >> org >> apache >> jmeter >> protocol >> http >> [ sampler overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.jmeter.protocol.http.sampler
Class AccessLogSampler

java.lang.Objectorg.apache.jmeter.testelement.AbstractTestElement
org.apache.jmeter.samplers.AbstractSampler
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase
org.apache.jmeter.protocol.http.sampler.HTTPSampler
org.apache.jmeter.protocol.http.sampler.AccessLogSampler
- All Implemented Interfaces:
- java.lang.Cloneable, org.apache.jmeter.samplers.Sampler, java.io.Serializable, org.apache.jmeter.testbeans.TestBean, org.apache.jmeter.testelement.TestElement, org.apache.jmeter.testelement.TestListener, org.apache.jmeter.testelement.ThreadListener
- public class AccessLogSampler
- extends HTTPSampler
- implements org.apache.jmeter.testbeans.TestBean, org.apache.jmeter.testelement.ThreadListener
- extends HTTPSampler
Description:
AccessLogSampler is responsible for a couple of things:
- creating instances of Generator
- creating instances of Parser
- triggering popup windows
- calling Generator.generateRequest()
- checking to make sure the classes are valid
- making sure a class can be instantiated
Some bugs only appear under production traffic, so it is useful to generate traffic using production logs. This way, JMeter can record when problems occur and provide a way to match the server logs.
Created on: Jun 26, 2003
- Version:
- $Revision: 1.21.2.3 $ last updated $Date: 2005/08/17 15:02:25 $
| Nested Class Summary |
| Nested classes inherited from class org.apache.jmeter.protocol.http.sampler.HTTPSampler |
HTTPSampler.Test |
| Field Summary | |
private int |
count
|
static java.lang.String |
DEFAULT_CLASS
|
private org.apache.jmeter.protocol.http.util.accesslog.Filter |
filter
|
private java.lang.String |
filterClassName
|
private static Logger |
log
|
private java.lang.String |
logFile
|
private org.apache.jmeter.protocol.http.util.accesslog.LogParser |
PARSER
private members used by class * |
private java.lang.String |
parserClassName
|
private boolean |
started
|
| Fields inherited from class org.apache.jmeter.protocol.http.sampler.HTTPSampler |
|
| Fields inherited from class org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase |
ARGUMENTS, AUTH_MANAGER, AUTO_REDIRECTS, CONTENT_TYPE, COOKIE_MANAGER, DEFAULT_HTTP_PORT, DEFAULT_HTTPS_PORT, DEFAULT_PROTOCOL, DOMAIN, dynamicPath, FILE_DATA, FILE_FIELD, FILE_MIMETYPE, FILE_NAME, FOLLOW_REDIRECTS, GET, HEADER_MANAGER, IMAGE_PARSER, MAX_FRAME_DEPTH, MAX_REDIRECTS, METHOD, MIMETYPE, MONITOR, MULTIPART_FORM, NON_HTTP_RESPONSE_CODE, NON_HTTP_RESPONSE_MESSAGE, NORMAL_FORM, PATH, PORT, POST, PROTOCOL, UNSPECIFIED_PORT, URL, USE_KEEPALIVE |
| Fields inherited from class org.apache.jmeter.testelement.AbstractTestElement |
|
| Fields inherited from interface org.apache.jmeter.testelement.TestElement |
ENABLED, GUI_CLASS, NAME, TEST_CLASS |
| Constructor Summary | |
AccessLogSampler()
|
|
| Method Summary | |
java.lang.Object |
clone()
This method may be called to create a new copy of the Object. |
java.lang.String |
getDomain()
|
java.lang.String |
getFilterClassName()
|
java.lang.String |
getLogFile()
Get the path where XML messages are stored. |
java.lang.String |
getParserClassName()
Get the file location of the xml file. |
java.lang.String |
getPortString()
|
protected void |
initFilter()
|
void |
instantiateParser()
Method will instantiate the log parser based on the class in the text field. |
boolean |
isImageParsing()
|
org.apache.jmeter.samplers.SampleResult |
sample(org.apache.jmeter.samplers.Entry e)
sample(Entry e) simply calls sample(). |
org.apache.jmeter.samplers.SampleResult |
sampleWithParser()
sample gets a new HTTPSampler from the generator and calls it's sample() method. |
void |
setDomain(java.lang.String domain)
|
void |
setFilterClassName(java.lang.String filterClassName)
|
void |
setImageParsing(boolean imageParsing)
|
void |
setLogFile(java.lang.String path)
Set the path where XML messages are stored for random selection. |
void |
setParserClassName(java.lang.String classname)
it's kinda obvious, but we state it anyways. |
void |
setPortString(java.lang.String port)
|
void |
testEnded()
Called once for all threads after the end of a test |
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 |
threadFinished()
Called once for each thread at the end of a test |
| Methods inherited from class org.apache.jmeter.protocol.http.sampler.HTTPSampler |
disconnect, getResponseHeaders, modifyHeaderValues, readResponse, sample, sendPostData, setPostHeaders, setupConnection |
| Methods inherited from class org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase |
addArgument, addArgument, addEncodedArgument, addTestElement, downloadPageResources, encodeSpaces, errorResult, followRedirects, getArguments, getAuthManager, getCookieManager, getFileField, getFilename, getFollowRedirects, getHeaderManager, getMethod, getMimetype, getMonitor, getPath, getPort, getProtocol, getQueryString, getUrl, getUseKeepAlive, isImageParser, isMonitor, parseArguments, resultProcessing, sample, setArguments, setAuthManager, setCookieManager, setFileField, setFilename, setFollowRedirects, setHeaderManager, setImageParser, setMethod, setMimetype, setMonitor, setPath, setPort, setProtocol, setUseKeepAlive, testEnded, testIterationStart, testStarted, toString |
| Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement |
addProperty, canRemove, clear, clearTemporary, emptyTemporary, equals, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsLong, getPropertyAsString, getThreadContext, getThreadName, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, nextIsNull, propertyIterator, recoverRunningVersion, removeProperty, setName, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, threadStarted, traverse, traverseCollection, traverseMap, traverseProperty |
| Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.jmeter.testelement.ThreadListener |
threadStarted |
| Methods inherited from interface org.apache.jmeter.testelement.TestElement |
canRemove, clear, getProperty, getPropertyAsBoolean, getPropertyAsFloat, getPropertyAsInt, getPropertyAsLong, getPropertyAsString, getThreadContext, getThreadName, isEnabled, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removeProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, threadStarted, traverse |
| Field Detail |
log
private static Logger log
DEFAULT_CLASS
public static final java.lang.String DEFAULT_CLASS
- See Also:
- Constant Field Values
PARSER
private transient org.apache.jmeter.protocol.http.util.accesslog.LogParser PARSER
- private members used by class *
logFile
private java.lang.String logFile
parserClassName
private java.lang.String parserClassName
filterClassName
private java.lang.String filterClassName
filter
private transient org.apache.jmeter.protocol.http.util.accesslog.Filter filter
count
private int count
started
private boolean started
| Constructor Detail |
AccessLogSampler
public AccessLogSampler()
| Method Detail |
setLogFile
public void setLogFile(java.lang.String path)
- Set the path where XML messages are stored for random selection.
getLogFile
public java.lang.String getLogFile()
- Get the path where XML messages are stored. this is the directory where
JMeter will randomly select a file.
setParserClassName
public void setParserClassName(java.lang.String classname)
- it's kinda obvious, but we state it anyways. Set the xml file with a
string path.
getParserClassName
public java.lang.String getParserClassName()
- Get the file location of the xml file.
sampleWithParser
public org.apache.jmeter.samplers.SampleResult sampleWithParser()
- sample gets a new HTTPSampler from the generator and calls it's sample()
method.
sample
public org.apache.jmeter.samplers.SampleResult sample(org.apache.jmeter.samplers.Entry e)
- sample(Entry e) simply calls sample().
- Specified by:
samplein interfaceorg.apache.jmeter.samplers.Sampler- Overrides:
samplein classHTTPSamplerBase
instantiateParser
public void instantiateParser()
- Method will instantiate the log parser based on the class in the text
field. This was done to make it easier for people to plugin their own log
parser and use different log parser.
getFilterClassName
public java.lang.String getFilterClassName()
setFilterClassName
public void setFilterClassName(java.lang.String filterClassName)
getDomain
public java.lang.String getDomain()
- Overrides:
getDomainin classHTTPSamplerBase
setDomain
public void setDomain(java.lang.String domain)
- Overrides:
setDomainin classHTTPSamplerBase
isImageParsing
public boolean isImageParsing()
setImageParsing
public void setImageParsing(boolean imageParsing)
getPortString
public java.lang.String getPortString()
setPortString
public void setPortString(java.lang.String port)
initFilter
protected void initFilter()
clone
public java.lang.Object clone()
- Description copied from class:
java.lang.Object - This method may be called to create a new copy of the
Object. The typical behavior is as follows:
o == o.clone()is falseo.getClass() == o.clone().getClass()is trueo.equals(o)is true
However, these are not strict requirements, and may be violated if necessary. Of the three requirements, the last is the most commonly violated, particularly if the subclass does not override Object.equals(Object)>
Object.equals(Object)55 .If the Object you call clone() on does not implement java.lang.Cloneable (which is a placeholder interface), then a CloneNotSupportedException is thrown. Notice that Object does not implement Cloneable; this method exists as a convenience for subclasses that do.
Object's implementation of clone allocates space for the new Object using the correct class, without calling any constructors, and then fills in all of the new field values with the old field values. Thus, it is a shallow copy. However, subclasses are permitted to make a deep copy.
All array types implement Cloneable, and override this method as follows (it should never fail):
public Object clone() { try { super.clone(); } catch (CloneNotSupportedException e) { throw new InternalError(e.getMessage()); } }- Specified by:
clonein interfaceorg.apache.jmeter.testelement.TestElement- Overrides:
clonein classHTTPSamplerBase
testEnded
public void testEnded()
- Description copied from interface:
org.apache.jmeter.testelement.TestListener - Called once for all threads after the end of a test
- Specified by:
testEndedin interfaceorg.apache.jmeter.testelement.TestListener- Overrides:
testEndedin classHTTPSamplerBase
testStarted
public void testStarted()
- Description copied from interface:
org.apache.jmeter.testelement.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:
testStartedin interfaceorg.apache.jmeter.testelement.TestListener- Overrides:
testStartedin classHTTPSamplerBase
threadFinished
public void threadFinished()
- Description copied from interface:
org.apache.jmeter.testelement.ThreadListener - Called once for each thread at the end of a test
- Specified by:
threadFinishedin interfaceorg.apache.jmeter.testelement.ThreadListener
|
|||||||||
| Home >> All >> org >> apache >> jmeter >> protocol >> http >> [ sampler overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC