All Downloads are FREE. Search and download functionalities are using the official Maven repository.

graphql.kickstart.execution.subscriptions.apollo.SubscriptionStopCommand Maven / Gradle / Ivy

There is a newer version: 16.0.0
Show newest version
package graphql.kickstart.execution.subscriptions.apollo;

import graphql.kickstart.execution.subscriptions.SubscriptionSession;
import java.util.Collection;
import lombok.RequiredArgsConstructor;

@RequiredArgsConstructor
class SubscriptionStopCommand implements SubscriptionCommand {

  private final Collection connectionListeners;

  @Override
  public void apply(SubscriptionSession session, OperationMessage message) {
    connectionListeners.forEach(it -> it.onStop(session, message));
    session.unsubscribe(message.getId());
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy