net.grinder.plugin.http.tcpproxyfilter
Interface HTTPRecording

All Known Implementing Classes:
HTTPRecordingImplementation

public interface HTTPRecording

Interface for recording HTTP stream information.

Author:
Philip Aston

Method Summary
 RequestType addRequest(ConnectionDetails connectionDetails, String method, String relativeURI)
          Add a new request to the recording.
 File createBodyDataFileName()
          Create a new file name for body data.
 String getLastValueForToken(String name)
          Return the last value recorded for the given token.
 HTTPRecordingParameters getParameters()
          Return the parameters to use for the recording.
 void markLastResponseTime()
          Called when a response message starts.
 void setTokenReference(String name, String value, TokenReferenceType tokenReference)
          Fill in token reference details, creating the token if necessary.
 boolean tokenReferenceExists(String name, String source)
          Check for existence of token.
 

Method Detail

getParameters

HTTPRecordingParameters getParameters()
Return the parameters to use for the recording.

Returns:
The parameters.

addRequest

RequestType addRequest(ConnectionDetails connectionDetails,
                       String method,
                       String relativeURI)
Add a new request to the recording.

The request is returned to allow the caller to add things it doesn't know yet, e.g. headers, body, response.

Parameters:
connectionDetails - The connection used to make the request.
method - The HTTP method.
relativeURI - The URI.
Returns:
The request.

markLastResponseTime

void markLastResponseTime()
Called when a response message starts. Because the test script represents a single thread of control we need to calculate the sleep deltas using the last time any response was received on any connection.


setTokenReference

void setTokenReference(String name,
                       String value,
                       TokenReferenceType tokenReference)
Fill in token reference details, creating the token if necessary.

The reference source is cached for use by tokenReferenceExists(String, String), so it should be set before this method is called.

Parameters:
name - The name.
value - The value.
tokenReference - This reference is set with the appropriate token ID, and the new value is set if appropriate.

getLastValueForToken

String getLastValueForToken(String name)
Return the last value recorded for the given token.

Parameters:
name - The token name.
Returns:
The last value, or null if no token reference for this token has been seen.

tokenReferenceExists

boolean tokenReferenceExists(String name,
                             String source)
Check for existence of token. The token must have at least one previous reference with a source type of source.

Parameters:
name - Token name.
source - Token source.
Returns:
true if a token with name name exists, and has at least one reference with a source type of source.

createBodyDataFileName

File createBodyDataFileName()
Create a new file name for body data.

Returns:
The file name.


Copyright © 2000-2013. All Rights Reserved.