/** * Creates a new compare result object with the provided message ID and with * the protocol op and controls read from the given ASN.1 stream reader. * * @param messageID The LDAP message ID for the LDAP message that is * associated with this LDAP result. * @param messageSequence The ASN.1 stream reader sequence used in the * course of reading the LDAP message elements. * @param reader The ASN.1 stream reader from which to read the * protocol op and controls. * * @return The decoded compare result. * * @throws LDAPException If a problem occurs while reading or decoding data * from the ASN.1 stream reader. */ static CompareResult readCompareResultFrom(final int messageID, final ASN1StreamReaderSequence messageSequence, final ASN1StreamReader reader) throws LDAPException { return new CompareResult(LDAPResult.readLDAPResultFrom(messageID, messageSequence, reader)); }
/** * Indicates whether the compare operation matched the target entry. * * @return {@code true} if the compare operation matched the target entry, * or {@code false} if not. */ public boolean compareMatched() { return (getResultCode().equals(ResultCode.COMPARE_TRUE)); } }
/** * Creates a new compare result object with the provided message ID and with * the protocol op and controls read from the given ASN.1 stream reader. * * @param messageID The LDAP message ID for the LDAP message that is * associated with this compare result. * @param messageSequence The ASN.1 stream reader sequence used in the * course of reading the LDAP message elements. * @param reader The ASN.1 stream reader from which to read the * protocol op and controls. * * @return The decoded compare result object. * * @throws LDAPException If a problem occurs while reading or decoding data * from the ASN.1 stream reader. */ @InternalUseOnly() public static CompareResult readCompareResultFrom(final int messageID, final ASN1StreamReaderSequence messageSequence, final ASN1StreamReader reader) throws LDAPException { return CompareResult.readCompareResultFrom(messageID, messageSequence, reader); }
result = new CompareResult((LDAPResult) response); if ((result.getResultCode().equals(ResultCode.REFERRAL)) && followReferrals(connection)) return new CompareResult(messageID, ResultCode.REFERRAL_LIMIT_EXCEEDED, ERR_TOO_MANY_REFERRALS.get(), result.getMatchedDN(), result.getReferralURLs(), result.getResponseControls()); result.getResultCode()); if (retryResult != null)
throws LDAPException for (final String urlString : referralResult.getReferralURLs())
result = new CompareResult((LDAPResult) response); if ((result.getResultCode().equals(ResultCode.REFERRAL)) && followReferrals(connection)) return new CompareResult(messageID, ResultCode.REFERRAL_LIMIT_EXCEEDED, ERR_TOO_MANY_REFERRALS.get(), result.getMatchedDN(), result.getReferralURLs(), result.getResponseControls()); result.getResultCode()); if (retryResult != null)
throws LDAPException for (final String urlString : referralResult.getReferralURLs())
/** * Creates a new compare result object with the provided message ID and with * the protocol op and controls read from the given ASN.1 stream reader. * * @param messageID The LDAP message ID for the LDAP message that is * associated with this LDAP result. * @param messageSequence The ASN.1 stream reader sequence used in the * course of reading the LDAP message elements. * @param reader The ASN.1 stream reader from which to read the * protocol op and controls. * * @return The decoded compare result. * * @throws LDAPException If a problem occurs while reading or decoding data * from the ASN.1 stream reader. */ static CompareResult readCompareResultFrom(final int messageID, final ASN1StreamReaderSequence messageSequence, final ASN1StreamReader reader) throws LDAPException { return new CompareResult(LDAPResult.readLDAPResultFrom(messageID, messageSequence, reader)); }
/** * Indicates whether the compare operation matched the target entry. * * @return {@code true} if the compare operation matched the target entry, * or {@code false} if not. */ public boolean compareMatched() { return (getResultCode().equals(ResultCode.COMPARE_TRUE)); } }
/** * Creates a new compare result object with the provided message ID and with * the protocol op and controls read from the given ASN.1 stream reader. * * @param messageID The LDAP message ID for the LDAP message that is * associated with this compare result. * @param messageSequence The ASN.1 stream reader sequence used in the * course of reading the LDAP message elements. * @param reader The ASN.1 stream reader from which to read the * protocol op and controls. * * @return The decoded compare result object. * * @throws LDAPException If a problem occurs while reading or decoding data * from the ASN.1 stream reader. */ @InternalUseOnly() public static CompareResult readCompareResultFrom(final int messageID, final ASN1StreamReaderSequence messageSequence, final ASN1StreamReader reader) throws LDAPException { return CompareResult.readCompareResultFrom(messageID, messageSequence, reader); }
/** * Processes the provided compare request. * * @param compareRequest The compare request to be processed. It must not * be {@code null}. * * @return The result of processing the compare operation. * * @throws LDAPException If the server rejects the compare request, or if a * problem is encountered while sending the request or * reading the response. */ public CompareResult compare(final CompareRequest compareRequest) throws LDAPException { ensureNotNull(compareRequest); final LDAPResult result = compareRequest.process(this, 1); switch (result.getResultCode().intValue()) { case ResultCode.COMPARE_FALSE_INT_VALUE: case ResultCode.COMPARE_TRUE_INT_VALUE: return new CompareResult(result); default: throw new LDAPException(result); } }
if (msg == null) result = new CompareResult(asyncRequestID.getMessageID(), ccr.getResultCode(), ERR_CONN_CLOSED_WAITING_FOR_ASYNC_RESPONSE.get(), null, result = new CompareResult(asyncRequestID.getMessageID(), ccr.getResultCode(), ERR_CONN_CLOSED_WAITING_FOR_ASYNC_RESPONSE_WITH_MESSAGE.get(msg),
/** * Processes the provided compare request. * * @param compareRequest The compare request to be processed. It must not * be {@code null}. * * @return The result of processing the compare operation. * * @throws LDAPException If the server rejects the compare request, or if a * problem is encountered while sending the request or * reading the response. */ public CompareResult compare(final CompareRequest compareRequest) throws LDAPException { ensureNotNull(compareRequest); final LDAPResult result = compareRequest.process(this, 1); switch (result.getResultCode().intValue()) { case ResultCode.COMPARE_FALSE_INT_VALUE: case ResultCode.COMPARE_TRUE_INT_VALUE: return new CompareResult(result); default: throw new LDAPException(result); } }
if (msg == null) result = new CompareResult(asyncRequestID.getMessageID(), ccr.getResultCode(), ERR_CONN_CLOSED_WAITING_FOR_ASYNC_RESPONSE.get(), null, result = new CompareResult(asyncRequestID.getMessageID(), ccr.getResultCode(), ERR_CONN_CLOSED_WAITING_FOR_ASYNC_RESPONSE_WITH_MESSAGE.get(msg),
return new CompareResult(compareResult); default: throw new LDAPException(compareResult);
break; case COMPARE: response = new CompareResult(messageID, ResultCode.TIMEOUT, message, null, StaticUtils.NO_STRINGS, StaticUtils.NO_CONTROLS); break;
break; case COMPARE: response = new CompareResult(messageID, ResultCode.TIMEOUT, message, null, StaticUtils.NO_STRINGS, StaticUtils.NO_CONTROLS); break;