equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1999, 2005, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
514 static final int SCOPE_SUBTREE = 2; |
514 static final int SCOPE_SUBTREE = 2; |
515 |
515 |
516 LdapResult search(String dn, int scope, int deref, int sizeLimit, |
516 LdapResult search(String dn, int scope, int deref, int sizeLimit, |
517 int timeLimit, boolean attrsOnly, String attrs[], |
517 int timeLimit, boolean attrsOnly, String attrs[], |
518 String filter, int batchSize, Control[] reqCtls, |
518 String filter, int batchSize, Control[] reqCtls, |
519 Hashtable binaryAttrs, boolean waitFirstReply) |
519 Hashtable binaryAttrs, boolean waitFirstReply, |
|
520 int replyQueueCapacity) |
520 throws IOException, NamingException { |
521 throws IOException, NamingException { |
521 |
522 |
522 ensureOpen(); |
523 ensureOpen(); |
523 |
524 |
524 LdapResult res = new LdapResult(); |
525 LdapResult res = new LdapResult(); |
541 ber.endSeq(); |
542 ber.endSeq(); |
542 ber.endSeq(); |
543 ber.endSeq(); |
543 if (isLdapv3) encodeControls(ber, reqCtls); |
544 if (isLdapv3) encodeControls(ber, reqCtls); |
544 ber.endSeq(); |
545 ber.endSeq(); |
545 |
546 |
546 LdapRequest req = conn.writeRequest(ber, curMsgId); |
547 LdapRequest req = |
|
548 conn.writeRequest(ber, curMsgId, false, replyQueueCapacity); |
547 |
549 |
548 res.msgId = curMsgId; |
550 res.msgId = curMsgId; |
549 res.status = LdapClient.LDAP_SUCCESS; //optimistic |
551 res.status = LdapClient.LDAP_SUCCESS; //optimistic |
550 if (waitFirstReply) { |
552 if (waitFirstReply) { |
551 // get first reply |
553 // get first reply |