Interface ContextBuilder

All Known Implementing Classes:
DefaultContextBuilder

public interface ContextBuilder
Contract for building and closing LDAP contexts.
Since:
1.0
Author:
James Kleeh
  • Method Details

    • build

      DirContext build(ContextSettings contextSettings) throws NamingException
      Parameters:
      contextSettings - The settings to use to build the context
      Returns:
      The context
      Throws:
      NamingException - If an error occurs
    • build

      DirContext build(String factory, String server, String user, String password, boolean pooled) throws NamingException
      Parameters:
      factory - The factory class
      server - The ldap server
      user - The user DN to bind
      password - The password to bind
      pooled - If the query should be pooled
      Returns:
      The context
      Throws:
      NamingException - If an error occurs
    • close

      void close(@Nullable @Nullable DirContext context)
      Closes the given context.
      Parameters:
      context - The context to close