| java.lang.Object | ||
| ↳ | XWalkExtensionInternal | |
| ↳ | org.xwalk.core.XWalkExtension | |
This class represents an extension and could be implemented by callers.
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
XWalkExtension(String name, String jsApi)
Constructor with name and javascript API.
| |||||||||||
|
XWalkExtension(String name, String jsApi, String[] entryPoints)
Constructor with name, javascript API and entry points.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| final void |
broadcastMessage(String message)
Broadcast message to all extension instances.
| ||||||||||
| abstract void |
onMessage(int instanceID, String message)
Notify the extension that the async message is received.
| ||||||||||
| abstract String |
onSyncMessage(int instanceID, String message)
Notify the extension that the sync message is received.
| ||||||||||
| final void |
postMessage(int instanceID, String message)
Send message to an instance.
| ||||||||||
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| void |
destroyExtension()
Destroy an extension.
| ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Constructor with name and javascript API.
| name | the exposed namespace. |
|---|---|
| jsApi | the string of javascript API. |
Constructor with name, javascript API and entry points.
| name | the exposed namespace. |
|---|---|
| jsApi | the string of javascript API. |
| entryPoints | Entry points are used when the extension needs to have objects outside the namespace that is implicitly created using its name. |
Broadcast message to all extension instances.
| message | the message. |
|---|
Notify the extension that the async message is received.
| instanceID | the id of instance. |
|---|---|
| message | the received message. |
Notify the extension that the sync message is received.
| instanceID | the id of instance. |
|---|---|
| message | the received message. |
Send message to an instance.
| instanceID | the id of instance. |
|---|---|
| message | the message. |
Destroy an extension.