Home / Function/ notifyProgressiveListeners() — netty Function Reference

notifyProgressiveListeners() — netty Function Reference

Architecture documentation for the notifyProgressiveListeners() function in DefaultPromise.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  1e633494_b539_e770_5553_1036e16a38a3["notifyProgressiveListeners()"]
  a0080a71_f091_42e0_8a20_424f0bf9d34a["DefaultPromise"]
  1e633494_b539_e770_5553_1036e16a38a3 -->|defined in| a0080a71_f091_42e0_8a20_424f0bf9d34a
  1eb4836f_ce1b_0ea3_493d_62aaa77fdcd2["notifyProgressiveListeners0()"]
  1e633494_b539_e770_5553_1036e16a38a3 -->|calls| 1eb4836f_ce1b_0ea3_493d_62aaa77fdcd2
  61bb1104_446e_eaf8_28b0_5521bc7a5104["notifyProgressiveListener0()"]
  1e633494_b539_e770_5553_1036e16a38a3 -->|calls| 61bb1104_446e_eaf8_28b0_5521bc7a5104
  6b17dbfa_0dba_6f1a_183b_cac1eee894d9["safeExecute()"]
  1e633494_b539_e770_5553_1036e16a38a3 -->|calls| 6b17dbfa_0dba_6f1a_183b_cac1eee894d9
  style 1e633494_b539_e770_5553_1036e16a38a3 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

common/src/main/java/io/netty/util/concurrent/DefaultPromise.java lines 753–792

    @SuppressWarnings("unchecked")
    void notifyProgressiveListeners(final long progress, final long total) {
        final Object listeners = progressiveListeners();
        if (listeners == null) {
            return;
        }

        final ProgressiveFuture<V> self = (ProgressiveFuture<V>) this;

        EventExecutor executor = executor();
        if (executor.inEventLoop()) {
            if (listeners instanceof GenericProgressiveFutureListener[]) {
                notifyProgressiveListeners0(
                        self, (GenericProgressiveFutureListener<?>[]) listeners, progress, total);
            } else {
                notifyProgressiveListener0(
                        self, (GenericProgressiveFutureListener<ProgressiveFuture<V>>) listeners, progress, total);
            }
        } else {
            if (listeners instanceof GenericProgressiveFutureListener[]) {
                final GenericProgressiveFutureListener<?>[] array =
                        (GenericProgressiveFutureListener<?>[]) listeners;
                safeExecute(executor, new Runnable() {
                    @Override
                    public void run() {
                        notifyProgressiveListeners0(self, array, progress, total);
                    }
                });
            } else {
                final GenericProgressiveFutureListener<ProgressiveFuture<V>> l =
                        (GenericProgressiveFutureListener<ProgressiveFuture<V>>) listeners;
                safeExecute(executor, new Runnable() {
                    @Override
                    public void run() {
                        notifyProgressiveListener0(self, l, progress, total);
                    }
                });
            }
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does notifyProgressiveListeners() do?
notifyProgressiveListeners() is a function in the netty codebase, defined in common/src/main/java/io/netty/util/concurrent/DefaultPromise.java.
Where is notifyProgressiveListeners() defined?
notifyProgressiveListeners() is defined in common/src/main/java/io/netty/util/concurrent/DefaultPromise.java at line 753.
What does notifyProgressiveListeners() call?
notifyProgressiveListeners() calls 3 function(s): notifyProgressiveListener0, notifyProgressiveListeners0, safeExecute.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free