Home / Class/ BoringSSLTask Class — netty Architecture

BoringSSLTask Class — netty Architecture

Architecture documentation for the BoringSSLTask class in BoringSSLTask.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  d61002b7_6d40_75d0_5106_ccd2311f176a["BoringSSLTask"]
  e7bdf55d_f116_8702_89fb_aa78c500fa31["BoringSSLTask.java"]
  d61002b7_6d40_75d0_5106_ccd2311f176a -->|defined in| e7bdf55d_f116_8702_89fb_aa78c500fa31
  39c76127_1a0b_908c_6f21_625db2e2ec1c["BoringSSLTask()"]
  d61002b7_6d40_75d0_5106_ccd2311f176a -->|method| 39c76127_1a0b_908c_6f21_625db2e2ec1c
  2be39281_7e97_8884_9b46_e5b6ad82d5b5["run()"]
  d61002b7_6d40_75d0_5106_ccd2311f176a -->|method| 2be39281_7e97_8884_9b46_e5b6ad82d5b5
  2e0492e3_3d27_54f1_9f38_d310ce98c302["destroy()"]
  d61002b7_6d40_75d0_5106_ccd2311f176a -->|method| 2e0492e3_3d27_54f1_9f38_d310ce98c302
  127c338a_47b8_c9c3_f354_542fa1b75595["runTask()"]
  d61002b7_6d40_75d0_5106_ccd2311f176a -->|method| 127c338a_47b8_c9c3_f354_542fa1b75595

Relationship Graph

Source Code

codec-classes-quic/src/main/java/io/netty/handler/codec/quic/BoringSSLTask.java lines 21–60

abstract class BoringSSLTask implements Runnable {
    private final long ssl;
    protected boolean didRun;

    // These fields are accessed via JNI.
    private int returnValue;
    private volatile boolean complete;

    protected BoringSSLTask(long ssl) {
        // It is important that this constructor never throws. Be sure to not change this!
        this.ssl = ssl;
    }

    @Override
    public final void run() {
        if (!didRun) {
            didRun = true;
            runTask(ssl, (long ssl, int result) -> {
                returnValue = result;
                complete = true;
            });
        }
    }

    /**
     * Called once the task should be destroyed.
     */
    protected void destroy() {
        // Noop
    }

    /**
     * Run the task and return the return value that should be passed back to OpenSSL.
     */
    protected abstract void runTask(long ssl, TaskCallback callback);

    interface TaskCallback {
        void onResult(long ssl, int result);
    }
}

Frequently Asked Questions

What is the BoringSSLTask class?
BoringSSLTask is a class in the netty codebase, defined in codec-classes-quic/src/main/java/io/netty/handler/codec/quic/BoringSSLTask.java.
Where is BoringSSLTask defined?
BoringSSLTask is defined in codec-classes-quic/src/main/java/io/netty/handler/codec/quic/BoringSSLTask.java at line 21.

Analyze Your Own Codebase

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

Try Supermodel Free