Code example for SSLHandshakeException

0
     * Sends fatal alert 
     * @param description 
     * @param reason 
     */ 
    protected void fatalAlert(byte description, String reason) { 
        throw new AlertException(description, new SSLHandshakeException(reason)); 
    } 
 
    /** 
     * Sends fatal alert 
     * @param description 
     * @param reason 
     * @param cause 
     */ 
    protected void fatalAlert(byte description, String reason, Throwable cause) { 
        throw new AlertException(description, new SSLException(reason, cause)); 
    } 
}