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 super T> 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();
}
}