} else {
boolean isContinue = false;
while (true) {
LdapMessage temp = null;
synchronized (responses) {
if (responses.size() == 0) {
break;
}
temp = responses.removeFirst();
}
final MockLdapMessage response = new MockLdapMessage(
temp);
if (!isContinue) {
LdapMessage request = new LdapMessage(null) {
public void decodeValues(Object[] values) {
response.setMessageId(ASN1Integer
.toIntValue(values[0]));
}
};
request.decode(in);
if (response.getOperationIndex() == LdapASN1Constant.OP_SEARCH_RESULT_ENTRY
|| response.getOperationIndex() == LdapASN1Constant.OP_SEARCH_RESULT_REF) {
isContinue = true;
searchID = response.getMessageId();