public interface EmbeddedLdapRule extends TestRule
| Modifier and Type | Method and Description |
|---|---|
Context |
context()
For tests depending on the standard Java JNDI API
|
DirContext |
dirContext()
Like
context(), but returns a DirContext |
int |
embeddedServerPort()
Gives access to the listening port for the currently running embedded LDAP server.
|
LDAPInterface |
ldapConnection()
For tests depending on the UnboundID LDAP SDK.
|
LDAPConnection |
unsharedLdapConnection()
For tests depending on the UnboundID LDAP SDK that needs access to an ${link LDAPConnection} object
rather than the interface.
|
LDAPInterface ldapConnection() throws LDAPException
LDAPException - if a connection can not be openedLDAPConnection unsharedLdapConnection() throws LDAPException
LDAPException - if an exception occurred while establishing the connectionContext context() throws NamingException
NamingException - if context can not be createdDirContext dirContext() throws NamingException
context(), but returns a DirContextNamingException - if a LDAP failure happens during DirContext creationint embeddedServerPort()
Note: the embedded LDAP server is by default configured to listen only on the loopback address (i.e localhost/127.0.0.1) unless another address has been provided to the builder when the rule was built
EmbeddedLdapRuleBuilder.bindingToAddress(String)Copyright © 2015–2022 Sondre Eikanger Kvalø. All rights reserved..