@Override
        public void onNext(T t) {
            if (completed || canceled) {
                PooledObjects.close(t);
                return;
            }
            switch (timeoutMode) {
                case UNTIL_NEXT:
                    lastEventTimeNanos = System.nanoTime();
                    break;
                case UNTIL_FIRST:
                    cancelSchedule();
                    timeoutFuture = null;
                    break;
                case UNTIL_EOS:
                    break;
            }
            delegate.onNext(t);
        }
Subscribes the given subscriber to this stream with timeout logic applied.

@param subscriber the subscriber to this stream
@param executor the executor for running timeout tasks and stream operations
@param options subscription options
@see StreamMessage#subscribe(Subscriber, EventExecutor, SubscriptionOption...)
core/src/main/java/com/linecorp/armeria/common/stream/TimeoutStreamMessage.java