class SerializedSubscriber implements Subscription, MultiSubscriber<T> {

    @Override
    public void onSubscribe(Subscription s) {
        if (upstream.compareAndSet(null, s)) {
            downstream.onSubscribe(this);
        } else {
            s.cancel();
            Infrastructure.handleDroppedException(new IllegalStateException("Subscription already set"));
        }
    }

    public  SerializedSubscriber(Subscriber<? super T> downstream);

}