0
# Data Types and Manipulation
1
2
Core LDAP data types for representing directory entries, attributes, distinguished names, and related manipulation utilities.
3
4
## Capabilities
5
6
### Entry Representation
7
8
#### Entry
9
10
Core class representing an LDAP directory entry.
11
12
```java { .api }
13
/**
14
* Represents an LDAP directory entry with DN and attributes
15
*/
16
public class Entry implements Serializable {
17
// Constructors
18
public Entry(String dn);
19
public Entry(String dn, Attribute... attributes);
20
public Entry(String dn, Collection<Attribute> attributes);
21
public Entry(DN dn);
22
public Entry(DN dn, Attribute... attributes);
23
public Entry(DN dn, Collection<Attribute> attributes);
24
25
// DN access
26
public String getDN();
27
public DN getParsedDN() throws LDAPException;
28
29
// Attribute access
30
public Attribute getAttribute(String attributeName);
31
public String getAttributeValue(String attributeName);
32
public byte[] getAttributeValueBytes(String attributeName);
33
public String[] getAttributeValues(String attributeName);
34
public byte[][] getAttributeValueByteArrays(String attributeName);
35
public Collection<Attribute> getAttributes();
36
public int getNumAttributes();
37
public boolean hasAttribute(String attributeName);
38
public boolean hasAttributeValue(String attributeName, String attributeValue);
39
40
// Entry modification
41
public void addAttribute(Attribute attribute);
42
public void addAttribute(String attributeName, String attributeValue);
43
public void addAttribute(String attributeName, byte[] attributeValue);
44
public boolean removeAttribute(String attributeName);
45
public boolean removeAttributeValue(String attributeName, String attributeValue);
46
public void setAttribute(Attribute attribute);
47
public void setAttribute(String attributeName, String attributeValue);
48
49
// Utility methods
50
public Entry duplicate();
51
public String toLDIFString();
52
public String toLDIFString(int wrapColumn);
53
}
54
```
55
56
### Attribute Handling
57
58
#### Attribute
59
60
Class representing an LDAP attribute with one or more values.
61
62
```java { .api }
63
/**
64
* Represents an LDAP attribute with one or more values
65
*/
66
public class Attribute implements Serializable {
67
// Constructors
68
public Attribute(String name);
69
public Attribute(String name, String value);
70
public Attribute(String name, byte[] value);
71
public Attribute(String name, String... values);
72
public Attribute(String name, byte[]... values);
73
public Attribute(String name, Collection<String> values);
74
75
// Name access
76
public String getName();
77
public String getBaseName();
78
public String[] getOptions();
79
public boolean hasOption(String option);
80
81
// Value access
82
public String getValue();
83
public byte[] getValueByteArray();
84
public String[] getValues();
85
public byte[][] getValueByteArrays();
86
public int size();
87
public boolean hasValue();
88
public boolean hasValue(String value);
89
public boolean hasValue(byte[] value);
90
91
// Value manipulation
92
public Attribute addValue(String value);
93
public Attribute addValue(byte[] value);
94
public Attribute removeValue(String value);
95
public Attribute removeValue(byte[] value);
96
97
// Utility methods
98
public Attribute duplicate();
99
public String toString();
100
public int hashCode();
101
public boolean equals(Object obj);
102
}
103
```
104
105
### Distinguished Name Processing
106
107
#### DN (Distinguished Name)
108
109
Class for parsing, manipulating, and validating LDAP distinguished names.
110
111
```java { .api }
112
/**
113
* Represents and manipulates LDAP distinguished names
114
*/
115
public class DN implements Comparable<DN>, Serializable {
116
// Constructors
117
public DN(String dnString) throws LDAPException;
118
public DN(RDN... rdns);
119
public DN(List<RDN> rdns);
120
121
// DN structure access
122
public RDN[] getRDNs();
123
public RDN getRDN();
124
public RDN getRDN(int index);
125
public int getRDNCount();
126
public DN getParent();
127
public DN getParent(int count);
128
129
// DN relationships
130
public boolean isAncestorOf(DN dn, boolean strict);
131
public boolean isDescendantOf(DN dn, boolean strict);
132
public boolean isWithinSubtree(DN baseDN, boolean strict);
133
134
// DN manipulation
135
public DN child(RDN rdn);
136
public DN child(String rdnString) throws LDAPException;
137
public DN parent();
138
public DN parent(int count);
139
140
// String representations
141
public String toString();
142
public String toNormalizedString();
143
public String toMinimallyEncodedString();
144
145
// Validation and normalization
146
public static boolean isValidDN(String dnString);
147
public static DN normalize(DN dn);
148
public byte[] getNormalizedByteArray();
149
150
// Comparison
151
public int compareTo(DN dn);
152
public boolean equals(Object obj);
153
public boolean equals(DN dn);
154
public int hashCode();
155
}
156
```
157
158
#### RDN (Relative Distinguished Name)
159
160
Class representing individual components of a distinguished name.
161
162
```java { .api }
163
/**
164
* Represents a relative distinguished name (single DN component)
165
*/
166
public class RDN implements Comparable<RDN>, Serializable {
167
// Constructors
168
public RDN(String rdnString) throws LDAPException;
169
public RDN(String attributeName, String attributeValue);
170
public RDN(String attributeName, byte[] attributeValue);
171
public RDN(String[] attributeNames, String[] attributeValues);
172
public RDN(String[] attributeNames, byte[][] attributeValues);
173
174
// Component access
175
public String[] getAttributeNames();
176
public String[] getAttributeValues();
177
public byte[][] getAttributeValueBytes();
178
public int getValueCount();
179
public boolean hasAttribute(String attributeName);
180
public String getAttributeValue(String attributeName);
181
public byte[] getAttributeValueBytes(String attributeName);
182
183
// String representations
184
public String toString();
185
public String toNormalizedString();
186
public String toMinimallyEncodedString();
187
188
// Validation and normalization
189
public static boolean isValidRDN(String rdnString);
190
public byte[] getNormalizedByteArray();
191
192
// Comparison
193
public int compareTo(RDN rdn);
194
public boolean equals(Object obj);
195
public int hashCode();
196
}
197
```
198
199
### Filter Construction
200
201
#### Filter
202
203
Class for constructing and parsing LDAP search filters.
204
205
```java { .api }
206
/**
207
* Represents and constructs LDAP search filters
208
*/
209
public class Filter implements Serializable {
210
// Filter creation from string
211
public static Filter create(String filterString) throws LDAPException;
212
213
// Basic filter types
214
public static Filter createEqualityFilter(String attributeName, String assertionValue);
215
public static Filter createEqualityFilter(String attributeName, byte[] assertionValue);
216
public static Filter createSubstringFilter(String attributeName, String subInitial, String[] subAny, String subFinal);
217
public static Filter createSubInitialFilter(String attributeName, String subInitial);
218
public static Filter createSubAnyFilter(String attributeName, String... subAnyValues);
219
public static Filter createSubFinalFilter(String attributeName, String subFinal);
220
public static Filter createGreaterOrEqualFilter(String attributeName, String assertionValue);
221
public static Filter createLessOrEqualFilter(String attributeName, String assertionValue);
222
public static Filter createPresenceFilter(String attributeName);
223
public static Filter createApproximateMatchFilter(String attributeName, String assertionValue);
224
225
// Logical combinations
226
public static Filter createANDFilter(Filter... filters);
227
public static Filter createANDFilter(Collection<Filter> filters);
228
public static Filter createORFilter(Filter... filters);
229
public static Filter createORFilter(Collection<Filter> filters);
230
public static Filter createNOTFilter(Filter filter);
231
232
// Extensible match filters
233
public static Filter createExtensibleMatchFilter(String attributeName, String matchingRuleID, boolean dnAttributes, String assertionValue);
234
public static Filter createExtensibleMatchFilter(String attributeName, String matchingRuleID, boolean dnAttributes, byte[] assertionValue);
235
236
// Filter properties
237
public FilterType getFilterType();
238
public String getAttributeName();
239
public String getAssertionValue();
240
public byte[] getAssertionValueBytes();
241
public Filter[] getComponents();
242
public Filter getNOTComponent();
243
244
// String representation
245
public String toString();
246
public String toNormalizedString();
247
248
// Validation
249
public static boolean isValidFilter(String filterString);
250
251
// Comparison
252
public boolean equals(Object obj);
253
public int hashCode();
254
}
255
256
/**
257
* Enumeration of filter types
258
*/
259
public enum FilterType {
260
AND((byte) 0xA0),
261
OR((byte) 0xA1),
262
NOT((byte) 0xA2),
263
EQUALITY((byte) 0xA3),
264
SUBSTRING((byte) 0xA4),
265
GREATER_OR_EQUAL((byte) 0xA5),
266
LESS_OR_EQUAL((byte) 0xA6),
267
PRESENT((byte) 0x87),
268
APPROXIMATE_MATCH((byte) 0xA8),
269
EXTENSIBLE_MATCH((byte) 0xA9);
270
}
271
```
272
273
### Modification Framework
274
275
#### Modification
276
277
Class representing modifications to LDAP entries.
278
279
```java { .api }
280
/**
281
* Represents a modification to be applied to an LDAP entry
282
*/
283
public class Modification implements Serializable {
284
// Constructors
285
public Modification(ModificationType modificationType, String attributeName);
286
public Modification(ModificationType modificationType, String attributeName, String attributeValue);
287
public Modification(ModificationType modificationType, String attributeName, byte[] attributeValue);
288
public Modification(ModificationType modificationType, String attributeName, String... attributeValues);
289
public Modification(ModificationType modificationType, String attributeName, byte[]... attributeValues);
290
public Modification(ModificationType modificationType, Attribute attribute);
291
292
// Access methods
293
public ModificationType getModificationType();
294
public String getAttributeName();
295
public String[] getValues();
296
public byte[][] getValueByteArrays();
297
public Attribute getAttribute();
298
299
// Utility methods
300
public String toString();
301
public boolean equals(Object obj);
302
public int hashCode();
303
}
304
305
/**
306
* Types of modifications that can be applied to entries
307
*/
308
public enum ModificationType {
309
ADD(0),
310
DELETE(1),
311
REPLACE(2),
312
INCREMENT(3);
313
314
public int intValue();
315
public static ModificationType valueOf(int intValue);
316
}
317
```
318
319
### Utility Classes
320
321
#### Control
322
323
Base class for LDAP controls.
324
325
```java { .api }
326
/**
327
* Base class for LDAP controls
328
*/
329
public class Control implements Serializable {
330
// Constructors
331
public Control(String oid);
332
public Control(String oid, boolean isCritical);
333
public Control(String oid, boolean isCritical, ASN1OctetString value);
334
335
// Access methods
336
public String getOID();
337
public boolean isCritical();
338
public ASN1OctetString getValue();
339
340
// Utility methods
341
public String toString();
342
public boolean equals(Object obj);
343
public int hashCode();
344
}
345
```
346
347
#### ASN.1 Support
348
349
Basic ASN.1 BER encoding support for LDAP protocol elements.
350
351
```java { .api }
352
/**
353
* Base class for ASN.1 BER elements
354
*/
355
public class ASN1Element implements Serializable {
356
public byte getType();
357
public int getValueLength();
358
public byte[] getValue();
359
public byte[] encode();
360
361
public static ASN1Element decode(byte[] elementBytes) throws ASN1Exception;
362
public static ASN1Element decode(InputStream inputStream) throws ASN1Exception;
363
}
364
365
/**
366
* ASN.1 BER octet string element
367
*/
368
public class ASN1OctetString extends ASN1Element {
369
public ASN1OctetString(String stringValue);
370
public ASN1OctetString(byte[] value);
371
372
public String stringValue();
373
public byte[] getValue();
374
}
375
376
/**
377
* ASN.1 BER sequence element
378
*/
379
public class ASN1Sequence extends ASN1Element {
380
public ASN1Sequence(ASN1Element... elements);
381
public ASN1Sequence(List<ASN1Element> elements);
382
383
public ASN1Element[] getElements();
384
public int size();
385
}
386
```
387
388
## Usage Examples
389
390
### Working with Entries
391
392
```java
393
import com.unboundid.ldap.sdk.*;
394
395
// Create a new entry
396
Entry entry = new Entry(
397
"cn=John Doe,ou=people,dc=example,dc=com",
398
new Attribute("objectClass", "inetOrgPerson"),
399
new Attribute("cn", "John Doe"),
400
new Attribute("sn", "Doe"),
401
new Attribute("givenName", "John"),
402
new Attribute("mail", "john.doe@example.com"),
403
new Attribute("telephoneNumber", "+1-555-0123", "+1-555-0124")
404
);
405
406
// Access entry properties
407
System.out.println("DN: " + entry.getDN());
408
System.out.println("CN: " + entry.getAttributeValue("cn"));
409
System.out.println("Mail: " + entry.getAttributeValue("mail"));
410
411
// Check for attributes
412
if (entry.hasAttribute("telephoneNumber")) {
413
String[] phones = entry.getAttributeValues("telephoneNumber");
414
System.out.println("Phone numbers: " + Arrays.toString(phones));
415
}
416
417
// Modify entry
418
entry.addAttribute("description", "Software Engineer");
419
entry.setAttribute("mail", "j.doe@example.com"); // Replace existing value
420
entry.removeAttributeValue("telephoneNumber", "+1-555-0124");
421
422
// Convert to LDIF
423
System.out.println(entry.toLDIFString());
424
```
425
426
### Working with Distinguished Names
427
428
```java
429
import com.unboundid.ldap.sdk.*;
430
431
try {
432
// Parse DN
433
DN userDN = new DN("cn=John Doe,ou=people,dc=example,dc=com");
434
435
// Access DN components
436
System.out.println("Full DN: " + userDN.toString());
437
System.out.println("RDN: " + userDN.getRDN().toString());
438
System.out.println("Parent: " + userDN.getParent().toString());
439
440
// Work with RDNs
441
RDN[] rdns = userDN.getRDNs();
442
for (RDN rdn : rdns) {
443
System.out.println("RDN: " + rdn.toString());
444
String[] attrNames = rdn.getAttributeNames();
445
for (String name : attrNames) {
446
System.out.println(" " + name + "=" + rdn.getAttributeValue(name));
447
}
448
}
449
450
// DN relationships
451
DN baseDN = new DN("dc=example,dc=com");
452
DN peopleDN = new DN("ou=people,dc=example,dc=com");
453
454
System.out.println("User is descendant of base: " + userDN.isDescendantOf(baseDN, false));
455
System.out.println("People is ancestor of user: " + peopleDN.isAncestorOf(userDN, false));
456
457
// Construct new DNs
458
DN newUserDN = peopleDN.child("cn=Jane Smith");
459
System.out.println("New user DN: " + newUserDN.toString());
460
461
} catch (LDAPException e) {
462
System.err.println("Invalid DN: " + e.getMessage());
463
}
464
```
465
466
### Working with Filters
467
468
```java
469
import com.unboundid.ldap.sdk.*;
470
471
// Simple filters
472
Filter equalityFilter = Filter.createEqualityFilter("cn", "John Doe");
473
Filter presenceFilter = Filter.createPresenceFilter("mail");
474
Filter substringFilter = Filter.createSubstringFilter("cn", "John", null, null);
475
476
// Complex filters with logical operators
477
Filter userFilter = Filter.createANDFilter(
478
Filter.createEqualityFilter("objectClass", "inetOrgPerson"),
479
Filter.createPresenceFilter("mail"),
480
Filter.createORFilter(
481
Filter.createSubstringFilter("cn", "John", null, null),
482
Filter.createSubstringFilter("cn", "Jane", null, null)
483
)
484
);
485
486
System.out.println("Filter: " + userFilter.toString());
487
// Output: (&(objectClass=inetOrgPerson)(mail=*)(|(cn=John*)(cn=Jane*)))
488
489
// Parse filter from string
490
try {
491
Filter parsedFilter = Filter.create("(&(objectClass=person)(|(cn=John*)(mail=*@example.com)))");
492
System.out.println("Parsed filter type: " + parsedFilter.getFilterType());
493
494
// Access filter components
495
if (parsedFilter.getFilterType() == FilterType.AND) {
496
Filter[] components = parsedFilter.getComponents();
497
for (Filter component : components) {
498
System.out.println("Component: " + component.toString());
499
}
500
}
501
502
} catch (LDAPException e) {
503
System.err.println("Invalid filter: " + e.getMessage());
504
}
505
```
506
507
### Working with Attributes
508
509
```java
510
import com.unboundid.ldap.sdk.*;
511
512
// Create attributes
513
Attribute singleValueAttr = new Attribute("cn", "John Doe");
514
Attribute multiValueAttr = new Attribute("telephoneNumber", "+1-555-0123", "+1-555-0124", "+1-555-0125");
515
Attribute binaryAttr = new Attribute("userCertificate", certificateBytes);
516
517
// Access attribute properties
518
System.out.println("Attribute name: " + singleValueAttr.getName());
519
System.out.println("Single value: " + singleValueAttr.getValue());
520
System.out.println("All values: " + Arrays.toString(multiValueAttr.getValues()));
521
522
// Check for values
523
if (multiValueAttr.hasValue("+1-555-0123")) {
524
System.out.println("Found phone number");
525
}
526
527
// Modify attributes
528
Attribute modifiedAttr = multiValueAttr.addValue("+1-555-0126");
529
modifiedAttr = modifiedAttr.removeValue("+1-555-0125");
530
531
System.out.println("Modified values: " + Arrays.toString(modifiedAttr.getValues()));
532
533
// Work with attribute options
534
Attribute langAttr = new Attribute("description;lang-en", "English description");
535
System.out.println("Base name: " + langAttr.getBaseName()); // "description"
536
System.out.println("Options: " + Arrays.toString(langAttr.getOptions())); // ["lang-en"]
537
```
538
539
### Working with Modifications
540
541
```java
542
import com.unboundid.ldap.sdk.*;
543
544
// Create modifications
545
Modification addMod = new Modification(
546
ModificationType.ADD,
547
"description",
548
"Software Engineer"
549
);
550
551
Modification replaceMod = new Modification(
552
ModificationType.REPLACE,
553
"mail",
554
"j.doe@example.com"
555
);
556
557
Modification deleteMod = new Modification(
558
ModificationType.DELETE,
559
"telephoneNumber",
560
"+1-555-0124"
561
);
562
563
Modification deleteAllMod = new Modification(
564
ModificationType.DELETE,
565
"faxNumber" // Delete all values
566
);
567
568
// Apply modifications to connection
569
LDAPConnection connection = new LDAPConnection("ldap.example.com", 389);
570
try {
571
connection.bind("cn=admin,dc=example,dc=com", "password");
572
573
LDAPResult result = connection.modify(
574
"cn=John Doe,ou=people,dc=example,dc=com",
575
addMod, replaceMod, deleteMod, deleteAllMod
576
);
577
578
if (result.getResultCode() == ResultCode.SUCCESS) {
579
System.out.println("Modifications applied successfully");
580
}
581
582
} finally {
583
connection.close();
584
}
585
```
586
587
### Entry Validation and Manipulation
588
589
```java
590
import com.unboundid.ldap.sdk.*;
591
592
// Create entry with validation
593
try {
594
Entry entry = new Entry("cn=Test User,ou=people,dc=example,dc=com");
595
596
// Add required attributes
597
entry.addAttribute("objectClass", "inetOrgPerson");
598
entry.addAttribute("cn", "Test User");
599
entry.addAttribute("sn", "User");
600
601
// Validate DN parsing
602
DN entryDN = entry.getParsedDN();
603
System.out.println("Valid DN: " + entryDN.toString());
604
605
// Clone entry for modifications
606
Entry modifiedEntry = entry.duplicate();
607
modifiedEntry.addAttribute("mail", "test.user@example.com");
608
609
// Compare entries
610
if (!entry.equals(modifiedEntry)) {
611
System.out.println("Entries are different");
612
}
613
614
// Generate LDIF representation
615
System.out.println("Entry LDIF:");
616
System.out.println(entry.toLDIFString(80)); // Wrap at 80 characters
617
618
} catch (LDAPException e) {
619
System.err.println("Invalid entry: " + e.getMessage());
620
}
621
```
622
623
### LDAP URL Handling
624
625
#### LDAPURL
626
627
LDAP URL parsing and construction utilities.
628
629
```java { .api }
630
/**
631
* LDAP URL representation and manipulation
632
*/
633
public class LDAPURL {
634
// Constructors
635
public LDAPURL(String url) throws LDAPException;
636
public LDAPURL(String scheme, String host, int port, DN baseDN, String[] attributes, SearchScope scope, Filter filter);
637
638
// URL components
639
public String getScheme();
640
public String getHost();
641
public int getPort();
642
public DN getBaseDN();
643
public String[] getAttributes();
644
public SearchScope getScope();
645
public Filter getFilter();
646
647
// URL manipulation
648
public String toString();
649
public static boolean isValidLDAPURL(String url);
650
public static LDAPURL[] parseURLList(String urlList) throws LDAPException;
651
}
652
```
653
654
### Utility Classes
655
656
#### ResultCode
657
658
LDAP result codes and status information.
659
660
```java { .api }
661
/**
662
* LDAP operation result codes
663
*/
664
public class ResultCode {
665
// Standard result codes
666
public static final ResultCode SUCCESS;
667
public static final ResultCode OPERATIONS_ERROR;
668
public static final ResultCode PROTOCOL_ERROR;
669
public static final ResultCode TIME_LIMIT_EXCEEDED;
670
public static final ResultCode SIZE_LIMIT_EXCEEDED;
671
public static final ResultCode COMPARE_FALSE;
672
public static final ResultCode COMPARE_TRUE;
673
public static final ResultCode AUTH_METHOD_NOT_SUPPORTED;
674
public static final ResultCode STRONG_AUTH_REQUIRED;
675
public static final ResultCode REFERRAL;
676
public static final ResultCode ADMIN_LIMIT_EXCEEDED;
677
public static final ResultCode UNAVAILABLE_CRITICAL_EXTENSION;
678
public static final ResultCode CONFIDENTIALITY_REQUIRED;
679
public static final ResultCode SASL_BIND_IN_PROGRESS;
680
public static final ResultCode NO_SUCH_ATTRIBUTE;
681
public static final ResultCode UNDEFINED_ATTRIBUTE_TYPE;
682
public static final ResultCode INAPPROPRIATE_MATCHING;
683
public static final ResultCode CONSTRAINT_VIOLATION;
684
public static final ResultCode ATTRIBUTE_OR_VALUE_EXISTS;
685
public static final ResultCode INVALID_ATTRIBUTE_SYNTAX;
686
public static final ResultCode NO_SUCH_OBJECT;
687
public static final ResultCode ALIAS_PROBLEM;
688
public static final ResultCode INVALID_DN_SYNTAX;
689
public static final ResultCode ALIAS_DEREFERENCING_PROBLEM;
690
public static final ResultCode INAPPROPRIATE_AUTHENTICATION;
691
public static final ResultCode INVALID_CREDENTIALS;
692
public static final ResultCode INSUFFICIENT_ACCESS_RIGHTS;
693
public static final ResultCode BUSY;
694
public static final ResultCode UNAVAILABLE;
695
public static final ResultCode UNWILLING_TO_PERFORM;
696
public static final ResultCode LOOP_DETECT;
697
public static final ResultCode NAMING_VIOLATION;
698
public static final ResultCode OBJECT_CLASS_VIOLATION;
699
public static final ResultCode NOT_ALLOWED_ON_NONLEAF;
700
public static final ResultCode NOT_ALLOWED_ON_RDN;
701
public static final ResultCode ENTRY_ALREADY_EXISTS;
702
public static final ResultCode OBJECT_CLASS_MODS_PROHIBITED;
703
public static final ResultCode AFFECTS_MULTIPLE_DSAS;
704
public static final ResultCode OTHER;
705
706
// Methods
707
public int intValue();
708
public String getName();
709
public String toString();
710
public boolean isConnectionUsable();
711
public static ResultCode valueOf(int intValue);
712
}
713
```
714
715
#### LDAPConnectionStatistics
716
717
Connection usage statistics and monitoring.
718
719
```java { .api }
720
/**
721
* Statistics for LDAP connection usage
722
*/
723
public class LDAPConnectionStatistics {
724
public long getNumConnects();
725
public long getNumDisconnects();
726
public long getNumAbandonRequests();
727
public long getNumAddRequests();
728
public long getNumAddResponses();
729
public long getNumBindRequests();
730
public long getNumBindResponses();
731
public long getNumCompareRequests();
732
public long getNumCompareResponses();
733
public long getNumDeleteRequests();
734
public long getNumDeleteResponses();
735
public long getNumExtendedRequests();
736
public long getNumExtendedResponses();
737
public long getNumModifyRequests();
738
public long getNumModifyResponses();
739
public long getNumModifyDNRequests();
740
public long getNumModifyDNResponses();
741
public long getNumSearchRequests();
742
public long getNumSearchEntryResponses();
743
public long getNumSearchReferenceResponses();
744
public long getNumSearchDoneResponses();
745
public long getNumUnbindRequests();
746
}
747
```
748
749
#### LDAPConnectionPoolStatistics
750
751
Connection pool usage statistics and health monitoring.
752
753
```java { .api }
754
/**
755
* Statistics for LDAP connection pool usage
756
*/
757
public class LDAPConnectionPoolStatistics {
758
public int getNumSuccessfulConnectionAttempts();
759
public int getNumFailedConnectionAttempts();
760
public int getNumConnectionsClosedDefunct();
761
public int getNumConnectionsClosedExpired();
762
public int getNumConnectionsClosedUnneeded();
763
public int getNumSuccessfulCheckouts();
764
public int getNumSuccessfulCheckoutsWithoutWaiting();
765
public int getNumSuccessfulCheckoutsAfterWaiting();
766
public int getNumFailedCheckouts();
767
public int getNumReleasedValid();
768
public long getMaximumWaitTimeMillis();
769
public long getAverageWaitTimeMillis();
770
771
public void reset();
772
public String toString();
773
}
774
```