class NettyChannelPublisher extends SubscribablePublisher<T> {

    private void cancel(SubscriptionImpl forSubscription) {
        if (forSubscription != subscription) {
            // Subscriptions shares common state hence a requestN after termination/cancellation must be ignored
            return;
        }
        resetSubscription();

        // If a cancel occurs with a valid subscription we need to clear any pending data and set a fatalError so that
        // any future Subscribers don't get partial data delivered from the queue.
        pending = null;
        if (fatalError == null) {
            fatalError = StacklessClosedChannelException.newInstance(NettyChannelPublisher.class, "cancel");
        }

        // If an incomplete subscriber is cancelled then close channel. A subscriber can cancel after getting complete,
        // which should not close the channel.
        closeChannelInbound();
    }

      NettyChannelPublisher(Channel channel, Predicate<T> terminalSignalPredicate, CloseHandler closeHandler);

}