public static void evalBindReturn(ResultCode resultCode, String message, LDAPException e,
                IAsyncResultHandler<ILdapResult> handler) {
            LdapResultCode ldapResultCode = DefaultLdapResultCodeFactory.convertResultCode(resultCode);

            if (ldapResultCode == LdapResultCode.OTHER_FAILURE) {
                if (e != null) {
                    handler.handle(AsyncResultImpl.<ILdapResult>create(DefaultExceptionFactory.create(e)));
                } else {
                    handler.handle(AsyncResultImpl.<ILdapResult>create(DefaultExceptionFactory.create(ldapResultCode, message)));
                }
            } else {
                handler.handle(AsyncResultImpl.<ILdapResult>create(new LdapResult(ldapResultCode, message)));
            }
        }
@author Marc Savy {@literal <msavy@redhat.com>}
gateway/engine/core/src/main/java/io/apiman/gateway/engine/impl/DefaultLdapClientConnection.java