Class RootDse
A Directory Server uses the root DSE to provide information about itself using the following set of attributes:
altServer
: alternative Directory ServersnamingContexts
: naming contextssupportedControl
: recognized LDAP controlssupportedExtension
: recognized LDAP extended operationssupportedFeatures
: recognized LDAP featuressupportedLDAPVersion
: LDAP versions supportedsupportedSASLMechanisms
: recognized SASL authentication mechanismssupportedAuthPasswordSchemes
: recognized authentication password schemessubschemaSubentry
: the name of the subschema subentry holding the schema controlling the Root DSEvendorName
: the name of the Directory Server implementervendorVersion
: 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.
-
Method Summary
Modifier and TypeMethodDescriptionReturns an unmodifiable list of URIs referring to alternative Directory Servers that may be contacted when the Directory Server becomes unavailable.getEntry()
Returns the entry which backs this Root DSE instance.Returns a string which represents the full version of the Directory Server implementation.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).Returns a string which represents the DN of the subschema subentry holding the schema controlling the Root DSE.Returns an unmodifiable list of supported authentication password schemes which the Directory Server supports.Returns an unmodifiable list of object identifiers identifying the request controls that the Directory Server supports.Returns an unmodifiable list of object identifiers identifying the extended operations that the Directory Server supports.Returns an unmodifiable list of object identifiers identifying elective features that the Directory Server supports.Returns an unmodifiable list of the versions of LDAP that the Directory Server supports.Returns an unmodifiable list of the SASL mechanisms that the Directory Server recognizes and/or supports.Returns a string which represents the name of the Directory Server implementer.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 io.reactivex.rxjava3.core.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.toString()
static RootDse
Creates a new Root DSE instance backed by the provided entry.
-
Method Details
-
readRootDseAsync
Asynchronously reads the Root DSE from the Directory Server using the provided 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 returnnull
.- Parameters:
connection
- A connection to the Directory Server whose Root DSE is to be read.- Returns:
- A promise representing the result of the operation.
- Throws:
UnsupportedOperationException
- If the connection does not support search operations.IllegalStateException
- If the connection has already been closed, i.e. ifisClosed() == true
.NullPointerException
- If theconnection
wasnull
.
-
readRootDse
Reads the Root DSE from the Directory Server using the provided connection.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 returnnull
.- Parameters:
connection
- A connection to the Directory Server whose Root DSE is to be read.- Returns:
- The Directory Server's Root DSE.
- Throws:
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. ifisClosed() == true
.NullPointerException
- If theconnection
wasnull
.
-
readRootDse
Reads the Root DSE from the Directory Server using the provided 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.- Parameters:
socket
- A socket connected to the Directory Server whose Root DSE is to be read.- Returns:
- The Directory Server's Root DSE.
- Throws:
UnsupportedOperationException
- If the connection does not support search operations.IllegalStateException
- If the socket has already been closed, i.e. ifisClosed() == true
.NullPointerException
- If thesocket
wasnull
.
-
valueOf
Creates a new Root DSE instance backed by the provided entry. Modifications made toentry
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 aUnsupportedOperationException
.- Parameters:
entry
- The Root DSE entry.- Returns:
- A Root DSE instance backed by the provided entry.
- Throws:
NullPointerException
- Ifentry
wasnull
.
-
getAlternativeServers
Returns an unmodifiable list of URIs referring to alternative Directory Servers that may be contacted when the Directory Server becomes unavailable.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.
- Returns:
- An unmodifiable list of URIs referring to alternative Directory Servers, which may be empty.
- See Also:
-
getEntry
Returns the entry which backs this Root DSE instance. Modifications made to the returned entry will be reflected in this Root DSE.- Returns:
- The underlying Root DSE entry.
-
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).If the Directory Server does not master or shadow any naming contexts, the returned list will be empty.
- Returns:
- An unmodifiable list of DNs identifying the context prefixes of the naming contexts, which may be empty.
-
getSubschemaSubentry
Returns a string which represents the DN of the subschema subentry holding the schema controlling the Root DSE.Clients SHOULD NOT assume that this subschema (sub)entry controls other entries held by the Directory Server.
- Returns:
- The DN of the subschema subentry holding the schema controlling
the Root DSE, or
null
if the DN is not provided.
-
getSupportedAuthenticationPasswordSchemes
Returns an unmodifiable list of supported authentication password schemes which the Directory Server supports.If the Directory Server does not support any authentication password schemes, the returned list will be empty.
- Returns:
- An unmodifiable list of supported authentication password schemes, which may be empty.
- See Also:
-
getSupportedControls
Returns an unmodifiable list of object identifiers identifying the request controls that the Directory Server supports.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.
- Returns:
- An unmodifiable list of object identifiers identifying the request controls, which may be empty.
-
getSupportedExtendedOperations
Returns an unmodifiable list of object identifiers identifying the extended operations that the Directory Server supports.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.
- Returns:
- An unmodifiable list of object identifiers identifying the extended operations, which may be empty.
-
getSupportedFeatures
Returns an unmodifiable list of object identifiers identifying elective features that the Directory Server supports.If the server does not support any discoverable elective features, the returned list will be empty.
- Returns:
- An unmodifiable list of object identifiers identifying the elective features, which may be empty.
-
getSupportedLdapVersions
Returns an unmodifiable list of the versions of LDAP that the Directory Server supports.- Returns:
- An unmodifiable list of the versions.
-
getSupportedSaslMechanisms
Returns an unmodifiable list of the SASL mechanisms that the Directory Server recognizes and/or supports.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.
- Returns:
- An unmodifiable list of the SASL mechanisms, which may be empty.
- See Also:
-
getVendorName
Returns a string which represents the name of the Directory Server implementer.- Returns:
- The name of the Directory Server implementer, or
null
if the vendor name is not provided. - See Also:
-
getVendorVersion
Returns a string which represents the version of the Directory Server implementation.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.
- Returns:
- The version of the Directory Server implementation, or
null
if the vendor version is not provided. - See Also:
-
getFullVendorVersion
Returns a string which represents the full version of the Directory Server implementation.- Returns:
- The full version of the Directory Server implementation, or
null
if the vendor version is not provided.
-
toString
-