package io.netty.handler.ssl;

/* 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) {
        if (th != null) {
            this.cause = th;
            return;
        }
        throw new NullPointerException("cause");
    }
}
