com.apollographql.subscription.message.CallbackMessageCheck Maven / Gradle / Ivy
package com.apollographql.subscription.message;
/**
* check
message is used during initialization to ensure server can send callbacks
* successfully, and that the id
and verifier
fields provided by
* Router are correct.
* As long as subscription is active, server must send a check
message to
* Router every five seconds. This is used to confirm both that it can still reach
* Router's callback endpoint, and that subscription is still active.
*
* @param id unique subscription ID
* @param verifier value provided by Router that is used to validate requests
*/
public record CallbackMessageCheck(String id, String verifier)
implements SubscritionCallbackMessage {
@Override
public CallbackMessageAction getAction() {
return CallbackMessageAction.CHECK;
}
@Override
public String getId() {
return id;
}
@Override
public String getVerifier() {
return verifier;
}
}