1 /* |
1 /* |
2 * Copyright (c) 1999, 2010, 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 |
378 synchronized int getMsgId() { |
378 synchronized int getMsgId() { |
379 return ++outMsgId; |
379 return ++outMsgId; |
380 } |
380 } |
381 |
381 |
382 LdapRequest writeRequest(BerEncoder ber, int msgId) throws IOException { |
382 LdapRequest writeRequest(BerEncoder ber, int msgId) throws IOException { |
383 return writeRequest(ber, msgId, false /* pauseAfterReceipt */); |
383 return writeRequest(ber, msgId, false /* pauseAfterReceipt */, -1); |
384 } |
384 } |
385 |
385 |
386 LdapRequest writeRequest(BerEncoder ber, int msgId, boolean pauseAfterReceipt) |
386 LdapRequest writeRequest(BerEncoder ber, int msgId, |
387 throws IOException { |
387 boolean pauseAfterReceipt) throws IOException { |
388 |
388 return writeRequest(ber, msgId, pauseAfterReceipt, -1); |
389 LdapRequest req = new LdapRequest(msgId, pauseAfterReceipt); |
389 } |
|
390 |
|
391 LdapRequest writeRequest(BerEncoder ber, int msgId, |
|
392 boolean pauseAfterReceipt, int replyQueueCapacity) throws IOException { |
|
393 |
|
394 LdapRequest req = |
|
395 new LdapRequest(msgId, pauseAfterReceipt, replyQueueCapacity); |
390 addRequest(req); |
396 addRequest(req); |
391 |
397 |
392 if (traceFile != null) { |
398 if (traceFile != null) { |
393 Ber.dumpBER(traceFile, traceTagOut, ber.getBuf(), 0, ber.getDataLen()); |
399 Ber.dumpBER(traceFile, traceTagOut, ber.getBuf(), 0, ber.getDataLen()); |
394 } |
400 } |