Package Torello.Browser
Class Network.Response
- java.lang.Object
-
- Torello.Java.JSON.BaseType
-
- Torello.Browser.Network.Response
-
- All Implemented Interfaces:
java.io.Serializable
- Enclosing class:
- Network
public static class Network.Response extends BaseType implements java.io.Serializable
HTTP response data.- See Also:
- Serialized Form
Hi-Lited Source-Code:- View Here: Torello/Browser/Network.java
- Open New Browser-Tab: Torello/Browser/Network.java
File Size: 16,475 Bytes Line Count: 351 '\n' Characters Found
-
-
Field Summary
Serializable ID Modifier and Type Field protected static long
serialVersionUID
For Object Serialization.Type Properties Modifier and Type Field String
cacheStorageCacheName
Cache Storage Cache Name.Number
connectionId
Physical connection id that was actually used for this request.boolean
connectionReused
Specifies whether physical connection was actually reused for this request.Number
encodedDataLength
Total number of bytes received for this request so far.Boolean
fromDiskCache
Specifies that the request was served from the disk cache.Boolean
fromPrefetchCache
Specifies that the request was served from the prefetch cache.Boolean
fromServiceWorker
Specifies that the request was served from the ServiceWorker.JsonObject
headers
HTTP response headers.String
headersText
HTTP response headers text.String
mimeType
Resource mimeType as determined by the browser.String
protocol
Protocol used to fetch this request.String
remoteIPAddress
Remote IP address.Integer
remotePort
Remote port.JsonObject
requestHeaders
Refined HTTP request headers that were actually transmitted over the network.String
requestHeadersText
HTTP request headers text.Number
responseTime
The time at which the returned response was generated.Network.SecurityDetails
securityDetails
Security details for the request.String
securityState
Security state of the request resource.String
serviceWorkerResponseSource
Response source of response from ServiceWorker.int
status
HTTP response status code.String
statusText
HTTP response status text.Network.ResourceTiming
timing
Timing information for the given request.String
url
Response URL.
-
Constructor Summary
Constructors Constructor Description Response(String url, int status, String statusText, JsonObject headers, String headersText, String mimeType, JsonObject requestHeaders, String requestHeadersText, boolean connectionReused, Number connectionId, String remoteIPAddress, Integer remotePort, Boolean fromDiskCache, Boolean fromServiceWorker, Boolean fromPrefetchCache, Number encodedDataLength, Network.ResourceTiming timing, String serviceWorkerResponseSource, Number responseTime, String cacheStorageCacheName, String protocol, String securityState, Network.SecurityDetails securityDetails)
ConstructorResponse(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
-
url
public final java.lang.String url
Response URL. This URL can be different from CachedResource.url in case of redirect.
-
status
public final int status
HTTP response status code.
-
statusText
public final java.lang.String statusText
HTTP response status text.
-
headers
public final JsonObject headers
HTTP response headers.
-
headersText
public final java.lang.String headersText
HTTP response headers text. This has been replaced by the headers in Network.responseReceivedExtraInfo.
OPTIONAL
DEPRECATED
-
mimeType
public final java.lang.String mimeType
Resource mimeType as determined by the browser.
-
requestHeaders
public final JsonObject requestHeaders
Refined HTTP request headers that were actually transmitted over the network.
OPTIONAL
-
requestHeadersText
public final java.lang.String requestHeadersText
HTTP request headers text. This has been replaced by the headers in Network.requestWillBeSentExtraInfo.
OPTIONAL
DEPRECATED
-
connectionReused
public final boolean connectionReused
Specifies whether physical connection was actually reused for this request.
-
connectionId
public final java.lang.Number connectionId
Physical connection id that was actually used for this request.
-
remoteIPAddress
public final java.lang.String remoteIPAddress
Remote IP address.
OPTIONAL
-
remotePort
public final java.lang.Integer remotePort
Remote port.
OPTIONAL
-
fromDiskCache
public final java.lang.Boolean fromDiskCache
Specifies that the request was served from the disk cache.
OPTIONAL
-
fromServiceWorker
public final java.lang.Boolean fromServiceWorker
Specifies that the request was served from the ServiceWorker.
OPTIONAL
-
fromPrefetchCache
public final java.lang.Boolean fromPrefetchCache
Specifies that the request was served from the prefetch cache.
OPTIONAL
-
encodedDataLength
public final java.lang.Number encodedDataLength
Total number of bytes received for this request so far.
-
timing
public final Network.ResourceTiming timing
Timing information for the given request.
OPTIONAL
-
serviceWorkerResponseSource
public final java.lang.String serviceWorkerResponseSource
Response source of response from ServiceWorker.
OPTIONAL
-
responseTime
public final java.lang.Number responseTime
The time at which the returned response was generated.
OPTIONAL
-
cacheStorageCacheName
public final java.lang.String cacheStorageCacheName
Cache Storage Cache Name.
OPTIONAL
-
protocol
public final java.lang.String protocol
Protocol used to fetch this request.
OPTIONAL
-
securityState
public final java.lang.String securityState
Security state of the request resource.
-
securityDetails
public final Network.SecurityDetails securityDetails
Security details for the request.
OPTIONAL
-
-
Constructor Detail
-
Response
public Response(java.lang.String url, int status, java.lang.String statusText, JsonObject headers, java.lang.String headersText, java.lang.String mimeType, JsonObject requestHeaders, java.lang.String requestHeadersText, boolean connectionReused, java.lang.Number connectionId, java.lang.String remoteIPAddress, java.lang.Integer remotePort, java.lang.Boolean fromDiskCache, java.lang.Boolean fromServiceWorker, java.lang.Boolean fromPrefetchCache, java.lang.Number encodedDataLength, Network.ResourceTiming timing, java.lang.String serviceWorkerResponseSource, java.lang.Number responseTime, java.lang.String cacheStorageCacheName, java.lang.String protocol, java.lang.String securityState, Network.SecurityDetails securityDetails)
Constructor- Parameters:
url
- Response URL. This URL can be different from CachedResource.url in case of redirect.status
- HTTP response status code.statusText
- HTTP response status text.headers
- HTTP response headers.headersText
- HTTP response headers text. This has been replaced by the headers in Network.responseReceivedExtraInfo.
OPTIONAL
DEPRECATEDmimeType
- Resource mimeType as determined by the browser.requestHeaders
- Refined HTTP request headers that were actually transmitted over the network.
OPTIONALrequestHeadersText
- HTTP request headers text. This has been replaced by the headers in Network.requestWillBeSentExtraInfo.
OPTIONAL
DEPRECATEDconnectionReused
- Specifies whether physical connection was actually reused for this request.connectionId
- Physical connection id that was actually used for this request.remoteIPAddress
- Remote IP address.
OPTIONALremotePort
- Remote port.
OPTIONALfromDiskCache
- Specifies that the request was served from the disk cache.
OPTIONALfromServiceWorker
- Specifies that the request was served from the ServiceWorker.
OPTIONALfromPrefetchCache
- Specifies that the request was served from the prefetch cache.
OPTIONALencodedDataLength
- Total number of bytes received for this request so far.timing
- Timing information for the given request.
OPTIONALserviceWorkerResponseSource
- Response source of response from ServiceWorker.
OPTIONALresponseTime
- The time at which the returned response was generated.
OPTIONALcacheStorageCacheName
- Cache Storage Cache Name.
OPTIONALprotocol
- Protocol used to fetch this request.
OPTIONALsecurityState
- Security state of the request resource.securityDetails
- Security details for the request.
OPTIONAL
-
Response
public Response(JsonObject jo)
JSON Object Constructor- Parameters:
jo
- A Json-Object having data about an instance of'Response'
.
-
-
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...- Specified by:
optionals
in classBaseType
- Returns:
- A
boolean[]
array whose length is precisely equal to the number of fields in the Java Object. - Code:
- Exact Method Body:
return new boolean[] { false, false, false, false, true, false, true, true, false, false, true, true, true, true, true, false, true, true, true, true, true, false, true, };
-
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; Response o = (Response) other; return Objects.equals(this.url, o.url) && (this.status == o.status) && Objects.equals(this.statusText, o.statusText) && Objects.equals(this.headers, o.headers) && Objects.equals(this.headersText, o.headersText) && Objects.equals(this.mimeType, o.mimeType) && Objects.equals(this.requestHeaders, o.requestHeaders) && Objects.equals(this.requestHeadersText, o.requestHeadersText) && (this.connectionReused == o.connectionReused) && Objects.equals(this.connectionId, o.connectionId) && Objects.equals(this.remoteIPAddress, o.remoteIPAddress) && Objects.equals(this.remotePort, o.remotePort) && Objects.equals(this.fromDiskCache, o.fromDiskCache) && Objects.equals(this.fromServiceWorker, o.fromServiceWorker) && Objects.equals(this.fromPrefetchCache, o.fromPrefetchCache) && Objects.equals(this.encodedDataLength, o.encodedDataLength) && Objects.equals(this.timing, o.timing) && Objects.equals(this.serviceWorkerResponseSource, o.serviceWorkerResponseSource) && Objects.equals(this.responseTime, o.responseTime) && Objects.equals(this.cacheStorageCacheName, o.cacheStorageCacheName) && Objects.equals(this.protocol, o.protocol) && Objects.equals(this.securityState, o.securityState) && Objects.equals(this.securityDetails, o.securityDetails);
-
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.url) + this.status + Objects.hashCode(this.statusText) + this.headers.hashCode() + Objects.hashCode(this.headersText) + Objects.hashCode(this.mimeType) + this.requestHeaders.hashCode() + Objects.hashCode(this.requestHeadersText) + (this.connectionReused ? 1 : 0) + Objects.hashCode(this.connectionId) + Objects.hashCode(this.remoteIPAddress) + Objects.hashCode(this.remotePort) + Objects.hashCode(this.fromDiskCache) + Objects.hashCode(this.fromServiceWorker) + Objects.hashCode(this.fromPrefetchCache) + Objects.hashCode(this.encodedDataLength) + this.timing.hashCode() + Objects.hashCode(this.serviceWorkerResponseSource) + Objects.hashCode(this.responseTime) + Objects.hashCode(this.cacheStorageCacheName) + Objects.hashCode(this.protocol) + Objects.hashCode(this.securityState) + this.securityDetails.hashCode();
-
-