default CompletableFuture<List<T>> collect(EventExecutor executor, SubscriptionOption... options) {
        requireNonNull(executor, "executor");
        requireNonNull(options, "options");
        final StreamMessageCollector<T> collector = new StreamMessageCollector<>(options);
        if (!containsNotifyCancellation(options)) {
            // Make the return CompletableFuture completed exceptionally if the stream is cancelled while
            // collecting the elements.
            options = ObjectArrays.concat(options, SubscriptionOption.NOTIFY_CANCELLATION);
        }
        subscribe(collector, executor, options);
        return collector.collect();
    }
Collects the elements published by this {@link StreamMessage} with the specified
{@link EventExecutor} and {@link SubscriptionOption}s. The returned {@link CompletableFuture} will be
notified when the elements are fully consumed.

<p>Note that if this {@link StreamMessage} was subscribed by other {@link Subscriber} already,
the returned {@link CompletableFuture} will be completed with an {@link IllegalStateException}.
core/src/main/java/com/linecorp/armeria/common/stream/StreamMessage.java