public final class RootDse extends Object
A Directory Server uses the root DSE to provide information about itself using the following set of attributes:
altServer
: alternative Directory Servers
namingContexts
: naming contexts
supportedControl
: recognized LDAP controls
supportedExtension
: recognized LDAP extended operations
supportedFeatures
: recognized LDAP features
supportedLDAPVersion
: LDAP versions supported
supportedSASLMechanisms
: recognized SASL authentication
mechanisms
supportedAuthPasswordSchemes
: recognized authentication password
schemes
subschemaSubentry
: the name of the subschema subentry holding the
schema controlling the Root DSE
vendorName
: the name of the Directory Server implementer
vendorVersion
: the version of the Directory Server
implementation.
The root DSE may also include a subschemaSubentry
attribute. If it
does, the attribute refers to the subschema (sub)entry holding the schema
controlling the root DSE. Clients SHOULD NOT assume that this subschema
(sub)entry controls other entries held by the server.
Modifier and Type | Method and Description |
---|---|
Collection<String> |
getAlternativeServers()
Returns an unmodifiable list of URIs referring to alternative Directory
Servers that may be contacted when the Directory Server becomes
unavailable.
|
Entry |
getEntry()
Returns the entry which backs this Root DSE instance.
|
String |
getFullVendorVersion()
Returns a string which represents the full version of the Directory Server
implementation.
|
Collection<Dn> |
getNamingContexts()
Returns an unmodifiable list of DNs identifying the context prefixes of
the naming contexts that the Directory Server masters or shadows (in part
or in whole).
|
Dn |
getSubschemaSubentry()
Returns a string which represents the DN of the subschema subentry
holding the schema controlling the Root DSE.
|
Collection<String> |
getSupportedAuthenticationPasswordSchemes()
Returns an unmodifiable list of supported authentication password schemes
which the Directory Server supports.
|
Collection<String> |
getSupportedControls()
Returns an unmodifiable list of object identifiers identifying the
request controls that the Directory Server supports.
|
Collection<String> |
getSupportedExtendedOperations()
Returns an unmodifiable list of object identifiers identifying the
extended operations that the Directory Server supports.
|
Collection<String> |
getSupportedFeatures()
Returns an unmodifiable list of object identifiers identifying elective
features that the Directory Server supports.
|
Collection<Integer> |
getSupportedLdapVersions()
Returns an unmodifiable list of the versions of LDAP that the Directory
Server supports.
|
Collection<String> |
getSupportedSaslMechanisms()
Returns an unmodifiable list of the SASL mechanisms that the Directory
Server recognizes and/or supports.
|
String |
getVendorName()
Returns a string which represents the name of the Directory Server
implementer.
|
String |
getVendorVersion()
Returns a string which represents the version of the Directory Server
implementation.
|
static RootDse |
readRootDse(Connection connection)
Reads the Root DSE from the Directory Server using the provided
connection.
|
static Single<RootDse> |
readRootDse(LdapClientSocket socket)
Reads the Root DSE from the Directory Server using the provided socket.
|
static LdapPromise<RootDse> |
readRootDseAsync(Connection connection)
Asynchronously reads the Root DSE from the Directory Server using the
provided connection.
|
String |
toString() |
static RootDse |
valueOf(Entry entry)
Creates a new Root DSE instance backed by the provided entry.
|
public static LdapPromise<RootDse> readRootDseAsync(Connection connection)
If the Root DSE is not returned by the Directory Server then the request
will fail with an EntryNotFoundException
. More specifically, the
returned promise will never return null
.
connection
- A connection to the Directory Server whose Root DSE is to be
read.UnsupportedOperationException
- If the connection does not support search operations.IllegalStateException
- If the connection has already been closed, i.e. if
isClosed() == true
.NullPointerException
- If the connection
was null
.public static RootDse readRootDse(Connection connection) throws LdapException
If the Root DSE is not returned by the Directory Server then the request
will fail with an EntryNotFoundException
. More specifically, this
method will never return null
.
connection
- A connection to the Directory Server whose Root DSE is to be
read.LdapException
- If the result code indicates that the request failed for some
reason.UnsupportedOperationException
- If the connection does not support search operations.IllegalStateException
- If the connection has already been closed, i.e. if
isClosed() == true
.NullPointerException
- If the connection
was null
.public static Single<RootDse> readRootDse(LdapClientSocket socket)
If the Root DSE is not returned by the Directory Server then the request
will fail with an EntryNotFoundException
.
Note that the request will only be sent when the returned Single
has been subscribed.
socket
- A socket connected to the Directory Server whose Root DSE is to be read.LdapException
- If the result code indicates that the request failed for some reason.UnsupportedOperationException
- If the connection does not support search operations.IllegalStateException
- If the socket has already been closed, i.e. if isClosed() == true
.NullPointerException
- If the socket
was null
.public static RootDse valueOf(Entry entry)
entry
will be reflected in the returned
Root DSE. The returned Root DSE instance is unmodifiable and attempts to
use modify any of the returned collections will result in a
UnsupportedOperationException
.entry
- The Root DSE entry.NullPointerException
- If entry
was null
.public Collection<String> getAlternativeServers()
URIs for Directory Servers implementing the LDAP protocol are written according to RFC 4516. Other kinds of URIs may be provided.
If the Directory Server does not know of any other Directory Servers that could be used, the returned list will be empty.
public Entry getEntry()
public Collection<Dn> getNamingContexts()
If the Directory Server does not master or shadow any naming contexts, the returned list will be empty.
public Dn getSubschemaSubentry()
Clients SHOULD NOT assume that this subschema (sub)entry controls other entries held by the Directory Server.
null
if the DN is not provided.public Collection<String> getSupportedAuthenticationPasswordSchemes()
If the Directory Server does not support any authentication password schemes, the returned list will be empty.
public Collection<String> getSupportedControls()
If the Directory Server does not support any request controls, the returned list will be empty. Object identifiers identifying response controls may not be listed.
public Collection<String> getSupportedExtendedOperations()
If the Directory Server does not support any extended operations, the returned list will be empty.
An extended operation generally consists of an extended request and an extended response but may also include other protocol data units (such as intermediate responses). The object identifier assigned to the extended request is used to identify the extended operation. Other object identifiers used in the extended operation may not be listed as values of this attribute.
public Collection<String> getSupportedFeatures()
If the server does not support any discoverable elective features, the returned list will be empty.
public Collection<Integer> getSupportedLdapVersions()
public Collection<String> getSupportedSaslMechanisms()
The contents of the returned list may depend on the current session state and may be empty if the Directory Server does not support any SASL mechanisms.
public String getVendorName()
null
if
the vendor name is not provided.public String getVendorVersion()
Note that this value is typically a release value comprised of a string and/or a string of numbers used by the developer of the LDAP server product. The returned string will be unique between two versions of the Directory Server, but there are no other syntactic restrictions on the value or the way it is formatted.
null
if the vendor version is not provided.public String getFullVendorVersion()
null
if the vendor version is not provided.Copyright 2010-2022 ForgeRock AS.