@Singleton public class DefaultContextBuilder extends java.lang.Object implements ContextBuilder
ContextBuilder
.Constructor and Description |
---|
DefaultContextBuilder() |
Modifier and Type | Method and Description |
---|---|
javax.naming.directory.DirContext |
build(ContextSettings contextSettings) |
javax.naming.directory.DirContext |
build(java.lang.String factory,
java.lang.String server,
java.lang.String user,
java.lang.String password,
boolean pooled) |
void |
close(javax.naming.directory.DirContext context)
Closes the given context.
|
public javax.naming.directory.DirContext build(ContextSettings contextSettings) throws javax.naming.NamingException
build
in interface ContextBuilder
contextSettings
- The settings to use to build the contextjavax.naming.NamingException
- If an error occurspublic 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
build
in interface ContextBuilder
factory
- The factory classserver
- The ldap serveruser
- The user DN to bindpassword
- The password to bindpooled
- If the query should be pooledjavax.naming.NamingException
- If an error occurspublic void close(javax.naming.directory.DirContext context)
ContextBuilder
close
in interface ContextBuilder
context
- The context to close