Interface BrowserStateChange.Visitor
-
- All Implemented Interfaces:
public interface BrowserStateChange.Visitor<T extends Object>An interface that defines how to map each variant of BrowserStateChange to a value of type T.
-
-
Method Summary
Modifier and Type Method Description abstract TvisitTabOpened(BrowserStateChangeTabOpened tabOpened)A tab this call's execution opened that remains open at its end — the creation delta of the tabsinventory, not an event log.abstract TvisitDownloadStarted(BrowserStateChangeDownloadStarted downloadStarted)A file download that started during this call. abstract TvisitDownloadCompleted(BrowserStateChangeDownloadCompleted downloadCompleted)A file download that finished during this call, reported with the same download_idas itsdownload_started— or without a priordownload_started, when the download finished during the call that started it (at most one state change perdownload_idper result).abstract TvisitDownloadFailed(BrowserStateChangeDownloadFailed downloadFailed)A file download that failed — or was cancelled — during this call. Tunknown(JsonValue json)Maps an unknown variant of BrowserStateChange to a value of type T. -
-
Method Detail
-
visitTabOpened
abstract T visitTabOpened(BrowserStateChangeTabOpened tabOpened)
A tab this call's execution opened that remains open at its end — the creation delta of the
tabsinventory, not an event log.Carries only the
tab_id; the tab'stitleandurllive on itstabsentry, which must include the sametab_id. A tab opened during a failed call gets no deferredtab_opened; it simply appears in the next result'stabsinventory.
-
visitDownloadStarted
abstract T visitDownloadStarted(BrowserStateChangeDownloadStarted downloadStarted)
A file download that started during this call.
-
visitDownloadCompleted
abstract T visitDownloadCompleted(BrowserStateChangeDownloadCompleted downloadCompleted)
A file download that finished during this call, reported with the same
download_idas itsdownload_started— or without a priordownload_started, when the download finished during the call that started it (at most one state change perdownload_idper result).
-
visitDownloadFailed
abstract T visitDownloadFailed(BrowserStateChangeDownloadFailed downloadFailed)
A file download that failed — or was cancelled — during this call.
-
unknown
T unknown(JsonValue json)
Maps an unknown variant of BrowserStateChange to a value of type T.
An instance of BrowserStateChange can contain an unknown variant if it was deserialized from data that doesn't match any known variant. For example, if the SDK is on an older version than the API, then the API may respond with new variants that the SDK is unaware of.
-
-
-
-