Interface ContextBuilder
-
- All Known Implementing Classes:
DefaultContextBuilder
public interface ContextBuilderContract for building and closing LDAP contexts.- Since:
- 1.0
- Author:
- James Kleeh
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description javax.naming.directory.DirContextbuild(ContextSettings contextSettings)javax.naming.directory.DirContextbuild(java.lang.String factory, java.lang.String server, java.lang.String user, java.lang.String password, boolean pooled)voidclose(javax.naming.directory.DirContext context)Closes the given context.
-
-
-
Method Detail
-
build
javax.naming.directory.DirContext build(ContextSettings contextSettings) throws javax.naming.NamingException
- Parameters:
contextSettings- The settings to use to build the context- Returns:
- The context
- Throws:
javax.naming.NamingException- If an error occurs
-
build
javax.naming.directory.DirContext build(java.lang.String factory, java.lang.String server, java.lang.String user, java.lang.String password, boolean pooled) throws javax.naming.NamingException- Parameters:
factory- The factory classserver- The ldap serveruser- The user DN to bindpassword- The password to bindpooled- If the query should be pooled- Returns:
- The context
- Throws:
javax.naming.NamingException- If an error occurs
-
close
void close(@Nullable javax.naming.directory.DirContext context)Closes the given context.- Parameters:
context- The context to close
-
-