@Override
        public void onNext(T o) {
            if (result == null) {
                result = o;
            } else {
                onError(new IllegalStateException("Only one element can be published: " + o));
            }
        }
An abstract {@link Subscriber} implementation which collects objects published by a {@link Publisher}.
core/src/main/java/com/linecorp/armeria/internal/common/util/ObjectCollectingUtil.java