package io.netty.handler.ssl;

import java.util.Objects;

/* JADX INFO: loaded from: classes.dex */
public final class SslHandshakeCompletionEvent {
    public static final SslHandshakeCompletionEvent SUCCESS = new SslHandshakeCompletionEvent();
    private final Throwable cause;

    private SslHandshakeCompletionEvent() {
        this.cause = null;
    }

    public Throwable cause() {
        return this.cause;
    }

    public boolean isSuccess() {
        return this.cause == null;
    }

    public String toString() {
        Throwable thCause = cause();
        if (thCause == null) {
            return "SslHandshakeCompletionEvent(SUCCESS)";
        }
        return "SslHandshakeCompletionEvent(" + thCause + ')';
    }

    public SslHandshakeCompletionEvent(Throwable th) {
        Objects.requireNonNull(th, "cause");
        this.cause = th;
    }
}
