Interface GraphQLSubscription.Handler<T>
- Enclosing class:
GraphQLSubscription
public static interface GraphQLSubscription.Handler<T>
Receives the events of one subscription. All methods run on the
Codename One EDT.
-
Method Summary
Modifier and TypeMethodDescriptionvoidThe subscription ended cleanly (servercomplete, or a callerGraphQLSubscription.cancel()).voidonError(GraphQLResponse<T> response) The subscription failed (anerrormessage, a transport error, or a non-clean close).voidonNext(GraphQLResponse<T> response) Anextpayload arrived and itsdatamapped toT.
-
Method Details
-
onNext
Anextpayload arrived and itsdatamapped toT. When the payload also carriederrors,response.hasErrors()is true andresponse.getData()may still be non-null. -
onError
The subscription failed (anerrormessage, a transport error, or a non-clean close). No further events follow. -
onComplete
void onComplete()The subscription ended cleanly (servercomplete, or a callerGraphQLSubscription.cancel()). No further events follow.
-