Interface BetaBrowserStateChange.Visitor
-
- All Implemented Interfaces:
public interface BetaBrowserStateChange.Visitor<T extends Object>An interface that defines how to map each variant of BetaBrowserStateChange to a value of type T.
-
-
Method Summary
Modifier and Type Method Description abstract TvisitTabOpened(BetaBrowserStateChangeTabOpened 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(BetaBrowserStateChangeDownloadStarted downloadStarted)A file download that started during this call. abstract TvisitDownloadCompleted(BetaBrowserStateChangeDownloadCompleted 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(BetaBrowserStateChangeDownloadFailed downloadFailed)A file download that failed — or was cancelled — during this call. Tunknown(JsonValue json)Maps an unknown variant of BetaBrowserStateChange to a value of type T. -
-
Method Detail
-
visitTabOpened
abstract T visitTabOpened(BetaBrowserStateChangeTabOpened 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(BetaBrowserStateChangeDownloadStarted downloadStarted)
A file download that started during this call.
-
visitDownloadCompleted
abstract T visitDownloadCompleted(BetaBrowserStateChangeDownloadCompleted 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(BetaBrowserStateChangeDownloadFailed downloadFailed)
A file download that failed — or was cancelled — during this call.
-
unknown
T unknown(JsonValue json)
Maps an unknown variant of BetaBrowserStateChange to a value of type T.
An instance of BetaBrowserStateChange 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.
-
-
-
-