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

com.infomaximum.cluster.graphql.executor.struct.GSubscriptionPublisher Maven / Gradle / Ivy

There is a newer version: 1.1.11
Show newest version
package com.infomaximum.cluster.graphql.executor.struct;

import graphql.ExecutionResult;
import graphql.execution.reactive.SubscriptionPublisher;
import org.reactivestreams.FlowAdapters;
import org.reactivestreams.Subscriber;

import java.util.concurrent.Flow;

public class GSubscriptionPublisher implements Flow.Publisher {

    private final SubscriptionPublisher sp;

    public GSubscriptionPublisher(SubscriptionPublisher sp) {
        this.sp = sp;
    }

    @Override
    public void subscribe(Flow.Subscriber subscriber) {
        sp.subscribe((Subscriber) FlowAdapters.toSubscriber(subscriber));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy