AFAsyncListenerQuery<TResponse> class
abstract
A version of AFAsyncQuery for queries that have some kind of ongoing connection or state that needs to be shutdown.
Afib will automatically track these queries when you dispatch them. You can use
AFStandardAPIContextMixin.executeShutdownAllActiveQueries or AFStandardAPIContextMixin.executeShutdownListenerQuery
to shut them down.
- Inheritance
-
- Object
- AFObjectWithKey
- AFActionWithKey
- AFAsyncQuery<
TResponse> - AFAsyncListenerQuery
- Implemented types
- Implementers
Constructors
-
AFAsyncListenerQuery({AFID? id, AFPreExecuteResponseDelegate<
TResponse> ? onPreExecuteResponse, AFOnResponseDelegate<TResponse> ? onSuccess, AFOnErrorDelegate? onError})
Properties
- conceptualStore ↔ AFConceptualStore
-
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → AFID?
-
finalinherited
- key → String
-
no setterinherited
- lastStart ↔ int?
-
getter/setter pairinherited
- onError → AFOnErrorDelegate?
-
finalinherited
-
onPreExecuteResponse
→ AFPreExecuteResponseDelegate<
TResponse> ? -
finalinherited
-
onSuccess
→ AFOnResponseDelegate<
TResponse> ? -
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- simulatedLatencyFactor → int?
-
finalinherited
Methods
-
afShutdown(
) → void -
createSuccessContextForResponse(
{required AFDispatcher dispatcher, required AFState state, required TResponse response, required bool isPreExecute}) → AFFinishQuerySuccessContext< TResponse> -
inherited
-
currentMillis(
) → int -
inherited
-
finishAsyncWithError(
AFFinishQueryErrorContext context) → void -
The default implementation calls the error handler specified
in your xxx_define_core.dart file.
inherited
-
finishAsyncWithErrorAF(
AFFinishQueryErrorContext context) → void -
inherited
-
finishAsyncWithResponse(
AFFinishQuerySuccessContext< TResponse> context) → void -
Called when the asynchronous process completes with a response It should merge the results
into the state (preserving immutability by making copies of the relevant portions of the state using copyWith),
and then use the dispatcher to call set actions for any modified
state elements.
inherited
-
finishAsyncWithResponseAF(
AFFinishQuerySuccessContext< TResponse> context) → void -
Called internally by the framework to do pre and post processing before finishAsyncWithResponse
inherited
-
mergeOnWrite(
AFTrackedQuery oldQuery) → AFTrackedQuery? -
Provides an opportunity to merge this new query with an old query when you
start a query and a previous version of it already exists in the state.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
retargetStore(
AFConceptualStore target) → void -
inherited
-
shutdown(
) → void -
Called when this query terminates.
override
-
startAsync(
AFStartQueryContext< TResponse> context) → void -
Called at the start of an asynchronous process, starts the query using data from the
command.
inherited
-
startAsyncAF(
AFDispatcher dispatcher, AFStore store, {required Completer< AFFinishQuerySuccessContext> ? completer, void onResponseExtra(dynamic)?, void onErrorExtra(dynamic)?}) → void -
Called internally when redux middleware begins processing a query.
inherited
-
testFinishAsyncWithError(
AFStateTestContext context, AFQueryError error) → void -
Called during testing to simulate results from an asynchronous call.
inherited
-
testFinishAsyncWithResponse(
AFStateTestContext context, TResponse response) → void -
Called during testing to simulate results from an asynchronous call.
inherited
-
throwUnimplemented(
) → Never -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited