Stay organized with collections
Save and categorize content based on your preferences.
IsomorphicObjectBoundaryInterface
interface IsomorphicObjectBoundaryInterface
Boundary interface to be implemented by any type that needs to maintain an isomorphism (i.e. a 1:1 mapping) between the support library objects and their corresponding internal WebView objects.
Summary
Public methods |
abstract Object |
Get the peer object associated with this object.
|
Public methods
getOrCreatePeer
abstract Object getOrCreatePeer(Callable<Object> creationCallable)
Get the peer object associated with this object. One of the pair of classes for which the corresponding objects need to maintain a lazy 1:1 mapping between support library and webview should implement this interface. The mapping is lazy in the sense that one object in the pair (the peer) may be created at an arbitrary point after the other, but once both objects exist their lifetimes become tied and the 1:1 mapping is maintained. Whether this interface should be implemented by the support library class or the webview class depends on which side can be created and exist independently. For example, AwRenderProcess objects are created by WebView before being passed to the support library, and thus SupportLibWebViewRendererAdapter should implement this interface.
Parameters |
Callable<Object> creationCallable |
A callable that can be used to construct an appropriate peer object, if one is required.
|
Returns |
Object |
The peer object associated with this object, which either exists already, or has been freshly created and recorded.
|
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# IsomorphicObjectBoundaryInterface\n=================================\n\n\n```\ninterface IsomorphicObjectBoundaryInterface\n```\n\n\u003cbr /\u003e\n\nKnown direct subclasses \n[JsReplyProxyBoundaryInterface](/reference/org/chromium/support_lib_boundary/JsReplyProxyBoundaryInterface), [WebViewRendererBoundaryInterface](/reference/org/chromium/support_lib_boundary/WebViewRendererBoundaryInterface) \n\n|-------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------|\n| [JsReplyProxyBoundaryInterface](/reference/org/chromium/support_lib_boundary/JsReplyProxyBoundaryInterface) | Boundary interface for org.chromium.android_webview.WebMessageListener. |\n| [WebViewRendererBoundaryInterface](/reference/org/chromium/support_lib_boundary/WebViewRendererBoundaryInterface) | Boundary interface for WebViewRenderer. |\n\n*** ** * ** ***\n\nBoundary interface to be implemented by any type that needs to maintain an isomorphism (i.e. a 1:1 mapping) between the support library objects and their corresponding internal WebView objects.\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `abstract `[Object](https://developer.android.com/reference/java/lang/Object.html) | [getOrCreatePeer](/reference/org/chromium/support_lib_boundary/IsomorphicObjectBoundaryInterface#getOrCreatePeer(java.util.concurrent.Callable\u003cjava.lang.Object\u003e))`(`[Callable](https://developer.android.com/reference/java/util/concurrent/Callable.html)`\u003c`[Object](https://developer.android.com/reference/java/lang/Object.html)`\u003e creationCallable)` Get the peer object associated with this object. |\n\nPublic methods\n--------------\n\n### getOrCreatePeer\n\n```\nabstract Object getOrCreatePeer(Callable\u003cObject\u003e creationCallable)\n```\n\nGet the peer object associated with this object. One of the pair of classes for which the corresponding objects need to maintain a lazy 1:1 mapping between support library and webview should implement this interface. The mapping is lazy in the sense that one object in the pair (the peer) may be created at an arbitrary point after the other, but once both objects exist their lifetimes become tied and the 1:1 mapping is maintained. Whether this interface should be implemented by the support library class or the webview class depends on which side can be created and exist independently. For example, AwRenderProcess objects are created by WebView before being passed to the support library, and thus SupportLibWebViewRendererAdapter should implement this interface. \n\n| Parameters ||\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------|\n| [Callable](https://developer.android.com/reference/java/util/concurrent/Callable.html)`\u003c`[Object](https://developer.android.com/reference/java/lang/Object.html)`\u003e creationCallable` | A callable that can be used to construct an appropriate peer object, if one is required. |\n\n| Returns ||\n|-------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------|\n| [Object](https://developer.android.com/reference/java/lang/Object.html) | The peer object associated with this object, which either exists already, or has been freshly created and recorded. |"]]