Class DefaultContextBuilder
- java.lang.Object
-
- io.micronaut.configuration.security.ldap.context.DefaultContextBuilder
-
- All Implemented Interfaces:
ContextBuilder
@Singleton public class DefaultContextBuilder extends java.lang.Object implements ContextBuilder
Default implementation ofContextBuilder
.- Since:
- 1.0
- Author:
- James Kleeh
-
-
Constructor Summary
Constructors Constructor Description DefaultContextBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Method Detail
-
build
public javax.naming.directory.DirContext build(ContextSettings contextSettings) throws javax.naming.NamingException
- Specified by:
build
in interfaceContextBuilder
- Parameters:
contextSettings
- The settings to use to build the context- Returns:
- The context
- Throws:
javax.naming.NamingException
- If an error occurs
-
build
public 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
- Specified by:
build
in interfaceContextBuilder
- 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
public void close(javax.naming.directory.DirContext context)
Description copied from interface:ContextBuilder
Closes the given context.- Specified by:
close
in interfaceContextBuilder
- Parameters:
context
- The context to close
-
-