|
LDAP Classes Implements Java LDAP |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.novell.ldap.LDAPConstraints
Defines options controlling LDAP operations on the directory.
An LDAPConstraints object is always associated with an LDAPConnection object; its values can be changed with LDAPConnection.setConstraints, or overridden by passing an LDAPConstraints object to an operation.
LDAPConnection.setConstraints(LDAPConstraints)
,
Serialized FormConstructor Summary | |
LDAPConstraints()
Constructs a new LDAPConstraints object that specifies the default set of constraints. |
|
LDAPConstraints(int msLimit,
boolean doReferrals,
LDAPReferralHandler handler,
int hop_limit)
Constructs a new LDAPConstraints object specifying constraints that control wait time, and referral handling. |
Method Summary | |
java.lang.Object |
clone()
Clones an LDAPConstraints object. |
LDAPControl[] |
getControls()
Returns the controls to be sent to the server. |
int |
getHopLimit()
Returns the maximum number of referrals to follow during automatic referral following. |
java.lang.Object |
getProperty(java.lang.String name)
Gets a property of the constraints object which has been assigned with setProperty(String, Object) . |
boolean |
getReferralFollowing()
Specified whether or not referrals are followed automatically. |
int |
getTimeLimit()
Returns the maximum number of milliseconds to wait for any operation under these constraints. |
void |
setControls(LDAPControl control)
Sets a single control to be sent to the server. |
void |
setControls(LDAPControl[] controls)
Sets controls to be sent to the server. |
void |
setHopLimit(int hop_limit)
Sets the maximum number of referrals to follow in sequence during automatic referral following. |
void |
setProperty(java.lang.String name,
java.lang.Object value)
Sets a property of the constraints object. |
void |
setReferralFollowing(boolean doReferrals)
Specifies whether referrals are followed automatically or if referrals throw an LDAPReferralException. |
void |
setReferralHandler(LDAPReferralHandler handler)
Specifies the object that will process authentication requests during automatic referral following. |
void |
setTimeLimit(int msLimit)
Sets the maximum number of milliseconds the client waits for any operation under these constraints to complete. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LDAPConstraints()
public LDAPConstraints(int msLimit, boolean doReferrals, LDAPReferralHandler handler, int hop_limit)
msLimit
- The maximum time in milliseconds to wait for results.
The default is 0, which means that there is no
maximum time limit. This limit is enforced for an
operation by the API, not by the server.
The operation will be abandoned and terminated by the
API with a result code of LDAPException.LDAP_TIMEOUT
if the operation exceeds the time limit.
doReferrals
- Determines whether to automatically follow
referrals or not. Specify true to follow
referrals automatically, and false to throw
an LDAPReferralException if the server responds
with a referral. False is the default value.
The way referrals are followed automatically is
determined by the setting of the handler parameter.
It is ignored for asynchronous operations.
handler
- The custom authentication handler called when
LDAPConnection needs to authenticate, typically on
following a referral. A null may be specified to
indicate default authentication processing, i.e.
referrals are followed with anonymous authentication.
The handler object may be an implemention of either the
LDAPBindHandler or LDAPAuthHandler interface.
The implementation of these interfaces determines how
authentication is performed when following referrals.
It is ignored for asynchronous operations.
hop_limit
- The maximum number of referrals to follow in a
sequence during automatic referral following.
The default value is 10. A value of 0 means no limit.
The operation will be abandoned and terminated by the
API with a result code of
LDAPException.REFERRAL_LIMIT_EXCEEDED if the
number of referrals in a sequence exceeds the limit.
It is ignored for asynchronous operations.LDAPException.LDAP_TIMEOUT
,
LDAPException.REFERRAL_LIMIT_EXCEEDED
,
LDAPException.REFERRAL
,
LDAPReferralException
,
LDAPBindHandler
,
LDAPAuthHandler
Method Detail |
public LDAPControl[] getControls()
setControls(LDAPControl)
,
setControls(LDAPControl[])
public int getHopLimit()
setHopLimit(int)
,
LDAPException.REFERRAL_LIMIT_EXCEEDED
public java.lang.Object getProperty(java.lang.String name)
setProperty(String, Object)
.
name
- Name of the property to be returned.
null
if the property is not set.setProperty(String, Object)
,
LDAPConnection.getProperty(String)
public boolean getReferralFollowing()
public int getTimeLimit()
If the value is 0, there is no maximum time limit on waiting for operation results. The actual granularity of the timeout depends platform. This limit is enforced the the API on an operation, not by the server. The operation will be abandoned and terminated by the API with a result code of LDAPException.LDAP_TIMEOUT if the operation exceeds the time limit.
LDAPException.LDAP_TIMEOUT
public void setControls(LDAPControl control)
control
- A single control to be sent to the server or
null if none.public void setControls(LDAPControl[] controls)
controls
- An array of controls to be sent to the server or
null if none.public void setHopLimit(int hop_limit)
hop_limit
- The maximum number of referrals to follow in a
sequence during automatic referral following.
The default value is 10. A value of 0 means no limit.
The operation will be abandoned and terminated by the
API with a result code of
LDAPException.REFERRAL_LIMIT_EXCEEDED if the
number of referrals in a sequence exceeds the limit.
It is ignored for asynchronous operations.LDAPException.REFERRAL_LIMIT_EXCEEDED
public void setProperty(java.lang.String name, java.lang.Object value) throws LDAPException
No property names have been defined at this time, but the mechanism is in place in order to support revisional as well as dynamic and proprietary extensions to operation modifiers.
name
- Name of the property to set.
value
- Value to assign to the property.
property is not supported.
java.lang.NullPointerException
- if name or value are null
LDAPException
getProperty(String )
,
LDAPConnection.getProperty(String)
public void setReferralFollowing(boolean doReferrals)
Referrals of any type other than to an LDAP server (for example, a referral URL other than ldap://something) are ignored on automatic referral following.
The default is false.
doReferrals
- True to follow referrals automatically.
False to throw an LDAPReferralException if
the server returns a referral.public void setReferralHandler(LDAPReferralHandler handler)
The default is null.
handler
- An object that implements LDAPBindHandler or
LDAPAuthHandlerLDAPAuthHandler
,
LDAPBindHandler
public void setTimeLimit(int msLimit)
If the value is 0, there is no maximum time limit enforced by the API on waiting for the operation results. The actual granularity of the timeout depends on the platform. The operation will be abandoned and terminated by the API with a result code of LDAPException.LDAP_TIMEOUT if the operation exceeds the time limit.
msLimit
- The maximum milliseconds to wait.LDAPException.LDAP_TIMEOUT
public java.lang.Object clone()
|
LDAP Classes Implements Java LDAP |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |