Class LDAPConstraints

java.lang.Object
com.unboundid.ldap.sdk.migrate.ldapjdk.LDAPConstraints
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
LDAPSearchConstraints

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, the LDAPConnectionOptions class should be used instead.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    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

    Modifier and Type
    Method
    Description
    Retrieves a duplicate of this LDAP constraints object.
    Retrieves the object that should be used to authenticate connections when following referrals.
    Retrieves the controls that should be applied by the clients.
    int
    Retrieves the maximum number of hops to take when attempting to follow a referral.
    Retrieves the object that should be used to obtain authentication information for use when following referrals.
    boolean
    Indicates whether the client should automatically attempt to follow referrals.
    Retrieves the controls that should be applied by the server.
    int
    Retrieves the maximum length of time in milliseconds to wait for a response from the server.
    void
    Specifies the object that should be used to authenticate connections when following referrals.
    void
    Specifies the controls that should be applied by the client.
    void
    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
    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
    Specifies the controls that should be applied by the server.
    void
    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.
    Retrieves a string representation of this LDAP constraints object.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • 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 Details

    • 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, or false 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

      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

      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

      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

      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

      Retrieves a duplicate of this LDAP constraints object.
      Returns:
      A duplicate of this LDAP constraints object.
    • toString

      Retrieves a string representation of this LDAP constraints object.
      Overrides:
      toString in class Object
      Returns:
      A string representation of this LDAP constraints object.