Interface BrowserIntentResolver
public interface BrowserIntentResolver
Interface for resolving browser intents to either other
intents or a specific url. This decouples the generation of
a symbolic navigation intent from the code that actually
converts the intent into a specific url.
- Since:
- 1.0
- Version:
- 2024-02-12
-
Method Summary
Modifier and TypeMethodDescriptiononResolveBrowserIntent
(BrowserIntent intent) Called when an intent needs to be resolved.
-
Method Details
-
onResolveBrowserIntent
Called when an intent needs to be resolved. The resolution process stops when the first resolver returns a non-null value.A resolver may perform intent chaining by resolving an intent to a different intent. This allows multiple levels of abstraction for browser intents along with multiple ways to override intents. When chaining intents, be sure to use the original intent in the constructor of the new intent to ensure the targeted browser remains the same.
When a resolver recognizes an intent that corresponds to a particular url, it should return an instance of
BrowserUrl
. This ends the resolution process and sends the request to the browser. Be sure to use the original intent in the constructor of the url to ensure that the targeted browser remains the same.- Parameters:
intent
- the intent to resolve
-