com.unboundid.ldap.listener
Class InMemoryDirectoryServerConfig

java.lang.Object
  extended by com.unboundid.ldap.listener.InMemoryDirectoryServerConfig
Direct Known Subclasses:
ReadOnlyInMemoryDirectoryServerConfig

@NotExtensible
@Mutable
@ThreadSafety(level=NOT_THREADSAFE)
public class InMemoryDirectoryServerConfig
extends java.lang.Object

This class provides a simple data structure with information that may be used to control the behavior of an InMemoryDirectoryServer instance. At least one base DN must be specified. For all other properties, the following default values will be used unless an alternate configuration is provided:


Constructor Summary
InMemoryDirectoryServerConfig(DN... baseDNs)
          Creates a new in-memory directory server config object with the default settings.
InMemoryDirectoryServerConfig(InMemoryDirectoryServerConfig cfg)
          Creates a new in-memory directory server config object that is a duplicate of the provided config and may be altered without impacting the state of the given config object.
InMemoryDirectoryServerConfig(java.lang.String... baseDNs)
          Creates a new in-memory directory server config object with the provided set of base DNs.
 
Method Summary
 void addAdditionalBindCredentials(java.lang.String dn, byte[] password)
          Adds an additional bind DN and password combination that can be used to bind to the server, even if the corresponding entry does not exist in the data set.
 void addAdditionalBindCredentials(java.lang.String dn, java.lang.String password)
          Adds an additional bind DN and password combination that can be used to bind to the server, even if the corresponding entry does not exist in the data set.
 void addExtendedOperationHandler(InMemoryExtendedOperationHandler handler)
          Adds the provided extended operation handler for use by the server for processing certain types of extended operations.
 void addInMemoryOperationInterceptor(InMemoryOperationInterceptor interceptor)
          Adds the provided operation interceptor to the list of operation interceptors that may be used to transform requests before they are processed by the in-memory directory server, and/or to transform responses before they are returned to the client.
 void addSASLBindHandler(InMemorySASLBindHandler handler)
          Adds the provided SASL bind handler for use by the server for processing certain types of SASL bind requests.
 boolean enforceAttributeSyntaxCompliance()
          Indicates whether the server should reject attribute values which violate the constraints of the associated syntax.
 boolean enforceSingleStructuralObjectClass()
          Indicates whether the server should reject entries which do not contain exactly one structural object class.
 boolean generateOperationalAttributes()
          Indicates whether the server should automatically generate operational attributes (including entryDN, entryUUID, creatorsName, createTimestamp, modifiersName, modifyTimestamp, and subschemaSubentry) for entries in the server.
 java.util.logging.Handler getAccessLogHandler()
          Retrieves the log handler that should be used to record access log messages about operations processed by the server, if any.
 java.util.Map<DN,byte[]> getAdditionalBindCredentials()
          Retrieves a map containing DNs and passwords of additional users that will be allowed to bind to the server, even if their entries do not exist in the data set.
 java.util.Set<OperationType> getAllowedOperationTypes()
          Retrieves the set of operation types that will be allowed by the server.
 java.util.Set<OperationType> getAuthenticationRequiredOperationTypes()
          Retrieves the set of operation types that will only be allowed for authenticated clients.
 DN[] getBaseDNs()
          Retrieves the set of base DNs that should be used for the directory server.
 java.lang.String getCodeLogPath()
          Retrieves the path to a file to be written with generated code that may be used to construct the requests processed by the server.
 java.util.List<java.lang.String> getEqualityIndexAttributes()
          Retrieves a list containing the names or OIDs of the attribute types for which to maintain an equality index to improve the performance of certain kinds of searches.
 java.util.List<InMemoryExtendedOperationHandler> getExtendedOperationHandlers()
          Retrieves a list of the extended operation handlers that may be used to process extended operations in the server.
 java.util.logging.Handler getLDAPDebugLogHandler()
          Retrieves the log handler that should be used to record detailed messages about LDAP communication to and from the server, which may be useful for debugging purposes.
 java.util.List<InMemoryListenerConfig> getListenerConfigs()
          Retrieves the list of listener configurations that should be used for the directory server.
 LDAPListenerExceptionHandler getListenerExceptionHandler()
          Retrieves the object that should be used to handle any errors encountered while attempting to interact with a client, if defined.
 int getMaxChangeLogEntries()
          Retrieves the maximum number of changelog entries that the server should maintain.
 int getMaxConnections()
          Retrieves the maximum number of concurrent connections that the server will allow.
 int getMaxSizeLimit()
          Retrieves the maximum number of entries that the server should return in any search operation.
 java.util.List<InMemoryOperationInterceptor> getOperationInterceptors()
          Retrieves a list of the operation interceptors that may be used to intercept and transform requests before they are processed by the in-memory directory server, and/or to intercept and transform responses before they are returned to the client.
 java.util.Set<java.lang.String> getReferentialIntegrityAttributes()
          Retrieves the names of the attributes for which referential integrity should be maintained.
 ReadOnlyEntry getRootDSEEntry()
          Retrieves a predefined entry that should always be returned as the in-memory directory server's root DSE, if defined.
 java.util.List<InMemorySASLBindHandler> getSASLBindHandlers()
          Retrieves a list of the SASL bind handlers that may be used to process SASL bind requests in the server.
 Schema getSchema()
          Retrieves the schema that should be used by the server, if defined.
 java.lang.String getVendorName()
          Retrieves the vendor name value to report in the server root DSE.
 java.lang.String getVendorVersion()
          Retrieves the vendor version value to report in the server root DSE.
 boolean includeRequestProcessingInCodeLog()
          Indicates whether the code log should include sample code for processing the generated requests.
 void setAccessLogHandler(java.util.logging.Handler accessLogHandler)
          Specifies the log handler that should be used to record access log messages about operations processed by the server.
 void setAllowedOperationTypes(java.util.Collection<OperationType> operationTypes)
          Specifies the set of operation types that will be allowed by the server.
 void setAllowedOperationTypes(OperationType... operationTypes)
          Specifies the set of operation types that will be allowed by the server.
 void setAuthenticationRequiredOperationTypes(java.util.Collection<OperationType> operationTypes)
          Specifies the set of operation types that will only be allowed for authenticated clients.
 void setAuthenticationRequiredOperationTypes(OperationType... operationTypes)
          Specifies the set of operation types that will only be allowed for authenticated clients.
 void setBaseDNs(DN... baseDNs)
          Specifies the set of base DNs that should be used for the directory server.
 void setBaseDNs(java.lang.String... baseDNs)
          Specifies the set of base DNs that should be used for the directory server.
 void setCodeLogDetails(java.lang.String codeLogPath, boolean includeProcessing)
          Specifies information about code logging that should be performed by the server, if any.
 void setEnforceAttributeSyntaxCompliance(boolean enforceAttributeSyntaxCompliance)
          Specifies whether the server should reject attribute values which violate the constraints of the associated syntax.
 void setEnforceSingleStructuralObjectClass(boolean enforceSingleStructuralObjectClass)
          Specifies whether the server should reject entries which do not contain exactly one structural object class.
 void setEqualityIndexAttributes(java.util.Collection<java.lang.String> equalityIndexAttributes)
          Specifies the names or OIDs of the attribute types for which to maintain an equality index to improve the performance of certain kinds of searches.
 void setEqualityIndexAttributes(java.lang.String... equalityIndexAttributes)
          Specifies the names or OIDs of the attribute types for which to maintain an equality index to improve the performance of certain kinds of searches.
 void setGenerateOperationalAttributes(boolean generateOperationalAttributes)
          Specifies whether the server should automatically generate operational attributes (including entryDN, entryUUID, creatorsName, createTimestamp, modifiersName, modifyTimestamp, and subschemaSubentry) for entries in the server.
 void setLDAPDebugLogHandler(java.util.logging.Handler ldapDebugLogHandler)
          Specifies the log handler that should be used to record detailed messages about LDAP communication to and from the server, which may be useful for debugging purposes.
 void setListenerConfigs(java.util.Collection<InMemoryListenerConfig> listenerConfigs)
          Specifies the configurations for all listeners that should be used for the directory server.
 void setListenerConfigs(InMemoryListenerConfig... listenerConfigs)
          Specifies the configurations for all listeners that should be used for the directory server.
 void setListenerExceptionHandler(LDAPListenerExceptionHandler exceptionHandler)
          Specifies the LDAP listener exception handler that the server should use to handle any errors encountered while attempting to interact with a client.
 void setMaxChangeLogEntries(int maxChangeLogEntries)
          Specifies the maximum number of changelog entries that the server should maintain.
 void setMaxConnections(int maxConnections)
          Specifies the maximum number of concurrent connections that the server will allow.
 void setMaxSizeLimit(int maxSizeLimit)
          Specifies the maximum number of entries that the server should return in any search operation.
 void setReferentialIntegrityAttributes(java.util.Collection<java.lang.String> referentialIntegrityAttributes)
          Specifies the names of the attributes for which referential integrity should be maintained.
 void setReferentialIntegrityAttributes(java.lang.String... referentialIntegrityAttributes)
          Specifies the names of the attributes for which referential integrity should be maintained.
 void setRootDSEEntry(Entry rootDSEEntry)
          Specifies an entry that should always be returned as the in-memory directory server's root DSE.
 void setSchema(Schema schema)
          Specifies the schema that should be used by the server.
 void setVendorName(java.lang.String vendorName)
          Specifies the vendor name value to report in the server root DSE.
 void setVendorVersion(java.lang.String vendorVersion)
          Specifies the vendor version value to report in the server root DSE.
 java.lang.String toString()
          Retrieves a string representation of this in-memory directory server configuration.
 void toString(java.lang.StringBuilder buffer)
          Appends a string representation of this in-memory directory server configuration to the provided buffer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InMemoryDirectoryServerConfig

public InMemoryDirectoryServerConfig(java.lang.String... baseDNs)
                              throws LDAPException
Creates a new in-memory directory server config object with the provided set of base DNs.

Parameters:
baseDNs - The set of base DNs to use for the server. It must not be null or empty.
Throws:
LDAPException - If the provided set of base DN strings is null or empty, or if any of the provided base DN strings cannot be parsed as a valid DN.

InMemoryDirectoryServerConfig

public InMemoryDirectoryServerConfig(DN... baseDNs)
                              throws LDAPException
Creates a new in-memory directory server config object with the default settings.

Parameters:
baseDNs - The set of base DNs to use for the server. It must not be null or empty.
Throws:
LDAPException - If the provided set of base DNs is null or empty.

InMemoryDirectoryServerConfig

public InMemoryDirectoryServerConfig(InMemoryDirectoryServerConfig cfg)
Creates a new in-memory directory server config object that is a duplicate of the provided config and may be altered without impacting the state of the given config object.

Parameters:
cfg - The in-memory directory server config object for to be duplicated.
Method Detail

getBaseDNs

public DN[] getBaseDNs()
Retrieves the set of base DNs that should be used for the directory server.

Returns:
The set of base DNs that should be used for the directory server.

setBaseDNs

public void setBaseDNs(java.lang.String... baseDNs)
                throws LDAPException
Specifies the set of base DNs that should be used for the directory server.

Parameters:
baseDNs - The set of base DNs that should be used for the directory server. It must not be null or empty.
Throws:
LDAPException - If the provided set of base DN strings is null or empty, or if any of the provided base DN strings cannot be parsed as a valid DN.

setBaseDNs

public void setBaseDNs(DN... baseDNs)
                throws LDAPException
Specifies the set of base DNs that should be used for the directory server.

Parameters:
baseDNs - The set of base DNs that should be used for the directory server. It must not be null or empty.
Throws:
LDAPException - If the provided set of base DNs is null or empty.

getListenerConfigs

public java.util.List<InMemoryListenerConfig> getListenerConfigs()
Retrieves the list of listener configurations that should be used for the directory server.

Returns:
The list of listener configurations that should be used for the directory server.

setListenerConfigs

public void setListenerConfigs(InMemoryListenerConfig... listenerConfigs)
                        throws LDAPException
Specifies the configurations for all listeners that should be used for the directory server.

Parameters:
listenerConfigs - The configurations for all listeners that should be used for the directory server. It must not be null or empty, and it must not contain multiple configurations with the same name.
Throws:
LDAPException - If there is a problem with the provided set of listener configurations.

setListenerConfigs

public void setListenerConfigs(java.util.Collection<InMemoryListenerConfig> listenerConfigs)
                        throws LDAPException
Specifies the configurations for all listeners that should be used for the directory server.

Parameters:
listenerConfigs - The configurations for all listeners that should be used for the directory server. It must not be null or empty, and it must not contain multiple configurations with the same name.
Throws:
LDAPException - If there is a problem with the provided set of listener configurations.

getAllowedOperationTypes

public java.util.Set<OperationType> getAllowedOperationTypes()
Retrieves the set of operation types that will be allowed by the server. Note that if the server is configured to support StartTLS, then it will be allowed even if other types of extended operations are not allowed.

Returns:
The set of operation types that will be allowed by the server.

setAllowedOperationTypes

public void setAllowedOperationTypes(OperationType... operationTypes)
Specifies the set of operation types that will be allowed by the server. Note that if the server is configured to support StartTLS, then it will be allowed even if other types of extended operations are not allowed.

Parameters:
operationTypes - The set of operation types that will be allowed by the server.

setAllowedOperationTypes

public void setAllowedOperationTypes(java.util.Collection<OperationType> operationTypes)
Specifies the set of operation types that will be allowed by the server. Note that if the server is configured to support StartTLS, then it will be allowed even if other types of extended operations are not allowed.

Parameters:
operationTypes - The set of operation types that will be allowed by the server.

getAuthenticationRequiredOperationTypes

public java.util.Set<OperationType> getAuthenticationRequiredOperationTypes()
Retrieves the set of operation types that will only be allowed for authenticated clients. Note that authentication will never be required for bind operations, and if the server is configured to support StartTLS, then authentication will never be required for StartTLS operations even if it is required for other types of extended operations.

Returns:
The set of operation types that will only be allowed for authenticated clients.

setAuthenticationRequiredOperationTypes

public void setAuthenticationRequiredOperationTypes(OperationType... operationTypes)
Specifies the set of operation types that will only be allowed for authenticated clients. Note that authentication will never be required for bind operations, and if the server is configured to support StartTLS, then authentication will never be required for StartTLS operations even if it is required for other types of extended operations.

Parameters:
operationTypes - The set of operation types that will be allowed for authenticated clients.

setAuthenticationRequiredOperationTypes

public void setAuthenticationRequiredOperationTypes(java.util.Collection<OperationType> operationTypes)
Specifies the set of operation types that will only be allowed for authenticated clients. Note that authentication will never be required for bind operations, and if the server is configured to support StartTLS, then authentication will never be required for StartTLS operations even if it is required for other types of extended operations.

Parameters:
operationTypes - The set of operation types that will be allowed for authenticated clients.

getAdditionalBindCredentials

public java.util.Map<DN,byte[]> getAdditionalBindCredentials()
Retrieves a map containing DNs and passwords of additional users that will be allowed to bind to the server, even if their entries do not exist in the data set. This can be used to mimic the functionality of special administrative accounts (e.g., "cn=Directory Manager" in many directories). The map that is returned may be altered if desired.

Returns:
A map containing DNs and passwords of additional users that will be allowed to bind to the server, even if their entries do not exist in the data set.

addAdditionalBindCredentials

public void addAdditionalBindCredentials(java.lang.String dn,
                                         java.lang.String password)
                                  throws LDAPException
Adds an additional bind DN and password combination that can be used to bind to the server, even if the corresponding entry does not exist in the data set. This can be used to mimic the functionality of special administrative accounts (e.g., "cn=Directory Manager" in many directories). If a password has already been defined for the given DN, then it will be replaced with the newly-supplied password.

Parameters:
dn - The bind DN to allow. It must not be null or represent the null DN.
password - The password for the provided bind DN. It must not be null or empty.
Throws:
LDAPException - If there is a problem with the provided bind DN or password.

addAdditionalBindCredentials

public void addAdditionalBindCredentials(java.lang.String dn,
                                         byte[] password)
                                  throws LDAPException
Adds an additional bind DN and password combination that can be used to bind to the server, even if the corresponding entry does not exist in the data set. This can be used to mimic the functionality of special administrative accounts (e.g., "cn=Directory Manager" in many directories). If a password has already been defined for the given DN, then it will be replaced with the newly-supplied password.

Parameters:
dn - The bind DN to allow. It must not be null or represent the null DN.
password - The password for the provided bind DN. It must not be null or empty.
Throws:
LDAPException - If there is a problem with the provided bind DN or password.

getListenerExceptionHandler

public LDAPListenerExceptionHandler getListenerExceptionHandler()
Retrieves the object that should be used to handle any errors encountered while attempting to interact with a client, if defined.

Returns:
The object that should be used to handle any errors encountered while attempting to interact with a client, or null if no exception handler should be used.

setListenerExceptionHandler

public void setListenerExceptionHandler(LDAPListenerExceptionHandler exceptionHandler)
Specifies the LDAP listener exception handler that the server should use to handle any errors encountered while attempting to interact with a client.

Parameters:
exceptionHandler - The LDAP listener exception handler that the server should use to handle any errors encountered while attempting to interact with a client. It may be null if no exception handler should be used.

getSchema

public Schema getSchema()
Retrieves the schema that should be used by the server, if defined. If a schema is defined, then it will be used to validate entries and determine which matching rules should be used for various types of matching operations.

Returns:
The schema that should be used by the server, or null if no schema should be used.

setSchema

public void setSchema(Schema schema)
Specifies the schema that should be used by the server. If a schema is defined, then it will be used to validate entries and determine which matching rules should be used for various types of matching operations.

Parameters:
schema - The schema that should be used by the server. It may be null if no schema should be used.

enforceAttributeSyntaxCompliance

public boolean enforceAttributeSyntaxCompliance()
Indicates whether the server should reject attribute values which violate the constraints of the associated syntax. This setting will be ignored if a null schema is in place.

Returns:
true if the server should reject attribute values which violate the constraints of the associated syntax, or false if not.

setEnforceAttributeSyntaxCompliance

public void setEnforceAttributeSyntaxCompliance(boolean enforceAttributeSyntaxCompliance)
Specifies whether the server should reject attribute values which violate the constraints of the associated syntax. This setting will be ignored if a null schema is in place.

Parameters:
enforceAttributeSyntaxCompliance - Indicates whether the server should reject attribute values which violate the constraints of the associated syntax.

enforceSingleStructuralObjectClass

public boolean enforceSingleStructuralObjectClass()
Indicates whether the server should reject entries which do not contain exactly one structural object class. This setting will be ignored if a null schema is in place.

Returns:
true if the server should reject entries which do not contain exactly one structural object class, or false if it should allow entries which do not have any structural class or that have multiple structural classes.

setEnforceSingleStructuralObjectClass

public void setEnforceSingleStructuralObjectClass(boolean enforceSingleStructuralObjectClass)
Specifies whether the server should reject entries which do not contain exactly one structural object class. This setting will be ignored if a null schema is in place.

Parameters:
enforceSingleStructuralObjectClass - Indicates whether the server should reject entries which do not contain exactly one structural object class.

getAccessLogHandler

public java.util.logging.Handler getAccessLogHandler()
Retrieves the log handler that should be used to record access log messages about operations processed by the server, if any.

Returns:
The log handler that should be used to record access log messages about operations processed by the server, or null if no access logging should be performed.

setAccessLogHandler

public void setAccessLogHandler(java.util.logging.Handler accessLogHandler)
Specifies the log handler that should be used to record access log messages about operations processed by the server.

Parameters:
accessLogHandler - The log handler that should be used to record access log messages about operations processed by the server. It may be null if no access logging should be performed.

getLDAPDebugLogHandler

public java.util.logging.Handler getLDAPDebugLogHandler()
Retrieves the log handler that should be used to record detailed messages about LDAP communication to and from the server, which may be useful for debugging purposes.

Returns:
The log handler that should be used to record detailed protocol-level debug messages about LDAP communication to and from the server, or null if no debug logging should be performed.

setLDAPDebugLogHandler

public void setLDAPDebugLogHandler(java.util.logging.Handler ldapDebugLogHandler)
Specifies the log handler that should be used to record detailed messages about LDAP communication to and from the server, which may be useful for debugging purposes.

Parameters:
ldapDebugLogHandler - The log handler that should be used to record detailed messages about LDAP communication to and from the server. It may be null if no LDAP debug logging should be performed.

getCodeLogPath

public java.lang.String getCodeLogPath()
Retrieves the path to a file to be written with generated code that may be used to construct the requests processed by the server.

Returns:
The path to a file to be written with generated code that may be used to construct the requests processed by the server, or null if no code log should be written.

includeRequestProcessingInCodeLog

public boolean includeRequestProcessingInCodeLog()
Indicates whether the code log should include sample code for processing the generated requests. This will only be used if getCodeLogPath() returns a non-null value.

Returns:
false if the code log should only include code that corresponds to requests received from clients, or true if the code log should also include sample code for processing the generated requests and interpreting the results.

setCodeLogDetails

public void setCodeLogDetails(java.lang.String codeLogPath,
                              boolean includeProcessing)
Specifies information about code logging that should be performed by the server, if any.

Parameters:
codeLogPath - The path to the file to which a code log should be written. It may be null if no code log should be written.
includeProcessing - Indicates whether to include sample code that demonstrates how to process the requests and interpret the results. This will only be used if the codeLogPath argument is non-null.

getOperationInterceptors

public java.util.List<InMemoryOperationInterceptor> getOperationInterceptors()
Retrieves a list of the operation interceptors that may be used to intercept and transform requests before they are processed by the in-memory directory server, and/or to intercept and transform responses before they are returned to the client. The contents of the list may be altered by the caller.

Returns:
An updatable list of the operation interceptors that may be used to intercept and transform requests and/or responses.

addInMemoryOperationInterceptor

public void addInMemoryOperationInterceptor(InMemoryOperationInterceptor interceptor)
Adds the provided operation interceptor to the list of operation interceptors that may be used to transform requests before they are processed by the in-memory directory server, and/or to transform responses before they are returned to the client.

Parameters:
interceptor - The operation interceptor that should be invoked in the course of processing requests and responses.

getExtendedOperationHandlers

public java.util.List<InMemoryExtendedOperationHandler> getExtendedOperationHandlers()
Retrieves a list of the extended operation handlers that may be used to process extended operations in the server. The contents of the list may be altered by the caller.

Returns:
An updatable list of the extended operation handlers that may be used to process extended operations in the server.

addExtendedOperationHandler

public void addExtendedOperationHandler(InMemoryExtendedOperationHandler handler)
Adds the provided extended operation handler for use by the server for processing certain types of extended operations.

Parameters:
handler - The extended operation handler that should be used by the server for processing certain types of extended operations.

getSASLBindHandlers

public java.util.List<InMemorySASLBindHandler> getSASLBindHandlers()
Retrieves a list of the SASL bind handlers that may be used to process SASL bind requests in the server. The contents of the list may be altered by the caller.

Returns:
An updatable list of the SASL bind handlers that may be used to process SASL bind requests in the server.

addSASLBindHandler

public void addSASLBindHandler(InMemorySASLBindHandler handler)
Adds the provided SASL bind handler for use by the server for processing certain types of SASL bind requests.

Parameters:
handler - The SASL bind handler that should be used by the server for processing certain types of SASL bind requests.

generateOperationalAttributes

public boolean generateOperationalAttributes()
Indicates whether the server should automatically generate operational attributes (including entryDN, entryUUID, creatorsName, createTimestamp, modifiersName, modifyTimestamp, and subschemaSubentry) for entries in the server.

Returns:
true if the server should automatically generate operational attributes for entries in the server, or false if not.

setGenerateOperationalAttributes

public void setGenerateOperationalAttributes(boolean generateOperationalAttributes)
Specifies whether the server should automatically generate operational attributes (including entryDN, entryUUID, creatorsName, createTimestamp, modifiersName, modifyTimestamp, and subschemaSubentry) for entries in the server.

Parameters:
generateOperationalAttributes - Indicates whether the server should automatically generate operational attributes for entries in the server.

getMaxChangeLogEntries

public int getMaxChangeLogEntries()
Retrieves the maximum number of changelog entries that the server should maintain.

Returns:
The maximum number of changelog entries that the server should maintain, or 0 if the server should not maintain a changelog.

setMaxChangeLogEntries

public void setMaxChangeLogEntries(int maxChangeLogEntries)
Specifies the maximum number of changelog entries that the server should maintain. A value less than or equal to zero indicates that the server should not attempt to maintain a changelog.

Parameters:
maxChangeLogEntries - The maximum number of changelog entries that the server should maintain.

getMaxConnections

public int getMaxConnections()
Retrieves the maximum number of concurrent connections that the server will allow. If a client tries to establish a new connection while the server already has the maximum number of concurrent connections, then the new connection will be rejected. Note that if the server is configured with multiple listeners, then each listener will be allowed to have up to this number of connections.

Returns:
The maximum number of concurrent connections that the server will allow, or zero if no limit should be enforced.

setMaxConnections

public void setMaxConnections(int maxConnections)
Specifies the maximum number of concurrent connections that the server will allow. If a client tries to establish a new connection while the server already has the maximum number of concurrent connections, then the new connection will be rejected. Note that if the server is configured with multiple listeners, then each listener will be allowed to have up to this number of connections.

Parameters:
maxConnections - The maximum number of concurrent connections that the server will allow. A value that is less than or equal to zero indicates no limit.

getMaxSizeLimit

public int getMaxSizeLimit()
Retrieves the maximum number of entries that the server should return in any search operation.

Returns:
The maximum number of entries that the server should return in any search operation, or zero if no limit should be enforced.

setMaxSizeLimit

public void setMaxSizeLimit(int maxSizeLimit)
Specifies the maximum number of entries that the server should return in any search operation. A value less than or equal to zero indicates that no maximum limit should be enforced.

Parameters:
maxSizeLimit - The maximum number of entries that the server should return in any search operation.

getEqualityIndexAttributes

public java.util.List<java.lang.String> getEqualityIndexAttributes()
Retrieves a list containing the names or OIDs of the attribute types for which to maintain an equality index to improve the performance of certain kinds of searches.

Returns:
A list containing the names or OIDs of the attribute types for which to maintain an equality index to improve the performance of certain kinds of searches, or an empty list if no equality indexes should be created.

setEqualityIndexAttributes

public void setEqualityIndexAttributes(java.lang.String... equalityIndexAttributes)
Specifies the names or OIDs of the attribute types for which to maintain an equality index to improve the performance of certain kinds of searches.

Parameters:
equalityIndexAttributes - The names or OIDs of the attributes for which to maintain an equality index to improve the performance of certain kinds of searches. It may be null or empty to indicate that no equality indexes should be maintained.

setEqualityIndexAttributes

public void setEqualityIndexAttributes(java.util.Collection<java.lang.String> equalityIndexAttributes)
Specifies the names or OIDs of the attribute types for which to maintain an equality index to improve the performance of certain kinds of searches.

Parameters:
equalityIndexAttributes - The names or OIDs of the attributes for which to maintain an equality index to improve the performance of certain kinds of searches. It may be null or empty to indicate that no equality indexes should be maintained.

getReferentialIntegrityAttributes

public java.util.Set<java.lang.String> getReferentialIntegrityAttributes()
Retrieves the names of the attributes for which referential integrity should be maintained. If referential integrity is to be provided and an entry is removed, then any other entries containing one of the specified attributes with a value equal to the DN of the entry that was removed, then that value will also be removed. Similarly, if an entry is moved or renamed, then any references to that entry in one of the specified attributes will be updated to reflect the new DN.

Returns:
The names of the attributes for which referential integrity should be maintained, or an empty set if referential integrity should not be maintained for any attributes.

setReferentialIntegrityAttributes

public void setReferentialIntegrityAttributes(java.lang.String... referentialIntegrityAttributes)
Specifies the names of the attributes for which referential integrity should be maintained. If referential integrity is to be provided and an entry is removed, then any other entries containing one of the specified attributes with a value equal to the DN of the entry that was removed, then that value will also be removed. Similarly, if an entry is moved or renamed, then any references to that entry in one of the specified attributes will be updated to reflect the new DN.

Parameters:
referentialIntegrityAttributes - The names of the attributes for which referential integrity should be maintained. The values of these attributes should be DNs. It may be null or empty if referential integrity should not be maintained.

setReferentialIntegrityAttributes

public void setReferentialIntegrityAttributes(java.util.Collection<java.lang.String> referentialIntegrityAttributes)
Specifies the names of the attributes for which referential integrity should be maintained. If referential integrity is to be provided and an entry is removed, then any other entries containing one of the specified attributes with a value equal to the DN of the entry that was removed, then that value will also be removed. Similarly, if an entry is moved or renamed, then any references to that entry in one of the specified attributes will be updated to reflect the new DN.

Parameters:
referentialIntegrityAttributes - The names of the attributes for which referential integrity should be maintained. The values of these attributes should be DNs. It may be null or empty if referential integrity should not be maintained.

getVendorName

public java.lang.String getVendorName()
Retrieves the vendor name value to report in the server root DSE.

Returns:
The vendor name value to report in the server root DSE, or null if no vendor name should appear.

setVendorName

public void setVendorName(java.lang.String vendorName)
Specifies the vendor name value to report in the server root DSE.

Parameters:
vendorName - The vendor name value to report in the server root DSE. It may be null if no vendor name should appear.

getVendorVersion

public java.lang.String getVendorVersion()
Retrieves the vendor version value to report in the server root DSE.

Returns:
The vendor version value to report in the server root DSE, or null if no vendor version should appear.

setVendorVersion

public void setVendorVersion(java.lang.String vendorVersion)
Specifies the vendor version value to report in the server root DSE.

Parameters:
vendorVersion - The vendor version value to report in the server root DSE. It may be null if no vendor version should appear.

getRootDSEEntry

public ReadOnlyEntry getRootDSEEntry()
Retrieves a predefined entry that should always be returned as the in-memory directory server's root DSE, if defined.

Returns:
A predefined entry that should always be returned as the in-memory directory server's root DSE, or null if the root DSE should be dynamically generated.

setRootDSEEntry

public void setRootDSEEntry(Entry rootDSEEntry)
Specifies an entry that should always be returned as the in-memory directory server's root DSE. Note that if a specific root DSE entry is provided, then

Parameters:
rootDSEEntry - An entry that should always be returned as the in-memory directory server's root DSE, or null to indicate that the root DSE should be dynamically generated.

toString

public java.lang.String toString()
Retrieves a string representation of this in-memory directory server configuration.

Overrides:
toString in class java.lang.Object
Returns:
A string representation of this in-memory directory server configuration.

toString

public void toString(java.lang.StringBuilder buffer)
Appends a string representation of this in-memory directory server configuration to the provided buffer.

Parameters:
buffer - The buffer to which the string representation should be appended.