Abstract
Protected
_createAPIProtected
_createAPIBridgeSealed
The API end point
Optional
serializer: FuseSerializerThe serializer to use. Defaults to FuseSerializer which is a sensible serializer.
A context-binding function that can be given to another object.
This is useful when you want to use an API as a callback, without exposing the plugin implementation. The returned function is a bounded function. When invoked, it will call on the API endpoint and returns a FuseAPIResponse asynchronously.
Protected
_createAPIFactoryA concrete FuseAPI Factory
Create a concrete FuseAPI factory capable of creating FuseAPI instance for the current runtime.
Protected
_createCreates a callback context that can be passed to native The native code can use the callbackID to callback to the JS code.
The callback can be used several times.
Release the callback using _releaseCallback with the given callbackID. These API usages should be part of your plugin API. When releasing a callback, a standard API call should be made to your plugin to tell the native side that the callback is no longer usable, and it should clean up the native resources surrounding the callback context.
Note that callback data payloads only supports strings.
The callback function
Optional
apiOpts: TAPIOptsString - callbackID
Protected
_execThe execution API. Concrete classes can call this to perform calls to the native side.
The concrete class should expose public methods with type information exposed.
The method link, this should match the endpoint defined in the native API.
Optional
contentType: stringthe MIME type of the data you are passing in.
Optional
data: TSerializableThe data to pass to the native environment
Optional
apiOpts: TAPIOptsThe response body from native. FuseResponseReader has some utility methods to read the data in common formats (e.g. text or JSON)
Protected
_getAPITAPIOpts is a plugin generic type declaring options. User may use this to declare a path on how to get a particular FuseAPI.
This API may be overridden by subclasses to utilise the given options. The default implementation is to simply return a standard FuseAPI.
Optional
opts: TAPIOptsAPI options
Protected
_getAPIFactoryThe concrete API factory
Protected
Abstract
_getIDProtected
_releaseReleases a created callback.
callbackID
Optional
apiOpts: TAPIOptsReturns the FuseContext
The current context
Base class for Fuse Plugins