Flutter Engine
The Flutter Engine
|
Classes | |
class | ConcurrentTaskQueue |
interface | DartMessengerTaskQueue |
class | Reply |
class | SerialTaskQueue |
interface | TaskQueueFactory |
Public Member Functions | |
TaskQueue | makeBackgroundTaskQueue (TaskQueueOptions options) |
void | setMessageHandler ( @NonNull String channel, @Nullable BinaryMessenger.BinaryMessageHandler handler) |
void | setMessageHandler ( @NonNull String channel, @Nullable BinaryMessenger.BinaryMessageHandler handler, @Nullable TaskQueue taskQueue) |
void | enableBufferingIncomingMessages () |
void | disableBufferingIncomingMessages () |
void | send (@NonNull String channel, @NonNull ByteBuffer message) |
void | send ( @NonNull String channel, @Nullable ByteBuffer message, @Nullable BinaryMessenger.BinaryReply callback) |
void | handleMessageFromDart ( @NonNull String channel, @Nullable ByteBuffer message, int replyId, long messageData) |
void | handlePlatformMessageResponse (int replyId, @Nullable ByteBuffer reply) |
int | getPendingChannelResponseCount () |
Public Member Functions inherited from io.flutter.plugin.common.BinaryMessenger | |
default TaskQueue | makeBackgroundTaskQueue () |
default TaskQueue | makeBackgroundTaskQueue (TaskQueueOptions options) |
void | send (@NonNull String channel, @Nullable ByteBuffer message) |
void | send (@NonNull String channel, @Nullable ByteBuffer message, @Nullable BinaryReply callback) |
void | setMessageHandler (@NonNull String channel, @Nullable BinaryMessageHandler handler) |
default void | setMessageHandler ( @NonNull String channel, @Nullable BinaryMessageHandler handler, @Nullable TaskQueue taskQueue) |
default void | enableBufferingIncomingMessages () |
default void | disableBufferingIncomingMessages () |
void | handleMessageFromDart ( @NonNull final String channel, @Nullable ByteBuffer message, final int replyId, long messageData) |
void | handlePlatformMessageResponse (int replyId, @Nullable ByteBuffer reply) |
Package Functions | |
DartMessenger (@NonNull FlutterJNI flutterJNI, @NonNull TaskQueueFactory taskQueueFactory) | |
DartMessenger (@NonNull FlutterJNI flutterJNI) | |
Message conduit for 2-way communication between Android and Dart.
See BinaryMessenger
, which sends messages from Android to Dart
See PlatformMessageHandler
, which handles messages to Android from Dart
Definition at line 32 of file DartMessenger.java.
|
inlinepackage |
Definition at line 66 of file DartMessenger.java.
|
inlinepackage |
Definition at line 71 of file DartMessenger.java.
|
inline |
Disables the ability to queue messages received from Dart.
This can be used after all pending channel handlers have been registered.
Implements io.flutter.plugin.common.BinaryMessenger.
Definition at line 245 of file DartMessenger.java.
|
inline |
Enables the ability to queue messages received from Dart.
This is useful when there are pending channel handler registrations. For example, Dart may be initialized concurrently, and prior to the registration of the channel handlers. This implies that Dart may start sending messages while plugins are being registered.
Implements io.flutter.plugin.common.BinaryMessenger.
Definition at line 240 of file DartMessenger.java.
|
inline |
Returns the number of pending channel callback replies.
When sending messages to the Flutter application using ByteBuffer, io.flutter.plugin.common.BinaryMessenger.BinaryReply)
, developers can optionally specify a reply callback if they expect a reply from the Flutter application.
This method tracks all the pending callbacks that are waiting for response, and is supposed to be called from the main thread (as other methods). Calling from a different thread could possibly capture an indeterministic internal state, so don't do it.
Definition at line 402 of file DartMessenger.java.
|
inline |
Called from any thread.
Implements io.flutter.embedding.engine.dart.PlatformMessageHandler.
Definition at line 336 of file DartMessenger.java.
|
inline |
Implements io.flutter.embedding.engine.dart.PlatformMessageHandler.
Definition at line 370 of file DartMessenger.java.
|
inline |
Creates a TaskQueue that executes the tasks serially on a background thread.
TaskQueueOptions
can be used to configure the task queue to execute tasks concurrently. Doing so can be more performant, though users need to ensure that the task handlers are thread-safe.
Implements io.flutter.plugin.common.BinaryMessenger.
Definition at line 190 of file DartMessenger.java.
|
inline |
Definition at line 268 of file DartMessenger.java.
|
inline |
Definition at line 262 of file DartMessenger.java.
|
inline |
Definition at line 198 of file DartMessenger.java.
|
inline |
Definition at line 204 of file DartMessenger.java.