/** * Creates a new LDAP result object from this response protocol op. * * @param controls The set of controls to include in the LDAP result. It * may be empty or {@code null} if no controls should be * included. * * @return The LDAP result that was created. */ public BindResult toBindResult(final Control... controls) { final String[] refs; if (referralURLs.isEmpty()) { refs = NO_STRINGS; } else { refs = new String[referralURLs.size()]; referralURLs.toArray(refs); } return new BindResult(-1, ResultCode.valueOf(resultCode), diagnosticMessage, matchedDN, refs, controls, serverSASLCredentials); }
/** * Creates a new LDAP result object from this response protocol op. * * @param controls The set of controls to include in the LDAP result. It * may be empty or {@code null} if no controls should be * included. * * @return The LDAP result that was created. */ public BindResult toBindResult(final Control... controls) { final String[] refs; if (referralURLs.isEmpty()) { refs = NO_STRINGS; } else { refs = new String[referralURLs.size()]; referralURLs.toArray(refs); } return new BindResult(-1, ResultCode.valueOf(resultCode), diagnosticMessage, matchedDN, refs, controls, serverSASLCredentials); }
return new BindResult(messageID, resultCode, diagnosticMessage, matchedDN, referralURLs, controls, serverSASLCredentials);
return new BindResult(messageID, le.getResultCode(), le.getMessage(), le.getMatchedDN(), le.getReferralURLs(), le.getResponseControls()); return new BindResult(messageID, ResultCode.INVALID_CREDENTIALS, ERR_PLAIN_BIND_NO_CREDENTIALS.get(), null, null, null); return new BindResult(messageID, ResultCode.INVALID_CREDENTIALS, ERR_PLAIN_BIND_MALFORMED_CREDENTIALS.get(), null, null, null); return new BindResult(messageID, ResultCode.INVALID_CREDENTIALS, le.getMessage(), le.getMatchedDN(), le.getReferralURLs(), le.getResponseControls()); return new BindResult(messageID, ResultCode.INVALID_CREDENTIALS, null, null, null, null); return new BindResult(messageID, ResultCode.INVALID_CREDENTIALS, le.getMessage(), le.getMatchedDN(), le.getReferralURLs(), le.getResponseControls()); return new BindResult(messageID, ResultCode.SUCCESS, null, null, null, responseControls);
return new BindResult(messageID, resultCode, diagnosticMessage, matchedDN, referralURLs, controls, serverSASLCredentials);
responseMessage.getBindResponseProtocolOp(); final BindResult bindResult = new BindResult(new LDAPResult( responseMessage.getMessageID(), ResultCode.valueOf(bindResponse.getResultCode()),
bindResult = new BindResult(le);
bindResult = new BindResult(le);
bindResult = new BindResult(le);