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

io.sphere.sdk.queries.SubscriptionImpl Maven / Gradle / Ivy

package io.sphere.sdk.queries;

import io.sphere.sdk.client.SphereClient;
import io.sphere.sdk.models.Base;
import org.reactivestreams.Subscriber;
import org.reactivestreams.Subscription;

import java.util.function.Function;

final class SubscriptionImpl> extends Base implements Subscription {
    SubscriptionsState state;
    SubscriptionImpl(final QueryDsl seedQuery, final Function idExtractor, final SphereClient sphereClient, final Subscriber subscriber) {
        state = new RunningSubscription(seedQuery, idExtractor, sphereClient, subscriber, this);
    }

    @Override
    public void request(final long n) {
        state.request(n);
    }

    @Override
    public void cancel() {
        state.cancel();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy