AsyncTaskChannel class

A message channel for a running AsyncTask

Available Extensions

Constructors

AsyncTaskChannel({AsyncTaskChannelMessageHandler? messageHandler})
Constructs a task channel.

Properties

hashCode int
The hash code for this object.
no setterinherited
id int
final
isClosed bool
Returns true if this channel is closed. An AsyncTaskChannel is closed when a task is finished.
no setter
isInExecutionContext bool
If true, indicated that channel calls are coming from AsyncTask.run. If false indicates that calls are from outside the AsyncTask.
no setter
isInitialized bool
Returns true if this channel is initialized.
no setter
messageQueueIsEmpty bool
Returns true if the message queue is empty.
no setter
messageQueueIsNotEmpty bool
Returns true if the message queue is NOT empty.
no setter
messageQueueLength int
Returns the current message queue length.
no setter
port AsyncTaskChannelPort
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
task AsyncTask
Returns this channel task.
no setter

Methods

close() → void
Closes this channel.
initialize(AsyncTask task, AsyncTaskChannelPort port) → void
Initialize this channel. Called by AsyncExecutor.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readMessage<M>() → M?
Reads a message if available in queue or return null (non-blocking).
send<M>(M message) → void
Sends message.
sendAndWaitResponse<M, R>(M message) Future<R>
Calls send and waitMessage.
toString() String
A string representation of this object.
override
waitMessage<M>() Future<M>
Waits for a message to arrive and return it.

Operators

operator ==(Object other) bool
The equality operator.
inherited