// 
// Decompiled by Procyon v0.6.0
// 

package io.netty.handler.ssl;

public final class SniCompletionEvent extends SslCompletionEvent
{
    private final String hostname;
    
    public SniCompletionEvent(final String hostname) {
        this.hostname = hostname;
    }
    
    public SniCompletionEvent(final String hostname, final Throwable cause) {
        super(cause);
        this.hostname = hostname;
    }
    
    public SniCompletionEvent(final Throwable cause) {
        this(null, cause);
    }
    
    public String hostname() {
        return this.hostname;
    }
    
    @Override
    public String toString() {
        final Throwable cause = this.cause();
        return (cause == null) ? (this.getClass().getSimpleName() + "(SUCCESS='" + this.hostname + "'\")") : (this.getClass().getSimpleName() + '(' + cause + ')');
    }
}
