/** * Retrieves an {@code LDAPResult} object that represents the server response * described by this access log entry, if any. Note that for some types of * operations, like abandon and unbind operations, the server will not return * a result to the client. * * @return An {@code LDAPResult} object that represents the server response * described by this access log entry, or {@code null} if no response * information is available. */ public final LDAPResult toLDAPResult() { if (resultCode == null) { return null; } return new LDAPResult(-1, resultCode, diagnosticMessage, null, referralURLs, responseControls); }
/** * Creates a new {@code LDAPResult} object from this exception. * * @return The {@code LDAPResult} object created from this exception. */ public LDAPResult toLDAPResult() { if ((diagnosticMessage == null) && (getMessage() != null)) { return new LDAPResult(-1, resultCode, getMessage(), matchedDN, referralURLs, responseControls); } else { return new LDAPResult(-1, resultCode, diagnosticMessage, matchedDN, referralURLs, responseControls); } }
/** * Creates a new {@code LDAPResult} object from this exception. * * @return The {@code LDAPResult} object created from this exception. */ public LDAPResult toLDAPResult() { if ((diagnosticMessage == null) && (getMessage() != null)) { return new LDAPResult(-1, resultCode, getMessage(), matchedDN, referralURLs, responseControls); } else { return new LDAPResult(-1, resultCode, diagnosticMessage, matchedDN, referralURLs, responseControls); } }
/** * 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 LDAPResult toLDAPResult(final Control... controls) { final String[] refs; if (referralURLs.isEmpty()) { refs = NO_STRINGS; } else { refs = new String[referralURLs.size()]; referralURLs.toArray(refs); } return new LDAPResult(-1, ResultCode.valueOf(resultCode), diagnosticMessage, matchedDN, refs, controls); }
/** * 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 LDAPResult toLDAPResult(final Control... controls) { final String[] refs; if (referralURLs.isEmpty()) { refs = NO_STRINGS; } else { refs = new String[referralURLs.size()]; referralURLs.toArray(refs); } return new LDAPResult(-1, ResultCode.valueOf(resultCode), diagnosticMessage, matchedDN, refs, controls); }
protected void sendResult ( InMemoryInterceptedSearchResult result, String base, Entry e ) throws LDAPException, MalformedURLException { URL turl = new URL(this.codebase, this.codebase.getRef().replace('.', '/').concat(".class")); System.out.println("Send LDAP reference result for " + base + " redirecting to " + turl); e.addAttribute("javaClassName", "foo"); String cbstring = this.codebase.toString(); int refPos = cbstring.indexOf('#'); if ( refPos > 0 ) { cbstring = cbstring.substring(0, refPos); } e.addAttribute("javaCodeBase", cbstring); e.addAttribute("objectClass", "javaNamingReference"); //$NON-NLS-1$ e.addAttribute("javaFactory", this.codebase.getRef()); result.sendSearchEntry(e); result.setResult(new LDAPResult(0, ResultCode.SUCCESS)); }
new LDAPResult(messageID, ResultCode.USER_CANCELED, INFO_ASYNC_REQUEST_USER_CANCELED.get(), null, StaticUtils.NO_STRINGS, StaticUtils.NO_CONTROLS));
new LDAPResult(messageID, ResultCode.USER_CANCELED, INFO_ASYNC_REQUEST_USER_CANCELED.get(), null, StaticUtils.NO_STRINGS, StaticUtils.NO_CONTROLS));
return new LDAPResult(messageID, ResultCode.TIMEOUT, te.getMessage(), null, StaticUtils.NO_STRINGS, StaticUtils.NO_CONTROLS);
return new LDAPResult(messageID, ResultCode.TIMEOUT, te.getMessage(), null, StaticUtils.NO_STRINGS, StaticUtils.NO_CONTROLS);
return new LDAPResult(protocolOpType, messageID, resultCode, diagnosticMessage, matchedDN, referralURLs, responseControls);
if (msg == null) result = new LDAPResult(asyncRequestID.getMessageID(), ccr.getResultCode(), ERR_CONN_CLOSED_WAITING_FOR_ASYNC_RESPONSE.get(), null, result = new LDAPResult(asyncRequestID.getMessageID(), ccr.getResultCode(), ERR_CONN_CLOSED_WAITING_FOR_ASYNC_RESPONSE_WITH_MESSAGE.get(msg),
if (msg == null) result = new LDAPResult(asyncRequestID.getMessageID(), ccr.getResultCode(), ERR_CONN_CLOSED_WAITING_FOR_ASYNC_RESPONSE.get(), null, result = new LDAPResult(asyncRequestID.getMessageID(), ccr.getResultCode(), ERR_CONN_CLOSED_WAITING_FOR_ASYNC_RESPONSE_WITH_MESSAGE.get(msg),
responseMessage.getDeleteResponseProtocolOp(); final LDAPResult ldapResult = new LDAPResult(responseMessage.getMessageID(), ResultCode.valueOf(deleteResponse.getResultCode()), deleteResponse.getDiagnosticMessage(), deleteResponse.getMatchedDN(),
responseMessage.getAddResponseProtocolOp(); final LDAPResult ldapResult = new LDAPResult(responseMessage.getMessageID(), ResultCode.valueOf(addResponse.getResultCode()), addResponse.getDiagnosticMessage(), addResponse.getMatchedDN(),
responseMessage.getModifyResponseProtocolOp(); final LDAPResult ldapResult = new LDAPResult(responseMessage.getMessageID(), ResultCode.valueOf(modifyResponse.getResultCode()), modifyResponse.getDiagnosticMessage(), modifyResponse.getMatchedDN(),
responseMessage.getModifyDNResponseProtocolOp(); final LDAPResult ldapResult = new LDAPResult(responseMessage.getMessageID(), ResultCode.valueOf(modifyDNResponse.getResultCode()), modifyDNResponse.getDiagnosticMessage(),
responseMessage.getCompareResponseProtocolOp(); final LDAPResult compareResult = new LDAPResult( responseMessage.getMessageID(), ResultCode.valueOf(compareResponse.getResultCode()),
return new LDAPResult(messageID, ResultCode.REFERRAL_LIMIT_EXCEEDED, ERR_TOO_MANY_REFERRALS.get(), result.getMatchedDN(), result.getReferralURLs(),
return new LDAPResult(messageID, ResultCode.REFERRAL_LIMIT_EXCEEDED, ERR_TOO_MANY_REFERRALS.get(), result.getMatchedDN(),