biz.neustar.wpm.api
Interface TransactionStepObject


public interface TransactionStepObject

Basic information about an individual HTTP request during a test.


Method Summary
 long getBlockedTime()
          Deprecated. This API is not available and just returns 0.
 long getBytes()
          Returns the total number of bytes transferred while making the HTTP request.
 long getConnectTime()
          The time spent connected to server
 long getDnsLookupTime()
          The time spent to lookup DNS from DNS server.
 java.util.Date getEnd()
          Returns the time and date the HTTP request ended.
 java.lang.String getErrorMessage()
          Returns descriptive text of any error that occurred while making the HTTP request.
 java.lang.String getHost()
          Returns the host part of the URL.
 java.lang.String getMethod()
          The HTTP method used for this request (usually "GET" or "POST").
 java.lang.String getPath()
          Returns the path of the URL.
 java.lang.String getPostBody()
          The captured POST body (File/Bytes as request body) during validation in the HAR file.
 java.util.Map<java.lang.String,java.lang.String[]> getPostParams()
          The captured POST params during validation in the HAR file.
 java.lang.String getProtocol()
          Returns the protocol part of the URL, usually "http" or "https".
 java.lang.String getQueryString()
          Returns the query string of the URL.
 java.lang.String getReasonPhrase()
          The HTTP reason phrase that the server responded with for the object.
 long getReceiveTime()
          The time in milliseconds for when data was received from server
 java.lang.String getRedirectUrl()
          The redirecting url of the request
 java.util.Map<java.lang.String,java.lang.String[]> getRequestHeaders()
          The request's headers made to server
 java.lang.String getResolvedIpAddress()
          Returns the resolved IP address from the request made.
 java.util.Map<java.lang.String,java.lang.String[]> getResponseHeaders()
          The response's headers from the server.
 long getSendTime()
          The time in milliseconds for when data was sent server
 long getSslHandshakeTime()
          The time spent performing an SSL handshake with server
 java.util.Date getStart()
          Returns the time and date the HTTP request started.
 int getStatusCode()
          Returns the HTTP status code (eg: 200, 404, etc) that resulted when this request was made.
 long getTimeActive()
          Returns the total time the request was active, usually the time for the last byte to be received, but sometimes the time in which the request was aborted because the script had completed.
 long getTimeToFirstByte()
          Returns the time to receive the first byte back from the server.
 java.lang.String getUrl()
          Returns the full URL that this object represents.
 int getWebSocketId()
          The websocket id
 java.util.List<WebSocketMessage> getWebSocketMessages()
          The websocket messages
 boolean wasBlacklisted()
          Was the item blacklisted? If it was a HTTP request was never made and no content was downloaded.
 

Method Detail

getStart

java.util.Date getStart()
Returns the time and date the HTTP request started.

Returns:
the date and time the HTTP request started.

getEnd

java.util.Date getEnd()
Returns the time and date the HTTP request ended.

Returns:
the date and time the HTTP request ended.

getBytes

long getBytes()
Returns the total number of bytes transferred while making the HTTP request.

Returns:
the total number of bytes.

getUrl

java.lang.String getUrl()
Returns the full URL that this object represents.

Returns:
the URL requested.

getStatusCode

int getStatusCode()
Returns the HTTP status code (eg: 200, 404, etc) that resulted when this request was made.

The code may be a non-standard HTTP code, in the 9xx range, which indicates that the object did not download because of a problem connecting to the server or completing the HTTP request. For a detailed list of custom status codes and what they mean, see WPM Custom Status Codes.

Returns:
the HTTP status code.

getReasonPhrase

java.lang.String getReasonPhrase()
The HTTP reason phrase that the server responded with for the object. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec6.html

Returns:
the HTTP reason phrase

getHost

java.lang.String getHost()
Returns the host part of the URL.

Returns:
the host part of the URL.

getProtocol

java.lang.String getProtocol()
Returns the protocol part of the URL, usually "http" or "https".

Returns:
the protocol part of the URL.

getPath

java.lang.String getPath()
Returns the path of the URL. For example, if the URL is http://example.com/foo/bar?baz=1, the path will be "/foo/bar".

Returns:
the path part of the URL.

getQueryString

java.lang.String getQueryString()
Returns the query string of the URL. For example, if the URL is http://example.com/foo/bar?baz=1, the query string will be "baz=1"

Returns:
the query string part of the URL.

getTimeActive

long getTimeActive()
Returns the total time the request was active, usually the time for the last byte to be received, but sometimes the time in which the request was aborted because the script had completed.

Returns:
the time, in milliseconds, this request was active for.

getTimeToFirstByte

long getTimeToFirstByte()
Returns the time to receive the first byte back from the server. If no bytes were returned, then this function returns 0.

Returns:
the time, in milliseconds, to receive back the first byte from the server.

getMethod

java.lang.String getMethod()
The HTTP method used for this request (usually "GET" or "POST").

Returns:
the HTTP method used for this request.

getErrorMessage

java.lang.String getErrorMessage()
Returns descriptive text of any error that occurred while making the HTTP request.

This message is usually coupled with an HTTP status code in the 9xx range, which is a WPM-specific indicator that the request could not complete, usually due to some I/O exception. This error message can usually shed light on what the I/O issue was and is suitable to be thrown as an exception within the underlying script that made the HTTP request.

For a list of possible error messages and what they mean see WPM Custom Status Codes.

Returns:
the string error message or null if no error occurred or no message can be found.

getResolvedIpAddress

java.lang.String getResolvedIpAddress()
Returns the resolved IP address from the request made.

Returns:
the resolved ip address from the request

getDnsLookupTime

long getDnsLookupTime()
The time spent to lookup DNS from DNS server.

Returns:
the dns lookup time

getSslHandshakeTime

long getSslHandshakeTime()
The time spent performing an SSL handshake with server

Returns:
the ssl handshake time

getConnectTime

long getConnectTime()
The time spent connected to server

Returns:
the connect time

getBlockedTime

@Deprecated
long getBlockedTime()
Deprecated. This API is not available and just returns 0.

The time spent when the request object was blocked from executing.

Returns:
the blocked time

getSendTime

long getSendTime()
The time in milliseconds for when data was sent server

Returns:
the send time

getReceiveTime

long getReceiveTime()
The time in milliseconds for when data was received from server

Returns:
the receive time

getRequestHeaders

java.util.Map<java.lang.String,java.lang.String[]> getRequestHeaders()
The request's headers made to server

Returns:
map of the request's headers and its values

getResponseHeaders

java.util.Map<java.lang.String,java.lang.String[]> getResponseHeaders()
The response's headers from the server.

Returns:
map of the response's headers ad its values

getPostParams

java.util.Map<java.lang.String,java.lang.String[]> getPostParams()
The captured POST params during validation in the HAR file.

Returns:
map of the request's POST parameters

getWebSocketId

int getWebSocketId()
The websocket id

Returns:
the websocket id

getWebSocketMessages

java.util.List<WebSocketMessage> getWebSocketMessages()
The websocket messages

Returns:
the websocket messages

getPostBody

java.lang.String getPostBody()
The captured POST body (File/Bytes as request body) during validation in the HAR file.

Returns:
the post body

getRedirectUrl

java.lang.String getRedirectUrl()
The redirecting url of the request

Returns:
the url

wasBlacklisted

boolean wasBlacklisted()
Was the item blacklisted? If it was a HTTP request was never made and no content was downloaded.

Not matching the whitelist also counts as blacklisted.

Returns:
true if the request was blacklisted, false otherwise.

Copyright © 2020 Neustar, Inc. All Rights Reserved.