@Mutable @ThreadSafety(level=NOT_THREADSAFE) public final class LDAPConnectionOptions extends java.lang.Object
LDAPConnectionLogger
that should be used to record
information about requests sent and responses received over
connections with this set of options. By default, no
LDAPConnectionLogger
will be used.DisconnectHandler
that should be used to receive
notification if connection is disconnected for any reason. By default,
no DisconnectHandler
will be used.UnsolicitedNotificationHandler
that should be used to
receive notification about any unsolicited notifications returned by
the server. By default, no UnsolicitedNotificationHandler
will
be used.SSLSocket
instances created. By
default, no special verification will be performed.Modifier and Type | Field and Description |
---|---|
static NameResolver |
DEFAULT_NAME_RESOLVER
The default name resolver that will be used to resolve host names to IP
addresses.
|
static java.lang.String |
PROPERTY_DEFAULT_ABANDON_ON_TIMEOUT
The name of a system property that can be used to specify the initial
default value for the "abandon on timeout" behavior.
|
static java.lang.String |
PROPERTY_DEFAULT_ADD_RESPONSE_TIMEOUT_MILLIS
The name of a system property that can be used to specify the initial
default value for response timeouts, in milliseconds, for add operations.
|
static java.lang.String |
PROPERTY_DEFAULT_ALLOW_CONCURRENT_SOCKET_FACTORY_USE
The name of a system property that can be used to specify the default value
for the "allow concurrent socket factory use" behavior.
|
static java.lang.String |
PROPERTY_DEFAULT_BIND_RESPONSE_TIMEOUT_MILLIS
The name of a system property that can be used to specify the initial
default value for response timeouts, in milliseconds, for bind operations.
|
static java.lang.String |
PROPERTY_DEFAULT_BIND_WITH_DN_REQUIRES_PASSWORD
The name of a system property that can be used to specify the initial
default value for the "bind with DN requires password" behavior.
|
static java.lang.String |
PROPERTY_DEFAULT_CAPTURE_CONNECT_STACK_TRACE
The name of a system property that can be used to specify the initial
default value for the "capture connect stack trace" behavior.
|
static java.lang.String |
PROPERTY_DEFAULT_COMPARE_RESPONSE_TIMEOUT_MILLIS
The name of a system property that can be used to specify the initial
default value for response timeouts, in milliseconds, for compare
operations.
|
static java.lang.String |
PROPERTY_DEFAULT_CONNECT_TIMEOUT_MILLIS
The name of a system property that can be used to specify the initial
default connect timeout, in milliseconds.
|
static java.lang.String |
PROPERTY_DEFAULT_DELETE_RESPONSE_TIMEOUT_MILLIS
The name of a system property that can be used to specify the initial
default value for response timeouts, in milliseconds, for delete
operations.
|
static java.lang.String |
PROPERTY_DEFAULT_EXTENDED_RESPONSE_TIMEOUT_MILLIS
The name of a system property that can be used to specify the initial
default value for response timeouts, in milliseconds, for extended
operations.
|
static java.lang.String |
PROPERTY_DEFAULT_FOLLOW_REFERRALS
The name of a system property that can be used to specify the initial
default value for the "follow referrals" behavior.
|
static java.lang.String |
PROPERTY_DEFAULT_LINGER_TIMEOUT_SECONDS
The name of a system property that can be used to specify the initial
default value for the linger timeout, in seconds.
|
static java.lang.String |
PROPERTY_DEFAULT_MAX_MESSAGE_SIZE_BYTES
The name of a system property that can be used to specify the initial
default value for the maximum message size, in bytes.
|
static java.lang.String |
PROPERTY_DEFAULT_MODIFY_DN_RESPONSE_TIMEOUT_MILLIS
The name of a system property that can be used to specify the initial
default value for response timeouts, in milliseconds, for modify DN
operations.
|
static java.lang.String |
PROPERTY_DEFAULT_MODIFY_RESPONSE_TIMEOUT_MILLIS
The name of a system property that can be used to specify the initial
default value for response timeouts, in milliseconds, for modify
operations.
|
static java.lang.String |
PROPERTY_DEFAULT_POOLED_SCHEMA_TIMEOUT_MILLIS
The name of a system property that can be used to specify the initial
default value for the pooled schema timeout, in milliseconds.
|
static java.lang.String |
PROPERTY_DEFAULT_RECEIVE_BUFFER_SIZE_BYTES
The name of a system property that can be used to specify the initial
default value for the receive buffer size, in bytes.
|
static java.lang.String |
PROPERTY_DEFAULT_REFERRAL_HOP_LIMIT
The name of a system property that can be used to specify the maximum
number of hops to make when following a referral.
|
static java.lang.String |
PROPERTY_DEFAULT_RESPONSE_TIMEOUT_MILLIS
The name of a system property that can be used to specify the initial
default value for response timeouts, in milliseconds, for all types of
operations.
|
static java.lang.String |
PROPERTY_DEFAULT_SEARCH_RESPONSE_TIMEOUT_MILLIS
The name of a system property that can be used to specify the initial
default value for response timeouts, in milliseconds, for search
operations.
|
static java.lang.String |
PROPERTY_DEFAULT_SEND_BUFFER_SIZE_BYTES
The name of a system property that can be used to specify the initial
default value for the send buffer size, in bytes.
|
static java.lang.String |
PROPERTY_DEFAULT_USE_KEEPALIVE
The name of a system property that can be used to specify the initial
default value for the "use keepalive" behavior.
|
static java.lang.String |
PROPERTY_DEFAULT_USE_LINGER
The name of a system property that can be used to specify the initial
default value for the "use linger" behavior.
|
static java.lang.String |
PROPERTY_DEFAULT_USE_POOLED_SCHEMA
The name of a system property that can be used to specify the initial
default value for the "use pooled schema" behavior.
|
static java.lang.String |
PROPERTY_DEFAULT_USE_REUSE_ADDRESS
The name of a system property that can be used to specify the initial
default value for the "use reuse address" behavior.
|
static java.lang.String |
PROPERTY_DEFAULT_USE_SCHEMA
The name of a system property that can be used to specify the initial
default value for the "use schema" behavior.
|
static java.lang.String |
PROPERTY_DEFAULT_USE_SYNCHRONOUS_MODE
The name of a system property that can be used to specify the initial
default value for the "use synchronous mode" behavior.
|
static java.lang.String |
PROPERTY_DEFAULT_USE_TCP_NODELAY
The name of a system property that can be used to specify the initial
default value for the "use TCP nodelay" behavior.
|
static java.lang.String |
PROPERTY_DEFAULT_VERIFY_CERTIFICATE_HOSTNAMES
The name of a system property that can be used to indicate that the LDAP
SDK should perform validation for certificate hostnames when negotiating a
TLS session.
|
Constructor and Description |
---|
LDAPConnectionOptions()
Creates a new set of LDAP connection options with the default settings.
|
Modifier and Type | Method and Description |
---|---|
boolean |
abandonOnTimeout()
Indicates whether the LDAP SDK should attempt to abandon any request for
which no response is received in the maximum response timeout period.
|
boolean |
allowConcurrentSocketFactoryUse()
Indicates whether to allow a socket factory instance (which may be shared
across multiple connections) to be used create multiple sockets
concurrently.
|
boolean |
autoReconnect()
Deprecated.
The use of auto-reconnect is strongly discouraged because it
is inherently fragile and can only work under very limited
circumstances. It is strongly recommended that a connection
pool be used instead of the auto-reconnect option, even in
cases where only a single connection is desired.
|
boolean |
bindWithDNRequiresPassword()
Indicates whether the SDK should allow simple bind operations that contain
a bind DN but no password.
|
boolean |
captureConnectStackTrace()
Indicates whether the LDAP SDK should capture a thread stack trace for each
attempt made to establish a connection.
|
LDAPConnectionOptions |
duplicate()
Returns a duplicate of this LDAP connection options object that may be
modified without impacting this instance.
|
boolean |
followReferrals()
Indicates whether associated connections should attempt to follow any
referrals that they encounter.
|
LDAPConnectionLogger |
getConnectionLogger()
Retrieves the logger that should be used to record information about
requests sent and responses received over connections with this set of
connection options.
|
int |
getConnectTimeoutMillis()
Retrieves the maximum length of time in milliseconds that a connection
attempt should be allowed to continue before giving up.
|
DisconnectHandler |
getDisconnectHandler()
Retrieves the disconnect handler to use for associated connections.
|
long |
getExtendedOperationResponseTimeoutMillis(java.lang.String requestOID)
Retrieves the maximum length of time in milliseconds that an extended
operation with the specified request OID should be allowed to block while
waiting for a response from the server.
|
int |
getLingerTimeoutSeconds()
Retrieves the linger timeout in seconds that will be used if the SO_LINGER
socket option is enabled.
|
int |
getMaxMessageSize()
Retrieves the maximum size in bytes for an LDAP message that a connection
will attempt to read from the directory server.
|
NameResolver |
getNameResolver()
Retrieves the name resolver that should be used to resolve host names to IP
addresses.
|
long |
getPooledSchemaTimeoutMillis()
Retrieves the maximum length of time in milliseconds that a pooled schema
object should be considered fresh.
|
int |
getReceiveBufferSize()
Retrieves the socket receive buffer size, in bytes, that should be
requested when establishing a connection.
|
ReferralConnector |
getReferralConnector()
Retrieves the referral connector that will be used to establish and
optionally authenticate connections to servers when attempting to follow
referrals, if defined.
|
int |
getReferralHopLimit()
Retrieves the maximum number of hops that a connection should take when
trying to follow a referral.
|
long |
getResponseTimeoutMillis()
Retrieves the maximum length of time in milliseconds that an operation
should be allowed to block while waiting for a response from the server.
|
long |
getResponseTimeoutMillis(OperationType operationType)
Retrieves the maximum length of time in milliseconds that an operation
of the specified type should be allowed to block while waiting for a
response from the server.
|
int |
getSendBufferSize()
Retrieves the socket send buffer size, in bytes, that should be requested
when establishing a connection.
|
SSLSocketVerifier |
getSSLSocketVerifier()
Retrieves the
SSLSocketVerifier that will be used to perform
additional validation for any newly-created SSLSocket instances. |
UnsolicitedNotificationHandler |
getUnsolicitedNotificationHandler()
Retrieves the unsolicited notification handler to use for associated
connections.
|
void |
setAbandonOnTimeout(boolean abandonOnTimeout)
Specifies whether the LDAP SDK should attempt to abandon any request for
which no response is received in the maximum response timeout period.
|
void |
setAllowConcurrentSocketFactoryUse(boolean allowConcurrentSocketFactoryUse)
Specifies whether to allow a socket factory instance (which may be shared
across multiple connections) to be used create multiple sockets
concurrently.
|
void |
setAutoReconnect(boolean autoReconnect)
Deprecated.
The use of auto-reconnect is strongly discouraged because it
is inherently fragile and can only work under very limited
circumstances. It is strongly recommended that a connection
pool be used instead of the auto-reconnect option, even in
cases where only a single connection is desired.
|
void |
setBindWithDNRequiresPassword(boolean bindWithDNRequiresPassword)
Specifies whether the SDK should allow simple bind operations that contain
a bind DN but no password.
|
void |
setCaptureConnectStackTrace(boolean captureConnectStackTrace)
Specifies whether the LDAP SDK should capture a thread stack trace for each
attempt made to establish a connection.
|
void |
setConnectionLogger(LDAPConnectionLogger connectionLogger)
Specifies the logger that should be used to record information about
requests sent and responses received over connections with this set of
connection options.
|
void |
setConnectTimeoutMillis(int connectTimeoutMillis)
Specifies the maximum length of time in milliseconds that a connection
attempt should be allowed to continue before giving up.
|
void |
setDisconnectHandler(DisconnectHandler handler)
Specifies the disconnect handler to use for associated connections.
|
void |
setExtendedOperationResponseTimeoutMillis(java.lang.String requestOID,
long responseTimeoutMillis)
Specifies the maximum length of time in milliseconds that an extended
operation with the specified request OID should be allowed to block while
waiting for a response from the server.
|
void |
setFollowReferrals(boolean followReferrals)
Specifies whether associated connections should attempt to follow any
referrals that they encounter, using the referral connector for the
associated connection.
|
void |
setMaxMessageSize(int maxMessageSizeBytes)
Specifies the maximum size in bytes for an LDAP message that a connection
will attempt to read from the directory server.
|
void |
setNameResolver(NameResolver nameResolver)
Sets the name resolver that should be used to resolve host names to IP
addresses.
|
void |
setPooledSchemaTimeoutMillis(long pooledSchemaTimeoutMillis)
Specifies the maximum length of time in milliseconds that a pooled schema
object should be considered fresh.
|
void |
setReceiveBufferSize(int receiveBufferSizeBytes)
Specifies the socket receive buffer size, in bytes, that should be
requested when establishing a connection.
|
void |
setReferralConnector(ReferralConnector referralConnector)
Specifies the referral connector that should be used to establish and
optionally authenticate connections to servers when attempting to follow
referrals.
|
void |
setReferralHopLimit(int referralHopLimit)
Specifies the maximum number of hops that a connection should take when
trying to follow a referral.
|
void |
setResponseTimeoutMillis(long responseTimeoutMillis)
Specifies the maximum length of time in milliseconds that an operation
should be allowed to block while waiting for a response from the server.
|
void |
setResponseTimeoutMillis(OperationType operationType,
long responseTimeoutMillis)
Specifies the maximum length of time in milliseconds that an operation of
the specified type should be allowed to block while waiting for a response
from the server.
|
void |
setSendBufferSize(int sendBufferSizeBytes)
Specifies the socket send buffer size, in bytes, that should be requested
when establishing a connection.
|
void |
setSSLSocketVerifier(SSLSocketVerifier sslSocketVerifier)
Specifies the
SSLSocketVerifier that will be used to perform
additional validation for any newly-created SSLSocket instances. |
void |
setUnsolicitedNotificationHandler(UnsolicitedNotificationHandler handler)
Specifies the unsolicited notification handler to use for associated
connections.
|
void |
setUseKeepAlive(boolean useKeepAlive)
Specifies whether to use the SO_KEEPALIVE option for the underlying sockets
used by associated connections.
|
void |
setUseLinger(boolean useLinger,
int lingerTimeoutSeconds)
Specifies whether to use the SO_LINGER option for the underlying sockets
used by associated connections.
|
void |
setUsePooledSchema(boolean usePooledSchema)
Indicates whether to have connections that are part of a pool try to use
shared schema information when reading data from the server (e.g., to
select the appropriate matching rules for the attributes included in a
search result entry).
|
void |
setUseReuseAddress(boolean useReuseAddress)
Specifies whether to use the SO_REUSEADDR option for the underlying sockets
used by associated connections.
|
void |
setUseSchema(boolean useSchema)
Specifies whether to try to use schema information when reading data from
the server (e.g., to select the appropriate matching rules for the
attributes included in a search result entry).
|
void |
setUseSynchronousMode(boolean useSynchronousMode)
Specifies whether to operate in synchronous mode, in which at most one
operation may be in progress at any time on a given connection.
|
void |
setUseTCPNoDelay(boolean useTCPNoDelay)
Specifies whether to use the TCP_NODELAY option for the underlying sockets
used by associated connections.
|
java.lang.String |
toString()
Retrieves a string representation of this LDAP connection.
|
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this LDAP connection to the provided
buffer.
|
boolean |
useKeepAlive()
Indicates whether to use the SO_KEEPALIVE option for the underlying sockets
used by associated connections.
|
boolean |
useLinger()
Indicates whether to use the SO_LINGER option for the underlying sockets
used by associated connections.
|
boolean |
usePooledSchema()
Indicates whether to have connections that are part of a pool try to use
shared schema information when reading data from the server (e.g., to
select the appropriate matching rules for the attributes included in a
search result entry).
|
boolean |
useReuseAddress()
Indicates whether to use the SO_REUSEADDR option for the underlying sockets
used by associated connections.
|
boolean |
useSchema()
Indicates whether to try to use schema information when reading data from
the server (e.g., to select the appropriate matching rules for the
attributes included in a search result entry).
|
boolean |
useSynchronousMode()
Indicates whether to operate in synchronous mode, in which at most one
operation may be in progress at any time on a given connection, which may
allow it to operate more efficiently and without requiring a separate
reader thread per connection.
|
boolean |
useTCPNoDelay()
Indicates whether to use the TCP_NODELAY option for the underlying sockets
used by associated connections.
|
@NotNull public static final java.lang.String PROPERTY_DEFAULT_ABANDON_ON_TIMEOUT
@NotNull public static final java.lang.String PROPERTY_DEFAULT_BIND_WITH_DN_REQUIRES_PASSWORD
@NotNull public static final java.lang.String PROPERTY_DEFAULT_CAPTURE_CONNECT_STACK_TRACE
@NotNull public static final java.lang.String PROPERTY_DEFAULT_FOLLOW_REFERRALS
@NotNull public static final java.lang.String PROPERTY_DEFAULT_REFERRAL_HOP_LIMIT
@NotNull public static final java.lang.String PROPERTY_DEFAULT_USE_SCHEMA
@NotNull public static final java.lang.String PROPERTY_DEFAULT_USE_POOLED_SCHEMA
@NotNull public static final java.lang.String PROPERTY_DEFAULT_POOLED_SCHEMA_TIMEOUT_MILLIS
@NotNull public static final java.lang.String PROPERTY_DEFAULT_USE_KEEPALIVE
@NotNull public static final java.lang.String PROPERTY_DEFAULT_USE_LINGER
@NotNull public static final java.lang.String PROPERTY_DEFAULT_LINGER_TIMEOUT_SECONDS
@NotNull public static final java.lang.String PROPERTY_DEFAULT_USE_REUSE_ADDRESS
@NotNull public static final java.lang.String PROPERTY_DEFAULT_USE_SYNCHRONOUS_MODE
@NotNull public static final java.lang.String PROPERTY_DEFAULT_USE_TCP_NODELAY
@NotNull public static final java.lang.String PROPERTY_DEFAULT_CONNECT_TIMEOUT_MILLIS
@NotNull public static final java.lang.String PROPERTY_DEFAULT_MAX_MESSAGE_SIZE_BYTES
@NotNull public static final java.lang.String PROPERTY_DEFAULT_RECEIVE_BUFFER_SIZE_BYTES
@NotNull public static final java.lang.String PROPERTY_DEFAULT_SEND_BUFFER_SIZE_BYTES
@NotNull public static final java.lang.String PROPERTY_DEFAULT_RESPONSE_TIMEOUT_MILLIS
@NotNull public static final java.lang.String PROPERTY_DEFAULT_ADD_RESPONSE_TIMEOUT_MILLIS
PROPERTY_DEFAULT_RESPONSE_TIMEOUT_MILLIS
system property is not
set, as that property will override this one. If neither of those
properties is set, then a default value of "30000" (30,000 milliseconds, or
30 seconds) will be assumed.
@NotNull public static final java.lang.String PROPERTY_DEFAULT_BIND_RESPONSE_TIMEOUT_MILLIS
PROPERTY_DEFAULT_RESPONSE_TIMEOUT_MILLIS
system property is not
set, as that property will override this one. If neither of those
properties is set, then a default value of "30000" (30,000 milliseconds, or
30 seconds) will be assumed.
@NotNull public static final java.lang.String PROPERTY_DEFAULT_COMPARE_RESPONSE_TIMEOUT_MILLIS
PROPERTY_DEFAULT_RESPONSE_TIMEOUT_MILLIS
system
property is not set, as that property will override this one. If neither
of those properties is set, then a default value of "30000" (30,000
milliseconds, or 30 seconds) will be assumed.
@NotNull public static final java.lang.String PROPERTY_DEFAULT_DELETE_RESPONSE_TIMEOUT_MILLIS
PROPERTY_DEFAULT_RESPONSE_TIMEOUT_MILLIS
system
property is not set, as that property will override this one. If neither
of those properties is set, then a default value of "30000" (30,000
milliseconds, or 30 seconds) will be assumed.
@NotNull public static final java.lang.String PROPERTY_DEFAULT_EXTENDED_RESPONSE_TIMEOUT_MILLIS
PROPERTY_DEFAULT_RESPONSE_TIMEOUT_MILLIS
system
property is not set, as that property will override this one. If neither
of those properties is set, then a default value of "300000" (300,000
milliseconds, or 5 minutes) will be assumed.
PROPERTY_DEFAULT_RESPONSE_TIMEOUT_MILLIS
nor the
PROPERTY_DEFAULT_EXTENDED_RESPONSE_TIMEOUT_MILLIS
property is set,
then the following standard extended operation types will have a default
timeout of 30,000 milliseconds (30 seconds) instead of 300,000 milliseconds
(5 minutes), unless a property is defined to override the timeout for that
specific type of extended operation:
@NotNull public static final java.lang.String PROPERTY_DEFAULT_MODIFY_RESPONSE_TIMEOUT_MILLIS
PROPERTY_DEFAULT_RESPONSE_TIMEOUT_MILLIS
system
property is not set, as that property will override this one. If neither
of those properties is set, then a default value of "30000" (30,000
milliseconds, or 30 seconds) will be assumed.
@NotNull public static final java.lang.String PROPERTY_DEFAULT_MODIFY_DN_RESPONSE_TIMEOUT_MILLIS
PROPERTY_DEFAULT_RESPONSE_TIMEOUT_MILLIS
system
property is not set, as that property will override this one. If neither
of those properties is set, then a default value of "30000" (30,000
milliseconds, or 30 seconds) will be assumed.
@NotNull public static final java.lang.String PROPERTY_DEFAULT_SEARCH_RESPONSE_TIMEOUT_MILLIS
PROPERTY_DEFAULT_RESPONSE_TIMEOUT_MILLIS
system
property is not set, as that property will override this one. If neither
of those properties is set, then a default value of "300000" (300,000
milliseconds, or 5 minutes) will be assumed.
@NotNull public static final NameResolver DEFAULT_NAME_RESOLVER
@NotNull public static final java.lang.String PROPERTY_DEFAULT_ALLOW_CONCURRENT_SOCKET_FACTORY_USE
@NotNull public static final java.lang.String PROPERTY_DEFAULT_VERIFY_CERTIFICATE_HOSTNAMES
setSSLSocketVerifier(com.unboundid.util.ssl.SSLSocketVerifier)
method is called and provided with an
HostNameSSLSocketVerifier
instance. However, if this property is
set with a value of "true", then connections will use a
HostNameSSLSocketVerifier
by default, and attempts to establish a
secure connection will fail if the address used to establish the connection
does not match any of the allowed addresses for that certificate (e.g., in
its subject alternative name extension).
public LDAPConnectionOptions()
@NotNull public LDAPConnectionOptions duplicate()
@Deprecated public boolean autoReconnect()
true
if associated connections should attempt to
automatically reconnect to the target server if the connection is
lost, or false
if not.@Deprecated public void setAutoReconnect(boolean autoReconnect)
autoReconnect
- Specifies whether associated connections should
attempt to automatically reconnect to the target
server if the connection is lost.@NotNull public NameResolver getNameResolver()
public void setNameResolver(@Nullable NameResolver nameResolver)
nameResolver
- The name resolver that should be used to resolve host
names to IP addresses.public boolean bindWithDNRequiresPassword()
true
if the SDK should allow simple bind operations that
contain a bind DN but no password, or false
if not.public void setBindWithDNRequiresPassword(boolean bindWithDNRequiresPassword)
bindWithDNRequiresPassword
- Indicates whether the SDK should allow
simple bind operations that contain a
bind DN but no password.public boolean captureConnectStackTrace()
LDAPConnection.getConnectStackTrace()
method may be used to
retrieve the stack trace.true
if a thread stack trace should be captured whenever a
connection is established, or false
if not.public void setCaptureConnectStackTrace(boolean captureConnectStackTrace)
captureConnectStackTrace
- Indicates whether to capture a thread
stack trace for each attempt made to
establish a connection.public int getConnectTimeoutMillis()
public void setConnectTimeoutMillis(int connectTimeoutMillis)
connectTimeoutMillis
- The maximum length of time in milliseconds
that a connection attempt should be allowed
to continue before giving up.public long getResponseTimeoutMillis()
getResponseTimeoutMillis(OperationType)
method should be used
instead of this one.public void setResponseTimeoutMillis(long responseTimeoutMillis)
responseTimeoutMillis
- The maximum length of time in milliseconds
that an operation should be allowed to block
while waiting for a response from the
server.public long getResponseTimeoutMillis(@NotNull OperationType operationType)
getExtendedOperationResponseTimeoutMillis(String)
method should be
used instead of this one for extended operations.operationType
- The operation type for which to make the
determination. It must not be null
.public void setResponseTimeoutMillis(@NotNull OperationType operationType, long responseTimeoutMillis)
operationType
- The operation type for which to set the
response timeout. It must not be
null
.responseTimeoutMillis
- The maximum length of time in milliseconds
that an operation should be allowed to block
while waiting for a response from the
server.public long getExtendedOperationResponseTimeoutMillis(@NotNull java.lang.String requestOID)
requestOID
- The request OID for the extended operation for which to
make the determination. It must not be null
.public void setExtendedOperationResponseTimeoutMillis(@NotNull java.lang.String requestOID, long responseTimeoutMillis)
requestOID
- The request OID for the extended operation
type for which to set the response timeout.
It must not be null
.responseTimeoutMillis
- The maximum length of time in milliseconds
that an operation should be allowed to block
while waiting for a response from the
server.public boolean abandonOnTimeout()
true
if the LDAP SDK should attempt to abandon any request
for which no response is received in the maximum response timeout
period, or false
if no abandon attempt should be made in
this circumstance.public void setAbandonOnTimeout(boolean abandonOnTimeout)
abandonOnTimeout
- Indicates whether the LDAP SDK should attempt to
abandon any request for which no response is
received in the maximum response timeout period.public boolean useKeepAlive()
true
if the SO_KEEPALIVE option should be used for the
underlying sockets, or false
if not.public void setUseKeepAlive(boolean useKeepAlive)
useKeepAlive
- Indicates whether to use the SO_KEEPALIVE option for
the underlying sockets used by associated
connections.public boolean useLinger()
true
if the SO_LINGER option should be used for the
underlying sockets, or false
if not.public int getLingerTimeoutSeconds()
public void setUseLinger(boolean useLinger, int lingerTimeoutSeconds)
useLinger
- Indicates whether to use the SO_LINGER option
for the underlying sockets used by associated
connections.lingerTimeoutSeconds
- The linger timeout in seconds that should be
used if this capability is enabled.public boolean useReuseAddress()
true
if the SO_REUSEADDR option should be used for the
underlying sockets, or false
if not.public void setUseReuseAddress(boolean useReuseAddress)
useReuseAddress
- Indicates whether to use the SO_REUSEADDR option
for the underlying sockets used by associated
connections.public boolean useSchema()
Filter.matchesEntry(Entry)
or Attribute.hasValue(String)
.
If both useSchema
and useSPooledSchema
are false
,
then all client-side matching for attribute values will treat them as
directory string values with a caseIgnoreMatch equality matching rule. If
either useSchema
or usePooledSchema
is true
, then
the LDAP SDK may be able to use the attribute type definitions from that
schema to determine the appropriate syntax and matching rules to use for
client-side matching operations involving those attributes. Any attribute
types that are not defined in the schema will still be treated as
case-insensitive directory string values.true
if schema should be used when reading data from the
server, or false
if not.public void setUseSchema(boolean useSchema)
Filter.matchesEntry(Entry)
or Attribute.hasValue(String)
.
If both useSchema
and useSPooledSchema
are false
,
then all client-side matching for attribute values will treat them as
directory string values with a caseIgnoreMatch equality matching rule. If
either useSchema
or usePooledSchema
is true
, then
the LDAP SDK may be able to use the attribute type definitions from that
schema to determine the appropriate syntax and matching rules to use for
client-side matching operations involving those attributes. Any attribute
types that are not defined in the schema will still be treated as
case-insensitive directory string values.
true
will also cause
the usePooledSchema
setting to be given a value of false, since
the two values should not both be true
at the same time.useSchema
- Indicates whether to try to use schema information when
reading data from the server.public boolean usePooledSchema()
true
, then connections in a
connection pool will share the same cached schema information in a way that
attempts to reduce network bandwidth and connection establishment time (by
avoiding the need for each connection to retrieve its own copy of the
schema).
Filter.matchesEntry(Entry)
or Attribute.hasValue(String)
.
If both useSchema
and useSPooledSchema
are false
,
then all client-side matching for attribute values will treat them as
directory string values with a caseIgnoreMatch equality matching rule. If
either useSchema
or usePooledSchema
is true
, then
the LDAP SDK may be able to use the attribute type definitions from that
schema to determine the appropriate syntax and matching rules to use for
client-side matching operations involving those attributes. Any attribute
types that are not defined in the schema will still be treated as
case-insensitive directory string values.
getPooledSchemaTimeoutMillis()
method.true
if all connections in a connection pool should
reference the same schema object, or false
if each
connection should retrieve its own copy of the schema.public void setUsePooledSchema(boolean usePooledSchema)
Filter.matchesEntry(Entry)
or Attribute.hasValue(String)
.
If both useSchema
and useSPooledSchema
are false
,
then all client-side matching for attribute values will treat them as
directory string values with a caseIgnoreMatch equality matching rule. If
either useSchema
or usePooledSchema
is true
, then
the LDAP SDK may be able to use the attribute type definitions from that
schema to determine the appropriate syntax and matching rules to use for
client-side matching operations involving those attributes. Any attribute
types that are not defined in the schema will still be treated as
case-insensitive directory string values.
true
will also cause
the useSchema
setting to be given a value of false, since the two
values should not both be true
at the same time.usePooledSchema
- Indicates whether all connections in a connection
pool should reference the same schema object
rather than attempting to retrieve their own copy
of the schema.public long getPooledSchemaTimeoutMillis()
usePooledSchema
method returns
true
. A value of zero indicates that the pooled schema will never
expire.public void setPooledSchemaTimeoutMillis(long pooledSchemaTimeoutMillis)
pooledSchemaTimeoutMillis
- The maximum length of time in
milliseconds that a pooled schema object
should be considered fresh. A value
less than or equal to zero will indicate
that pooled schema should never expire.public boolean useSynchronousMode()
true
if associated connections should operate in
synchronous mode, or false
if not.public void setUseSynchronousMode(boolean useSynchronousMode)
useSynchronousMode
- Indicates whether to operate in synchronous
mode.public boolean useTCPNoDelay()
true
if the TCP_NODELAY option should be used for the
underlying sockets, or false
if not.public void setUseTCPNoDelay(boolean useTCPNoDelay)
useTCPNoDelay
- Indicates whether to use the TCP_NODELAY option for
the underlying sockets used by associated
connections.public boolean followReferrals()
true
if associated connections should attempt to follow
any referrals that they encounter, or false
if not.public void setFollowReferrals(boolean followReferrals)
followReferrals
- Specifies whether associated connections should
attempt to follow any referrals that they
encounter.public int getReferralHopLimit()
public void setReferralHopLimit(int referralHopLimit)
referralHopLimit
- The maximum number of hops that a connection
should take when trying to follow a referral. It
must be greater than zero.@Nullable public ReferralConnector getReferralConnector()
null
if no specific referral
connector has been configured and referral connections should be
created using the same socket factory and bind request as the
connection on which the referral was received.public void setReferralConnector(@Nullable ReferralConnector referralConnector)
referralConnector
- The referral connector that will be used to
establish and optionally authenticate
connections to servers when attempting to follow
referrals. It may be null
to indicate
that the same socket factory and bind request
as the connection on which the referral was
received should be used to establish and
authenticate connections for following
referrals.public int getMaxMessageSize()
public void setMaxMessageSize(int maxMessageSizeBytes)
maxMessageSizeBytes
- The maximum size in bytes for an LDAP message
that a connection will attempt to read from
the directory server. A value less than or
equal to zero indicates that no limit should
be enforced.@Nullable public LDAPConnectionLogger getConnectionLogger()
null
if no logging should be performed.public void setConnectionLogger(@Nullable LDAPConnectionLogger connectionLogger)
connectionLogger
- The logger that should be used to record
information about the requests sent and
responses received over connection with this set
of options. It may be null
if no logging
should be performed.@Nullable public DisconnectHandler getDisconnectHandler()
null
if none is defined.public void setDisconnectHandler(@Nullable DisconnectHandler handler)
handler
- The disconnect handler to use for associated connections.@Nullable public UnsolicitedNotificationHandler getUnsolicitedNotificationHandler()
null
if none is defined.public void setUnsolicitedNotificationHandler(@Nullable UnsolicitedNotificationHandler handler)
handler
- The unsolicited notification handler to use for associated
connections.public int getReceiveBufferSize()
public void setReceiveBufferSize(int receiveBufferSizeBytes)
receiveBufferSizeBytes
- The socket receive buffer size, in bytes,
that should be requested when establishing
a connection, or zero if the JVM's default
size should be used.public int getSendBufferSize()
public void setSendBufferSize(int sendBufferSizeBytes)
sendBufferSizeBytes
- The socket send buffer size, in bytes, that
should be requested when establishing a
connection, or zero if the JVM's default size
should be used.public boolean allowConcurrentSocketFactoryUse()
true
if multiple threads should be able to concurrently
use the same socket factory instance, or false
if Java
synchronization should be used to ensure that no more than one
thread is allowed to use a socket factory at any given time.public void setAllowConcurrentSocketFactoryUse(boolean allowConcurrentSocketFactoryUse)
allowConcurrentSocketFactoryUse
- Indicates whether to allow a
socket factory instance to be used
to create multiple sockets
concurrently.@NotNull public SSLSocketVerifier getSSLSocketVerifier()
SSLSocketVerifier
that will be used to perform
additional validation for any newly-created SSLSocket
instances.SSLSocketVerifier
that will be used to perform
additional validation for any newly-created SSLSocket
instances.public void setSSLSocketVerifier(@Nullable SSLSocketVerifier sslSocketVerifier)
SSLSocketVerifier
that will be used to perform
additional validation for any newly-created SSLSocket
instances.sslSocketVerifier
- The SSLSocketVerifier
that will be used
to perform additional validation for any
newly-created SSLSocket
instances.@NotNull public java.lang.String toString()
toString
in class java.lang.Object