| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--netscape.ldap.LDAPConstraints
Represents a set of operation preferences.
 You can set these preferences for a particular operation
 by creating an LDAPConstraints object,
 specifying your preferences, and passing the object to
 the proper LDAPConnection method.
 
| Constructor Summary | |
LDAPConstraints()
Constructs an LDAPConstraints object that specifies
 the default set of constraints. | 
|
LDAPConstraints(int msLimit,
                boolean doReferrals,
                LDAPBind bind_proc,
                int hop_limit)
Constructs a new LDAPConstraints object and allows you
 to specify the constraints in that object. | 
|
LDAPConstraints(int msLimit,
                boolean doReferrals,
                LDAPRebind rebind_proc,
                int hop_limit)
Constructs a new LDAPConstraints object and allows you
 to specify the constraints in that object. | 
|
| Method Summary | |
 java.lang.Object | 
clone()
Makes a copy of an existing set of constraints.  | 
 LDAPBind | 
getBindProc()
Returns the object that provides the mechanism for authenticating to the server on referrals.  | 
 LDAPControl[] | 
getClientControls()
Returns any client controls to be applied by the client to LDAP operations.  | 
 int | 
getHopLimit()
Returns the maximum number of hops to follow during a referral.  | 
 LDAPRebind | 
getRebindProc()
Returns the object that provides the method for getting authentication information.  | 
 boolean | 
getReferrals()
Specifies whether nor not referrals are followed automatically.  | 
 LDAPControl[] | 
getServerControls()
Returns any server controls to be applied by the server to LDAP operations.  | 
 int | 
getTimeLimit()
Returns the maximum number of milliseconds to wait for any operation under these constraints.  | 
 void | 
setBindProc(LDAPBind bind_proc)
Sets the object that provides the mechanism for authenticating to the server on referrals.  | 
 void | 
setClientControls(LDAPControl control)
Sets a client control for LDAP operations.  | 
 void | 
setClientControls(LDAPControl[] controls)
Sets an array of client controls for LDAP operations.  | 
 void | 
setHopLimit(int hop_limit)
Sets maximum number of hops to follow in sequence during a referral.  | 
 void | 
setRebindProc(LDAPRebind rebind_proc)
Specifies the object that provides the method for getting authentication information.  | 
 void | 
setReferrals(boolean doReferrals)
Specifies whether or not referrals are followed automatically.  | 
 void | 
setServerControls(LDAPControl control)
Sets a server control for LDAP operations.  | 
 void | 
setServerControls(LDAPControl[] controls)
Sets an array of server controls for LDAP operations.  | 
 void | 
setTimeLimit(int msLimit)
Sets the maximum number of milliseconds to wait for any operation under these constraints.  | 
 java.lang.String | 
toString()
Return a string representation of the object for debugging  | 
| Methods inherited from class java.lang.Object | 
equals, 
finalize, 
getClass, 
hashCode, 
notify, 
notifyAll, 
wait, 
wait, 
wait | 
| Constructor Detail | 
public LDAPConstraints()
LDAPConstraints object that specifies
 the default set of constraints.
public LDAPConstraints(int msLimit,
                       boolean doReferrals,
                       LDAPRebind rebind_proc,
                       int hop_limit)
LDAPConstraints object and allows you
 to specify the constraints in that object.
 msLimit - maximum time in milliseconds to wait for results (0
 by default, which means that there is no maximum time limit)doReferrals - specify true to follow referrals
 automatically, or False to throw an
 LDAPReferralException error if the server sends back
 a referral (False by default)rebind_proc - specifies the object that
 implements the LDAPRebind interface (you need to
 define this class).  The object will be used when the client
 follows referrals automatically.  The object provides the client
 with a method for getting the distinguished name and password
 used to authenticate to another LDAP server during a referral.
 (This field is null by default.)hop_limit - maximum number of referrals to follow in a
 sequence when attempting to resolve a requestLDAPConnection.setOption(int, java.lang.Object)
public LDAPConstraints(int msLimit,
                       boolean doReferrals,
                       LDAPBind bind_proc,
                       int hop_limit)
LDAPConstraints object and allows you
 to specify the constraints in that object.
 msLimit - Mmaximum time in milliseconds to wait for results (0
 by default, which means that there is no maximum time limit)doReferrals - specify true to follow referrals
 automatically, or False to throw an
 LDAPReferralException error if the server sends back
 a referral (False by default)bind_proc - specifies the object that 
 implements the LDAPBind interface (you need to
 define this class).  The object will be used to authenticate to the
 server on referrals. (This field is null by default.)hop_limit - maximum number of referrals to follow in a
 sequence when attempting to resolve a requestLDAPConnection.setOption(int, java.lang.Object)| Method Detail | 
public int getTimeLimit()
public boolean getReferrals()
true if referrals are to be followed automatically,
 or false if referrals throw an 
 LDAPReferralException.true if referrals are followed automatically, 
 false if referrals throw an 
 LDAPReferralException.public LDAPBind getBindProc()
LDAPBind
 interface.LDAPBindpublic LDAPRebind getRebindProc()
LDAPRebind interface.LDAPRebind, 
LDAPRebindAuthpublic int getHopLimit()
public LDAPControl[] getClientControls()
LDAPControl, 
LDAPConnection.getOption(int), 
LDAPConnection.setOption(int, java.lang.Object)public LDAPControl[] getServerControls()
LDAPControl, 
LDAPConnection.getOption(int), 
LDAPConnection.setOption(int, java.lang.Object)public void setTimeLimit(int msLimit)
LDAPException.TIME_LIMIT
  is thrown.msLimit - Maximum number of milliseconds to wait for operation
 results (0 by default, which means that there is no maximum time 
 limit.)LDAPException.LDAP_TIMEOUTpublic void setReferrals(boolean doReferrals)
true if referrals are to be followed automatically,
 or false if referrals are to throw an 
 LDAPReferralException. 
 (By default, this is set to false.)
 
 If you set this to true, you need to create an object of 
 this class that implements either the LDAPRebind or 
 LDAPBind interface. The LDAPRebind object 
 identifies the method for retrieving authentication information which
 will be used when connecting to other LDAP servers during referrals. 
 This object should be passed to the setRebindProc method.
 Alternatively, the LDAPBind object identifies an 
 authentication mechanism to be used instead of the default 
 authentication mechanism when following referrals. This 
 object should be passed to the setBindProc method.
doReferrals - set to true if referrals should be 
 followed automatically, or False if referrals should throw 
 an LDAPReferralExceptionLDAPBind, 
LDAPRebind, 
LDAPRebindAuthpublic void setBindProc(LDAPBind bind_proc)
LDAPBind interface.(By default, this is 
 null.) This method sets the LDAPRebind
 object to null for this constraint.bind_proc - object to use to authenticate to the server
 on referralsLDAPBindpublic void setRebindProc(LDAPRebind rebind_proc)
LDAPRebind interface.
 (By default, this is null.) This method sets the 
 LDAPBind object to null for this constraint.rebind_proc - object to use to obtain information for
 authenticating to other LDAP servers during referralspublic void setHopLimit(int hop_limit)
hop_limit - maximum number of hops to follow during a referralpublic void setClientControls(LDAPControl control)
control - client control for LDAP operationsLDAPControlpublic void setClientControls(LDAPControl[] controls)
controls - array of client controls for LDAP operationsLDAPControlpublic void setServerControls(LDAPControl control)
control - server control for LDAP operationsLDAPControlpublic void setServerControls(LDAPControl[] controls)
controls - an array of server controls for LDAP operationsLDAPControlpublic java.lang.String toString()
public java.lang.Object clone()
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||