@Singleton public class DefaultContextBuilder extends Object implements ContextBuilder
ContextBuilder
.Constructor and Description |
---|
DefaultContextBuilder() |
Modifier and Type | Method and Description |
---|---|
DirContext |
build(ContextSettings contextSettings) |
DirContext |
build(String factory,
String server,
String user,
String password,
boolean pooled) |
void |
close(DirContext context)
Closes the given context.
|
public DirContext build(ContextSettings contextSettings) throws NamingException
build
in interface ContextBuilder
contextSettings
- The settings to use to build the contextNamingException
- If an error occurspublic DirContext build(String factory, String server, String user, String password, boolean pooled) throws 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 pooledNamingException
- If an error occurspublic void close(DirContext context)
ContextBuilder
close
in interface ContextBuilder
context
- The context to close