Package Torello.Browser
Class Network.responseReceivedExtraInfo
- java.lang.Object
-
- Torello.Java.JSON.BaseType
-
- Torello.Browser.BrowserEvent
-
- Torello.Browser.Network.responseReceivedExtraInfo
-
- All Implemented Interfaces:
java.io.Serializable
- Enclosing class:
- Network
public static class Network.responseReceivedExtraInfo extends BrowserEvent implements java.io.Serializable
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- See Also:
- Serialized Form
Hi-Lited Source-Code:- View Here: Torello/Browser/Network.java
- Open New Browser-Tab: Torello/Browser/Network.java
File Size: 7,700 Bytes Line Count: 154 '\n' Characters Found
-
-
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
Generate Array that Indicates which Parameter are Optional Modifier and Type Method boolean[]
optionals()
Implementing this method allows sub-classes to specify which JSON Properties may be absent or null.Methods: class java.lang.Object Modifier and Type Method boolean
equals(Object other)
Checks whether'this'
equals an input Java-Object
int
hashCode()
Generates a Hash-Code for'this'
instance
-
-
-
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...
-
equals
public boolean equals(java.lang.Object other)
Checks whether'this'
equals an input Java-Object
- Overrides:
equals
in classjava.lang.Object
- Code:
- Exact Method Body:
if (other == null) return false; if (other.getClass() != this.getClass()) return false; responseReceivedExtraInfo o = (responseReceivedExtraInfo) other; return Objects.equals(this.requestId, o.requestId) && Arrays.deepEquals(this.blockedCookies, o.blockedCookies) && Objects.equals(this.headers, o.headers) && Objects.equals(this.resourceIPAddressSpace, o.resourceIPAddressSpace) && (this.statusCode == o.statusCode) && Objects.equals(this.headersText, o.headersText);
-
hashCode
public int hashCode()
Generates a Hash-Code for'this'
instance- Overrides:
hashCode
in classjava.lang.Object
- Code:
- Exact Method Body:
return Objects.hashCode(this.requestId) + Arrays.deepHashCode(this.blockedCookies) + this.headers.hashCode() + Objects.hashCode(this.resourceIPAddressSpace) + this.statusCode + Objects.hashCode(this.headersText);
-
-