Class LDAPConstraints
- java.lang.Object
-
- com.unboundid.ldap.sdk.migrate.ldapjdk.LDAPConstraints
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
LDAPSearchConstraints
@NotExtensible @Mutable @ThreadSafety(level=NOT_THREADSAFE) public class LDAPConstraints extends java.lang.Object implements java.io.Serializable
This class provides a data structure which may be used to define a set of constraints that may be used when processing operations.
This class is primarily intended to be used in the process of updating applications which use the Netscape Directory SDK for Java to switch to or coexist with the UnboundID LDAP SDK for Java. For applications not written using the Netscape Directory SDK for Java, theLDAPConnectionOptions
class should be used instead.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description LDAPConstraints()
Creates a new default set of constraints.LDAPConstraints(int msLimit, boolean doReferrals, LDAPBind bindProc, int hopLimit)
Creates a set of LDAP constraints with the provided information.LDAPConstraints(int msLimit, boolean doReferrals, LDAPRebind rebindProc, int hopLimit)
Creates a set of LDAP constraints with the provided information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LDAPConstraints
duplicate()
Retrieves a duplicate of this LDAP constraints object.LDAPBind
getBindProc()
Retrieves the object that should be used to authenticate connections when following referrals.LDAPControl[]
getClientControls()
Retrieves the controls that should be applied by the clients.int
getHopLimit()
Retrieves the maximum number of hops to take when attempting to follow a referral.LDAPRebind
getRebindProc()
Retrieves the object that should be used to obtain authentication information for use when following referrals.boolean
getReferrals()
Indicates whether the client should automatically attempt to follow referrals.LDAPControl[]
getServerControls()
Retrieves the controls that should be applied by the server.int
getTimeLimit()
Retrieves the maximum length of time in milliseconds to wait for a response from the server.void
setBindProc(LDAPBind bindProc)
Specifies the object that should be used to authenticate connections when following referrals.void
setClientControls(LDAPControl control)
Specifies the controls that should be applied by the client.void
setClientControls(LDAPControl[] controls)
Specifies the controls that should be applied by the client.void
setHopLimit(int hopLimit)
Retrieves the maximum number of hops to take when attempting to follow a referral.void
setRebindProc(LDAPRebind rebindProc)
Specifies the object that should be used to obtain authentication information for use when following referrals.void
setReferrals(boolean doReferrals)
Specifies whether the client should automatically attempt to follow referrals.void
setServerControls(LDAPControl control)
Specifies the controls that should be applied by the server.void
setServerControls(LDAPControl[] controls)
Specifies the controls that should be applied by the server.void
setTimeLimit(int timeLimit)
Specifies the maximum length of time in milliseconds to wait for a response from the server.java.lang.String
toString()
Retrieves a string representation of this LDAP constraints object.
-
-
-
Constructor Detail
-
LDAPConstraints
public LDAPConstraints()
Creates a new default set of constraints.
-
LDAPConstraints
public LDAPConstraints(int msLimit, boolean doReferrals, @Nullable LDAPBind bindProc, int hopLimit)
Creates a set of LDAP constraints with the provided information.- Parameters:
msLimit
- The maximum length of time in milliseconds to wait for a response from the server.doReferrals
- Indicates whether to attempt to follow referrals.bindProc
- The object to use to authenticate a connection when following referrals.hopLimit
- The maximum number of hops to take when following a referral.
-
LDAPConstraints
public LDAPConstraints(int msLimit, boolean doReferrals, @Nullable LDAPRebind rebindProc, int hopLimit)
Creates a set of LDAP constraints with the provided information.- Parameters:
msLimit
- The maximum length of time in milliseconds to wait for a response from the server.doReferrals
- Indicates whether to attempt to follow referrals.rebindProc
- The object to use to provide the information needed to authenticate a connection created for following a referral.hopLimit
- The maximum number of hops to take when following a referral.
-
-
Method Detail
-
getTimeLimit
public int getTimeLimit()
Retrieves the maximum length of time in milliseconds to wait for a response from the server.- Returns:
- The maximum length of time in milliseconds to wait for a response from the server.
-
setTimeLimit
public void setTimeLimit(int timeLimit)
Specifies the maximum length of time in milliseconds to wait for a response from the server.- Parameters:
timeLimit
- The maximum length of time in milliseconds to wait for a response from the server.
-
getReferrals
public boolean getReferrals()
Indicates whether the client should automatically attempt to follow referrals.- Returns:
true
if the client should attempt to follow referrals, orfalse
if not.
-
setReferrals
public void setReferrals(boolean doReferrals)
Specifies whether the client should automatically attempt to follow referrals.- Parameters:
doReferrals
- Indicates whether the client should automatically attempt to follow referrals.
-
getBindProc
@Nullable public LDAPBind getBindProc()
Retrieves the object that should be used to authenticate connections when following referrals.- Returns:
- The object that should be used to authenticate connections when
following referrals, or
null
if none has been defined.
-
setBindProc
public void setBindProc(@Nullable LDAPBind bindProc)
Specifies the object that should be used to authenticate connections when following referrals.- Parameters:
bindProc
- The object that should be used to authenticate connections when following referrals.
-
getRebindProc
@Nullable public LDAPRebind getRebindProc()
Retrieves the object that should be used to obtain authentication information for use when following referrals.- Returns:
- The object that should be used to obtain authentication
information for use when following referrals, or
null
if none has been defined.
-
setRebindProc
public void setRebindProc(@Nullable LDAPRebind rebindProc)
Specifies the object that should be used to obtain authentication information for use when following referrals.- Parameters:
rebindProc
- The object that should be used to obtain authentication information for use when following referrals.
-
getHopLimit
public int getHopLimit()
Retrieves the maximum number of hops to take when attempting to follow a referral.- Returns:
- The maximum number of hops to take when attempting to follow a referral.
-
setHopLimit
public void setHopLimit(int hopLimit)
Retrieves the maximum number of hops to take when attempting to follow a referral.- Parameters:
hopLimit
- The maximum number of hops to take when attempting to follow a referral.
-
getClientControls
@NotNull public LDAPControl[] getClientControls()
Retrieves the controls that should be applied by the clients.- Returns:
- The controls that should be applied by the client.
-
setClientControls
public void setClientControls(@NotNull LDAPControl control)
Specifies the controls that should be applied by the client.- Parameters:
control
- The control that should be applied by client.
-
setClientControls
public void setClientControls(@Nullable LDAPControl[] controls)
Specifies the controls that should be applied by the client.- Parameters:
controls
- The controls that should be applied by client.
-
getServerControls
@NotNull public LDAPControl[] getServerControls()
Retrieves the controls that should be applied by the server.- Returns:
- The controls that should be applied by the server.
-
setServerControls
public void setServerControls(@NotNull LDAPControl control)
Specifies the controls that should be applied by the server.- Parameters:
control
- The control that should be applied by server.
-
setServerControls
public void setServerControls(@Nullable LDAPControl[] controls)
Specifies the controls that should be applied by the server.- Parameters:
controls
- The controls that should be applied by server.
-
duplicate
@NotNull public LDAPConstraints duplicate()
Retrieves a duplicate of this LDAP constraints object.- Returns:
- A duplicate of this LDAP constraints object.
-
-