Package Torello.Browser
Class Network.responseReceivedExtraInfo
- java.lang.Object
-
- Torello.Java.Additional.BaseType
-
- Torello.Browser.BrowserEvent
-
- Torello.Browser.Network.responseReceivedExtraInfo
-
- Enclosing class:
- Network
public static class Network.responseReceivedExtraInfo extends BrowserEvent
Fired when additional information about a responseReceived event is available from the network stack. Not every responseReceived event will have an additional responseReceivedExtraInfo for it, and responseReceivedExtraInfo may be fired before or after responseReceived.
EXPERIMENTAL
Hi-Lited Source-Code:- View Here: Torello/Browser/Network.java
- Open New Browser-Tab: Torello/Browser/Network.java
-
-
Field Summary
Serializable ID Modifier and Type Field protected static long
serialVersionUID
For Object Serialization.Event Properties Modifier and Type Field Network.BlockedSetCookieWithReason[]
blockedCookies
A list of cookies which were not stored from the response along with the corresponding reasons for blocking.JsonObject
headers
Raw response headers as they were received over the wire.String
headersText
Raw response header text as it was received over the wire.String
requestId
Request identifier.String
resourceIPAddressSpace
The IP address space of the resource.int
statusCode
The status code of the response.-
Fields inherited from class Torello.Browser.BrowserEvent
domain, name, numFields
-
-
Constructor Summary
Constructors Constructor Description responseReceivedExtraInfo(String requestId, Network.BlockedSetCookieWithReason[] blockedCookies, JsonObject headers, String resourceIPAddressSpace, int statusCode, String headersText)
ConstructorresponseReceivedExtraInfo(JsonObject jo)
JSON Object Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean[]
optionals()
Implementing this method allows sub-classes to specify which JSON Properties may be absent or null.
-
-
-
Field Detail
-
serialVersionUID
protected static final long serialVersionUID
For Object Serialization. java.io.Serializable- See Also:
- Constant Field Values
-
requestId
public final java.lang.String requestId
Request identifier. Used to match this information to another responseReceived event.
-
blockedCookies
public final Network.BlockedSetCookieWithReason[] blockedCookies
A list of cookies which were not stored from the response along with the corresponding reasons for blocking. The cookies here may not be valid due to syntax errors, which are represented by the invalid cookie line string instead of a proper cookie.
-
headers
public final JsonObject headers
Raw response headers as they were received over the wire.
-
resourceIPAddressSpace
public final java.lang.String resourceIPAddressSpace
The IP address space of the resource. The address space can only be determined once the transport established the connection, so we can't send it inrequestWillBeSentExtraInfo
.
-
statusCode
public final int statusCode
The status code of the response. This is useful in cases the request failed and no responseReceived event is triggered, which is the case for, e.g., CORS errors. This is also the correct status code for cached requests, where the status in responseReceived is a 200 and this will be 304.
-
headersText
public final java.lang.String headersText
Raw response header text as it was received over the wire. The raw text may not always be available, such as in the case of HTTP/2 or QUIC.
OPTIONAL
-
-
Constructor Detail
-
responseReceivedExtraInfo
public responseReceivedExtraInfo (java.lang.String requestId, Network.BlockedSetCookieWithReason[] blockedCookies, JsonObject headers, java.lang.String resourceIPAddressSpace, int statusCode, java.lang.String headersText)
Constructor- Parameters:
requestId
- Request identifier. Used to match this information to another responseReceived event.blockedCookies
- A list of cookies which were not stored from the response along with the corresponding reasons for blocking. The cookies here may not be valid due to syntax errors, which are represented by the invalid cookie line string instead of a proper cookie.headers
- Raw response headers as they were received over the wire.resourceIPAddressSpace
- The IP address space of the resource. The address space can only be determined once the transport established the connection, so we can't send it inrequestWillBeSentExtraInfo
.statusCode
- The status code of the response. This is useful in cases the request failed and no responseReceived event is triggered, which is the case for, e.g., CORS errors. This is also the correct status code for cached requests, where the status in responseReceived is a 200 and this will be 304.headersText
- Raw response header text as it was received over the wire. The raw text may not always be available, such as in the case of HTTP/2 or QUIC.
OPTIONAL
-
responseReceivedExtraInfo
public responseReceivedExtraInfo(JsonObject jo)
JSON Object Constructor- Parameters:
jo
- A Json-Object having data about an instance of'responseReceivedExtraInfo'
.
-
-
Method Detail
-
optionals
public boolean[] optionals()
Description copied from class:BaseType
Implementing this method allows sub-classes to specify which JSON Properties may be absent or null. When binding aJsonObject
to a Java-Object, if some of the expected fields for the Java-Object map to Properties which might be left-out or omitted, then that may be indicated by setting that fields array positionTRUE
.
NOTE: This array should have a length equal to the number of fields contained by the Java Object. The first boolean in the array should specify whether the first Object Field may by absent. The second boolean should specify whether the second Object Field is optional in the JSON - and so on and so forth...
-
-