/** * 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)); }
/** * 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)); }
/** * 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); } }
/** * 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),
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);
result = new CompareResult((LDAPResult) response); return new CompareResult(messageID, ResultCode.REFERRAL_LIMIT_EXCEEDED, ERR_TOO_MANY_REFERRALS.get(),
result = new CompareResult((LDAPResult) response); return new CompareResult(messageID, ResultCode.REFERRAL_LIMIT_EXCEEDED, ERR_TOO_MANY_REFERRALS.get(),
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;