Home

LdapCtx

LdapCtx is a concrete implementation of the LDAP context used by the Java Naming and Directory Interface (JNDI) LDAP provider. It implements the LDAP-specific interface LdapContext and represents an active connection to an LDAP directory, enabling applications to perform LDAP protocol operations through JNDI.

The class provides access to standard LDAP operations such as searching, reading attributes, adding, deleting, and

LdapCtx is typically used via the JNDI API. Applications obtain a context through an InitialContext with appropriate

In practice, LdapCtx is part of the core JNDI LDAP provider included with the Java platform. It

See also: LdapContext, JNDI, LDAPv3, StartTLS, javax.naming.ldap package.

modifying
entries,
as
well
as
more
advanced
capabilities
like
renaming
entries
and
performing
attribute
comparisons.
It
also
supports
LDAP-specific
features
such
as
directory
controls
and
extended
operations,
and
can
handle
referrals
when
a
bound
context
points
to
another
directory
server.
environment
properties
(for
example,
provider
URL,
security
credentials,
and
authentication
mode).
If
LDAP-specific
features
are
required,
a
developer
can
cast
the
obtained
DirContext
to
LdapContext
to
access
LDAP-only
methods
and
controls,
or
to
perform
extended
operations
or
StartTLS,
depending
on
the
provider’s
support.
is
considered
an
internal,
vendor-specific
implementation
detail
of
the
JNDI
API,
while
LdapContext
remains
the
public,
provider-agnostic
interface
exposed
to
applications.
Developers
interact
with
the
public
API
for
portability,
and
only
rely
on
LdapCtx
when
they
need
access
to
LDAP-specific
features
offered
by
the
underlying
provider.