javax.naming.ldap
Class LdapReferralException

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.lang.Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable 
      extended by java.lang.Exception sample code for java.lang.Exception definition code for java.lang.Exception 
          extended by javax.naming.NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException 
              extended by javax.naming.ReferralException sample code for javax.naming.ReferralException definition code for javax.naming.ReferralException 
                  extended by javax.naming.ldap.LdapReferralException
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable

public abstract class LdapReferralException
extends ReferralException sample code for javax.naming.ReferralException definition code for javax.naming.ReferralException

This abstract class is used to represent an LDAP referral exception. It extends the base ReferralException by providing a getReferralContext() method that accepts request controls. LdapReferralException is an abstract class. Concrete implementations of it determine its synchronization and serialization properties.

A Control[] array passed as a parameter to the getReferralContext() method is owned by the caller. The service provider will not modify the array or keep a reference to it, although it may keep references to the individual Control objects in the array.

Since:
1.3
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.naming.NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException
remainingName sample code for javax.naming.NamingException.remainingName definition code for javax.naming.NamingException.remainingName , resolvedName sample code for javax.naming.NamingException.resolvedName definition code for javax.naming.NamingException.resolvedName , resolvedObj sample code for javax.naming.NamingException.resolvedObj definition code for javax.naming.NamingException.resolvedObj , rootException sample code for javax.naming.NamingException.rootException definition code for javax.naming.NamingException.rootException
 
Constructor Summary
protected LdapReferralException sample code for javax.naming.ldap.LdapReferralException.LdapReferralException() definition code for javax.naming.ldap.LdapReferralException.LdapReferralException() ()
          Constructs a new instance of LdapReferralException.
protected LdapReferralException sample code for javax.naming.ldap.LdapReferralException.LdapReferralException(java.lang.String) definition code for javax.naming.ldap.LdapReferralException.LdapReferralException(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  explanation)
          Constructs a new instance of LdapReferralException using the explanation supplied.
 
Method Summary
abstract  Context sample code for javax.naming.Context definition code for javax.naming.Context getReferralContext sample code for javax.naming.ldap.LdapReferralException.getReferralContext() definition code for javax.naming.ldap.LdapReferralException.getReferralContext() ()
          Retrieves the context at which to continue the method using the context's environment and no controls.
abstract  Context sample code for javax.naming.Context definition code for javax.naming.Context getReferralContext sample code for javax.naming.ldap.LdapReferralException.getReferralContext(java.util.Hashtable) definition code for javax.naming.ldap.LdapReferralException.getReferralContext(java.util.Hashtable) (Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable <?,?> env)
          Retrieves the context at which to continue the method using environment properties and no controls.
abstract  Context sample code for javax.naming.Context definition code for javax.naming.Context getReferralContext sample code for javax.naming.ldap.LdapReferralException.getReferralContext(java.util.Hashtable, javax.naming.ldap.Control[]) definition code for javax.naming.ldap.LdapReferralException.getReferralContext(java.util.Hashtable, javax.naming.ldap.Control[]) (Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable <?,?> env, Control sample code for javax.naming.ldap.Control definition code for javax.naming.ldap.Control [] reqCtls)
          Retrieves the context at which to continue the method using request controls and environment properties.
 
Methods inherited from class javax.naming.ReferralException sample code for javax.naming.ReferralException definition code for javax.naming.ReferralException
getReferralInfo sample code for javax.naming.ReferralException.getReferralInfo() definition code for javax.naming.ReferralException.getReferralInfo() , retryReferral sample code for javax.naming.ReferralException.retryReferral() definition code for javax.naming.ReferralException.retryReferral() , skipReferral sample code for javax.naming.ReferralException.skipReferral() definition code for javax.naming.ReferralException.skipReferral()
 
Methods inherited from class javax.naming.NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException
appendRemainingComponent sample code for javax.naming.NamingException.appendRemainingComponent(java.lang.String) definition code for javax.naming.NamingException.appendRemainingComponent(java.lang.String) , appendRemainingName sample code for javax.naming.NamingException.appendRemainingName(javax.naming.Name) definition code for javax.naming.NamingException.appendRemainingName(javax.naming.Name) , getCause sample code for javax.naming.NamingException.getCause() definition code for javax.naming.NamingException.getCause() , getExplanation sample code for javax.naming.NamingException.getExplanation() definition code for javax.naming.NamingException.getExplanation() , getRemainingName sample code for javax.naming.NamingException.getRemainingName() definition code for javax.naming.NamingException.getRemainingName() , getResolvedName sample code for javax.naming.NamingException.getResolvedName() definition code for javax.naming.NamingException.getResolvedName() , getResolvedObj sample code for javax.naming.NamingException.getResolvedObj() definition code for javax.naming.NamingException.getResolvedObj() , getRootCause sample code for javax.naming.NamingException.getRootCause() definition code for javax.naming.NamingException.getRootCause() , initCause sample code for javax.naming.NamingException.initCause(java.lang.Throwable) definition code for javax.naming.NamingException.initCause(java.lang.Throwable) , setRemainingName sample code for javax.naming.NamingException.setRemainingName(javax.naming.Name) definition code for javax.naming.NamingException.setRemainingName(javax.naming.Name) , setResolvedName sample code for javax.naming.NamingException.setResolvedName(javax.naming.Name) definition code for javax.naming.NamingException.setResolvedName(javax.naming.Name) , setResolvedObj sample code for javax.naming.NamingException.setResolvedObj(java.lang.Object) definition code for javax.naming.NamingException.setResolvedObj(java.lang.Object) , setRootCause sample code for javax.naming.NamingException.setRootCause(java.lang.Throwable) definition code for javax.naming.NamingException.setRootCause(java.lang.Throwable) , toString sample code for javax.naming.NamingException.toString() definition code for javax.naming.NamingException.toString() , toString sample code for javax.naming.NamingException.toString(boolean) definition code for javax.naming.NamingException.toString(boolean)
 
Methods inherited from class java.lang.Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable
fillInStackTrace sample code for java.lang.Throwable.fillInStackTrace() definition code for java.lang.Throwable.fillInStackTrace() , getLocalizedMessage sample code for java.lang.Throwable.getLocalizedMessage() definition code for java.lang.Throwable.getLocalizedMessage() , getMessage sample code for java.lang.Throwable.getMessage() definition code for java.lang.Throwable.getMessage() , getStackTrace sample code for java.lang.Throwable.getStackTrace() definition code for java.lang.Throwable.getStackTrace() , printStackTrace sample code for java.lang.Throwable.printStackTrace() definition code for java.lang.Throwable.printStackTrace() , printStackTrace sample code for java.lang.Throwable.printStackTrace(java.io.PrintStream) definition code for java.lang.Throwable.printStackTrace(java.io.PrintStream) , printStackTrace sample code for java.lang.Throwable.printStackTrace(java.io.PrintWriter) definition code for java.lang.Throwable.printStackTrace(java.io.PrintWriter) , setStackTrace sample code for java.lang.Throwable.setStackTrace(java.lang.StackTraceElement[]) definition code for java.lang.Throwable.setStackTrace(java.lang.StackTraceElement[])
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

LdapReferralException sample code for javax.naming.ldap.LdapReferralException(java.lang.String) definition code for javax.naming.ldap.LdapReferralException(java.lang.String)

protected LdapReferralException(String sample code for java.lang.String definition code for java.lang.String  explanation)
Constructs a new instance of LdapReferralException using the explanation supplied. All other fields are set to null.

Parameters:
explanation - Additional detail about this exception. Can be null.
See Also:
Throwable.getMessage() sample code for java.lang.Throwable.getMessage() definition code for java.lang.Throwable.getMessage()

LdapReferralException sample code for javax.naming.ldap.LdapReferralException() definition code for javax.naming.ldap.LdapReferralException()

protected LdapReferralException()
Constructs a new instance of LdapReferralException. All fields are set to null.

Method Detail

getReferralContext sample code for javax.naming.ldap.LdapReferralException.getReferralContext() definition code for javax.naming.ldap.LdapReferralException.getReferralContext()

public abstract Context sample code for javax.naming.Context definition code for javax.naming.Context  getReferralContext()
                                    throws NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException 
Retrieves the context at which to continue the method using the context's environment and no controls. The referral context is created using the environment properties of the context that threw the ReferralException and no controls.

This method is equivalent to

 getReferralContext(ctx.getEnvironment(), null);
where ctx is the context that threw the ReferralException.

It is overridden in this class for documentation purposes only. See ReferralException for how to use this method.

Specified by:
getReferralContext sample code for javax.naming.ReferralException.getReferralContext() definition code for javax.naming.ReferralException.getReferralContext() in class ReferralException sample code for javax.naming.ReferralException definition code for javax.naming.ReferralException
Returns:
The non-null context at which to continue the method.
Throws:
NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException - If a naming exception was encountered. Call either retryReferral() or skipReferral() to continue processing referrals.

getReferralContext sample code for javax.naming.ldap.LdapReferralException.getReferralContext(java.util.Hashtable<?, ?>) definition code for javax.naming.ldap.LdapReferralException.getReferralContext(java.util.Hashtable<?, ?>)

public abstract Context sample code for javax.naming.Context definition code for javax.naming.Context  getReferralContext(Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable <?,?> env)
                                    throws NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException 
Retrieves the context at which to continue the method using environment properties and no controls. The referral context is created using env as its environment properties and no controls.

This method is equivalent to

 getReferralContext(env, null);

It is overridden in this class for documentation purposes only. See ReferralException for how to use this method.

Specified by:
getReferralContext sample code for javax.naming.ReferralException.getReferralContext(java.util.Hashtable) definition code for javax.naming.ReferralException.getReferralContext(java.util.Hashtable) in class ReferralException sample code for javax.naming.ReferralException definition code for javax.naming.ReferralException
Parameters:
env - The possibly null environment to use when retrieving the referral context. If null, no environment properties will be used.
Returns:
The non-null context at which to continue the method.
Throws:
NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException - If a naming exception was encountered. Call either retryReferral() or skipReferral() to continue processing referrals.

getReferralContext sample code for javax.naming.ldap.LdapReferralException.getReferralContext(java.util.Hashtable<?, ?>, javax.naming.ldap.Control[]) definition code for javax.naming.ldap.LdapReferralException.getReferralContext(java.util.Hashtable<?, ?>, javax.naming.ldap.Control[])

public abstract Context sample code for javax.naming.Context definition code for javax.naming.Context  getReferralContext(Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable <?,?> env,
                                           Control sample code for javax.naming.ldap.Control definition code for javax.naming.ldap.Control [] reqCtls)
                                    throws NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException 
Retrieves the context at which to continue the method using request controls and environment properties. Regardless of whether a referral is encountered directly during a context operation, or indirectly, for example, during a search enumeration, the referral exception should provide a context at which to continue the operation. To continue the operation, the client program should re-invoke the method using the same arguments as the original invocation.

reqCtls is used when creating the connection to the referred server. These controls will be used as the connection request controls for the context and context instances derived from the context. reqCtls will also be the context's request controls for subsequent context operations. See the LdapContext class description for details.

This method should be used instead of the other two overloaded forms when the caller needs to supply request controls for creating the referral context. It might need to do this, for example, when it needs to supply special controls relating to authentication.

Service provider implementors should read the "Service Provider" section in the LdapContext class description for implementation details.

Parameters:
reqCtls - The possibly null request controls to use for the new context. If null or the empty array means use no request controls.
env - The possibly null environment properties to use when for the new context. If null, the context is initialized with no environment properties.
Returns:
The non-null context at which to continue the method.
Throws:
NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException - If a naming exception was encountered. Call either retryReferral() or skipReferral() to continue processing referrals.