Class NavigateEntry
-
- All Implemented Interfaces:
-
kotlin.Comparable
public final class NavigateEntry implements Comparable<NavigateEntry>
Created by vincent on 18-1-1. Copyright @ 2013-2023 Platon AI. All rights reserved.
-
-
Field Summary
Fields Modifier and Type Field Description private StringmainRequestIdprivate Map<String, Object>mainRequestHeadersprivate List<Map<String, String>>mainRequestCookiesprivate IntegermainResponseStatusprivate StringmainResponseStatusTextprivate Map<String, Object>mainResponseHeadersprivate final BooleandocumentTransferredprivate InstantdocumentReadyTimeprivate final Map<String, Instant>actionTimesprivate final AtomicIntegernetworkRequestCountprivate final AtomicIntegernetworkResponseCountprivate final Stringurlprivate final IntegerpageIdprivate final StringpageUrlprivate StringpageReferrerprivate Booleanstoppedprivate Booleanclosedprivate InstantlastActiveTimeprivate final InstantcreateTime
-
Method Summary
Modifier and Type Method Description final StringgetMainRequestId()Main request is only used for HTML documents for now. final UnitsetMainRequestId(String mainRequestId)Main request is only used for HTML documents for now. final Map<String, Object>getMainRequestHeaders()final UnitsetMainRequestHeaders(Map<String, Object> mainRequestHeaders)final List<Map<String, String>>getMainRequestCookies()final UnitsetMainRequestCookies(List<Map<String, String>> mainRequestCookies)final IntegergetMainResponseStatus()The response status of the main request final UnitsetMainResponseStatus(Integer mainResponseStatus)The response status of the main request final StringgetMainResponseStatusText()final UnitsetMainResponseStatusText(String mainResponseStatusText)final Map<String, Object>getMainResponseHeaders()final UnitsetMainResponseHeaders(Map<String, Object> mainResponseHeaders)final BooleangetDocumentTransferred()final InstantgetDocumentReadyTime()The time when the document is ready. final UnitsetDocumentReadyTime(Instant documentReadyTime)The time when the document is ready. final Map<String, Instant>getActionTimes()Track the time of page actions. final AtomicIntegergetNetworkRequestCount()final AtomicIntegergetNetworkResponseCount()final StringgetUrl()The url to navigate. final IntegergetPageId()The page id, 0 means there is no WebPage. final StringgetPageUrl()The page url which can be used to retrieve the WebPage from database. final StringgetPageReferrer()The referrer claimed by the page. final UnitsetPageReferrer(String pageReferrer)The referrer claimed by the page. final BooleangetStopped()Indicate if the navigation is stopped. final UnitsetStopped(Boolean stopped)Indicate if the navigation is stopped. final BooleangetClosed()Indicate if the tab for this navigation is closed. final UnitsetClosed(Boolean closed)Indicate if the tab for this navigation is closed. final InstantgetLastActiveTime()The last active time. final UnitsetLastActiveTime(Instant lastActiveTime)The last active time. final InstantgetCreateTime()The time when the object is created. final Unitrefresh(String action)Refresh the entry with the given action. final Unitsynchronized(Function0<Unit> action)final UnitupdateMainRequest(String requestId, Map<String, Object> headers)final UnitupdateMainResponse(Integer status, String statusText, Map<String, Object> headers)Booleanequals(Object other)IntegerhashCode()IntegercompareTo(NavigateEntry other)-
-
Method Detail
-
getMainRequestId
final String getMainRequestId()
Main request is only used for HTML documents for now.
For HTML webpages, the main request is the request for the first HTML document. TODO: redirection requests are not main requests.
-
setMainRequestId
final Unit setMainRequestId(String mainRequestId)
Main request is only used for HTML documents for now.
For HTML webpages, the main request is the request for the first HTML document. TODO: redirection requests are not main requests.
-
getMainRequestHeaders
final Map<String, Object> getMainRequestHeaders()
-
setMainRequestHeaders
final Unit setMainRequestHeaders(Map<String, Object> mainRequestHeaders)
-
getMainRequestCookies
final List<Map<String, String>> getMainRequestCookies()
-
setMainRequestCookies
final Unit setMainRequestCookies(List<Map<String, String>> mainRequestCookies)
-
getMainResponseStatus
final Integer getMainResponseStatus()
The response status of the main request
-
setMainResponseStatus
final Unit setMainResponseStatus(Integer mainResponseStatus)
The response status of the main request
-
getMainResponseStatusText
final String getMainResponseStatusText()
-
setMainResponseStatusText
final Unit setMainResponseStatusText(String mainResponseStatusText)
-
getMainResponseHeaders
final Map<String, Object> getMainResponseHeaders()
-
setMainResponseHeaders
final Unit setMainResponseHeaders(Map<String, Object> mainResponseHeaders)
-
getDocumentTransferred
final Boolean getDocumentTransferred()
-
getDocumentReadyTime
final Instant getDocumentReadyTime()
The time when the document is ready.
-
setDocumentReadyTime
final Unit setDocumentReadyTime(Instant documentReadyTime)
The time when the document is ready.
-
getActionTimes
final Map<String, Instant> getActionTimes()
Track the time of page actions.
-
getNetworkRequestCount
final AtomicInteger getNetworkRequestCount()
-
getNetworkResponseCount
final AtomicInteger getNetworkResponseCount()
-
getUrl
final String getUrl()
The url to navigate.
If page.href exists, the url is the href, otherwise, the url is page.url. The href has the higher priority to locate a resource.
-
getPageUrl
final String getPageUrl()
The page url which can be used to retrieve the WebPage from database. An empty string means there is no WebPage.
-
getPageReferrer
final String getPageReferrer()
The referrer claimed by the page.
-
setPageReferrer
final Unit setPageReferrer(String pageReferrer)
The referrer claimed by the page.
-
getStopped
final Boolean getStopped()
Indicate if the navigation is stopped.
-
setStopped
final Unit setStopped(Boolean stopped)
Indicate if the navigation is stopped.
-
getLastActiveTime
final Instant getLastActiveTime()
The last active time.
-
setLastActiveTime
final Unit setLastActiveTime(Instant lastActiveTime)
The last active time.
-
getCreateTime
final Instant getCreateTime()
The time when the object is created.
-
synchronized
final Unit synchronized(Function0<Unit> action)
-
updateMainResponse
final Unit updateMainResponse(Integer status, String statusText, Map<String, Object> headers)
-
compareTo
Integer compareTo(NavigateEntry other)
-
-
-
-