An LdapReferralException object contains one or more referrals.
Each referral is an alternative location for the same target entry.
For example, a referral may be an LDAP URL.
The referrals are attempted in sequence until one is successful or
all have failed. In the case of the latter then the exception generated
by the final referral is recorded and presented later.
A referral may be skipped or may be retried. For example, in the case of an authentication error, a referral may be retried with different environment properties.
An LdapReferralException object may also contain a reference
to a chain of unprocessed LdapReferralException objects.
Once the current set of referrals have been exhausted and unprocessed
LdapReferralException objects remain, then the
LdapReferralException object referenced by the current
object is thrown and the cycle continues.
If new LdapReferralException objects are generated while
following an existing referral then these new objects are appended
to the end of the chain of unprocessed LdapReferralException
objects.
If an exception was recorded while processing a chain of
LdapReferralException objects then it is throw once
processing has completed.
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private Hashtable | |
| private NamingException | |
| private boolean | |
| private int | |
| private int | |
| private String | |
| private String | |
| pack-priv LdapReferralException | |
| private int | |
| private int | |
| private Vector | |
| private Control[] | |
| private static final long | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| pack-priv | LdapReferralException(Name
The part of the name that has been successfully
resolved. resolvedName, Object The object to which resolution was successful. resolvedObj, Name The remaining unresolved portion of the name. remainingName, String Additional detail about this exception. explanation, Hashtable<?, ?> envprops, String nextName, int handleReferrals, Control[] reqCtls)Constructs a new instance of LdapReferralException. |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv LdapReferralException | appendUnprocessedReferrals(LdapReferralException back)
Appends the supplied (chain of) referral exception onto the end of the current (chain of) referral exception. |
| pack-priv void | |
| private void | |
| pack-priv NamingException | |
| pack-priv String | |
| pack-priv String | |
| public Context | getReferralContext()
Implements abstract javax. Gets a context at which to continue processing. |
| public Context | getReferralContext(Hashtable<?, ?> newProps)
Implements abstract javax. Gets a context at which to continue processing. |
| public Context | getReferralContext(Hashtable<?, ?> newProps, Control[] connCtls)
Implements abstract javax. Gets a context at which to continue processing. |
| public Object | getReferralInfo()
Implements abstract javax. Gets referral information. |
| pack-priv boolean | |
| pack-priv boolean | |
| public void | retryReferral()
Implements abstract javax. Marks the current referral as one to be retried. |
| pack-priv void | setHopCount(int hopCount)
Sets the counter which records the number of hops that result from following a sequence of referrals. |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| public boolean | skipReferral()
Implements abstract javax. Marks the current referral as one to be ignored. |
| debug | back to summary |
|---|---|
| private boolean debug | |
| envprops | back to summary |
|---|---|
| private Hashtable<?, ?> envprops | |
| errorEx | back to summary |
|---|---|
| private NamingException errorEx | |
| foundEntry | back to summary |
|---|---|
| private boolean foundEntry | |
| handleReferrals | back to summary |
|---|---|
| private int handleReferrals | |
| hopCount | back to summary |
|---|---|
| private int hopCount | |
| newRdn | back to summary |
|---|---|
| private String newRdn | |
| nextName | back to summary |
|---|---|
| private String nextName | |
| nextReferralEx | back to summary |
|---|---|
| pack-priv LdapReferralException nextReferralEx | |
| referralCount | back to summary |
|---|---|
| private int referralCount | |
| referralIndex | back to summary |
|---|---|
| private int referralIndex | |
| referrals | back to summary |
|---|---|
| private Vector<?> referrals | |
| reqCtls | back to summary |
|---|---|
| private Control[] reqCtls | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides javax. | |
| skipThisReferral | back to summary |
|---|---|
| private boolean skipThisReferral | |
| LdapReferralException | back to summary |
|---|---|
| pack-priv LdapReferralException(Name resolvedName, Object resolvedObj, Name remainingName, String explanation, Hashtable<?, ?> envprops, String nextName, int handleReferrals, Control[] reqCtls) Constructs a new instance of LdapReferralException. | |
| appendUnprocessedReferrals | back to summary |
|---|---|
| pack-priv LdapReferralException appendUnprocessedReferrals(LdapReferralException back) Appends the supplied (chain of) referral exception onto the end of the current (chain of) referral exception. Spent referral exceptions are trimmed off. | |
| dump | back to summary |
|---|---|
| pack-priv void dump() Display the state of each element in a chain of LdapReferralException objects. | |
| dumpState | back to summary |
|---|---|
| private void dumpState() Display the state of this LdapReferralException object. | |
| getNamingException | back to summary |
|---|---|
| pack-priv NamingException getNamingException() Gets the exception generated while processing a referral. | |
| getNewRdn | back to summary |
|---|---|
| pack-priv String getNewRdn() Gets the new RDN name. | |
| getNextReferral | back to summary |
|---|---|
| pack-priv String getNextReferral() throws ReferralException Gets the next referral. When the current set of referrals have been exhausted then the next referral exception is thrown, if available. | |
| getReferralContext | back to summary |
|---|---|
| public Context getReferralContext() throws NamingException Implements abstract javax. Gets a context at which to continue processing. The current environment properties are re-used.
| |
| getReferralContext | back to summary |
|---|---|
| public Context getReferralContext(Hashtable<?, ?> newProps) throws NamingException Implements abstract javax. Gets a context at which to continue processing. The supplied environment properties are used.
| |
| getReferralContext | back to summary |
|---|---|
| public Context getReferralContext(Hashtable<?, ?> newProps, Control[] connCtls) throws NamingException Implements abstract javax. Gets a context at which to continue processing. The supplied environment properties and connection controls are used.
| |
| getReferralInfo | back to summary |
|---|---|
| public Object getReferralInfo() Implements abstract javax. Gets referral information. | |
| hasMoreReferralExceptions | back to summary |
|---|---|
| pack-priv boolean hasMoreReferralExceptions() Tests if there are any referral exceptions remaining to be processed. | |
| hasMoreReferrals | back to summary |
|---|---|
| pack-priv boolean hasMoreReferrals() Tests if there are any referrals remaining to be processed. If name resolution has already completed then any remaining referrals (in the current referral exception) will be ignored. | |
| retryReferral | back to summary |
|---|---|
| public void retryReferral() Implements abstract javax. Marks the current referral as one to be retried. | |
| setHopCount | back to summary |
|---|---|
| pack-priv void setHopCount(int hopCount) Sets the counter which records the number of hops that result from following a sequence of referrals. | |
| setNameResolved | back to summary |
|---|---|
| pack-priv void setNameResolved(boolean resolved) Sets the flag to indicate that the target name has been resolved. | |
| setNamingException | back to summary |
|---|---|
| pack-priv void setNamingException(NamingException e) Sets the exception generated while processing a referral. Only the first exception is recorded. | |
| setNewRdn | back to summary |
|---|---|
| pack-priv void setNewRdn(String newRdn) Sets the new RDN name so that the rename operation can be completed (when a referral is being followed). | |
| setReferralInfo | back to summary |
|---|---|
| pack-priv void setReferralInfo(Vector<?> referrals, boolean continuationRef) Sets referral information. | |
| skipReferral | back to summary |
|---|---|
| public boolean skipReferral() Implements abstract javax. Marks the current referral as one to be ignored. Returns false when there are no referrals remaining to be processed. | |