Package com.netscape.jndi.ldap
Class ContextEnv
java.lang.Object
com.netscape.jndi.ldap.common.ShareableEnv
com.netscape.jndi.ldap.ContextEnv
- All Implemented Interfaces:
Cloneable
Context Environment
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static classImplementation for LDAPRebind interface. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final intstatic final intstatic final intstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final StringFields inherited from class com.netscape.jndi.ldap.common.ShareableEnv
m_parentEnv, m_parentSharedEnvIdx, m_privateEnv, m_sharedEnv -
Constructor Summary
ConstructorsConstructorDescriptionContextEnv(ShareableEnv parent, int parentSharedEnvIdx) Constructor for non root ContextsContextEnv(Hashtable<Object, Object> initialEnv) Constructor for the root context -
Method Summary
Modifier and TypeMethodDescriptionclone()Clone ShareableEnv The code is the same as in the superclass (ShareableEnv) except that a ContextEnv instance is returned(package private) booleanFlag whether search operation should return attribute names only (no values).(package private) ObjectGet cipher suite for the socket factory(package private) LDAPControl[]Get controls to be used during a connection request like ProxyAuth(package private) booleanFlag whether rename operation should delete old RDN Read environment property P_ATTRS_ONLY.(package private) LDAPUrlGet the Directory Server URL(package private) intGet Ldap Version.(package private) charA user defined value for the separator for JNDI References.(package private) StringReturn DN to be used for sasl auth.(package private) ObjectReturn the callback object for sasl, if specified(package private) String[]Check if sasl auth mode is requested.Returned all sasl properties (startwith javax.security.sasl) except AUTHID and CALLBACK, as a Hashtable.(package private) StringGet full qualified socket factory class name(package private) String[]A user defined list of names of binary attributes.(package private) StringGet user authenticate name(package private) StringGet user authenticate password(package private) booleanCheck if referrals are to be ignored(package private) booleanCheck if SSL mode is enabled(package private) voidSet the suggested number of result to return at a time during search in the default SearchConstraints for the connection.(package private) final voidSet how aliases should be dereferenced under default SearchConstraints for the connection.(package private) voidSet the maximum number of search results to be returned under default SearchConstraints for the connection.(package private) ObjectupdateProperty(String name, Object val, LDAPSearchConstraints cons) Update property value.(package private) voidSet maximal number of referral hops under default SearchConstraints for the connection.(package private) voidSet referral parameters for the default SearchConstraints for the connection.(package private) voidInitialize LDAPSearchConstraints with environment properties(package private) voidSet the maximum number of milliseconds to wait for any operation under default SearchConstraints for the connection.Methods inherited from class com.netscape.jndi.ldap.common.ShareableEnv
freezeUpdates, getAllProperties, getProperty, main, removeProperty, setProperty, toString
-
Field Details
-
DEFAULT_HOST
- See Also:
-
DEFAULT_PORT
public static final int DEFAULT_PORT- See Also:
-
DEFAULT_SSL_PORT
public static final int DEFAULT_SSL_PORT- See Also:
-
DEFAULT_LDAP_VERSION
public static final int DEFAULT_LDAP_VERSION- See Also:
-
P_PROVIDER_URL
- See Also:
-
P_SECURITY_PROTOCOL
- See Also:
-
P_SECURITY_AUTHMODE
- See Also:
-
P_USER_DN
- See Also:
-
P_USER_PASSWORD
- See Also:
-
P_AUTHORITATIVE
- See Also:
-
P_LANGUAGE
- See Also:
-
P_BATCHSIZE
- See Also:
-
P_REFERRAL_MODE
- See Also:
-
P_CONNECT_CTRLS
- See Also:
-
P_BINARY_ATTRS
- See Also:
-
P_ATTRS_ONLY
- See Also:
-
P_DELETE_OLDRDN
- See Also:
-
P_SOCKET_FACTORY
- See Also:
-
P_CIPHER_SUITE
- See Also:
-
P_TIME_LIMIT
- See Also:
-
P_MAX_RESULTS
- See Also:
-
P_DEREF_ALIASES
- See Also:
-
P_REFERRAL_HOPLIMIT
- See Also:
-
P_LDAP_VERSION
- See Also:
-
P_JNDIREF_SEPARATOR
- See Also:
-
P_SASL_AUTHID
- See Also:
-
P_SASL_CALLBACK
- See Also:
-
P_SASL_PKGS
- See Also:
-
SASL_PROP_PREFIX
- See Also:
-
P_TRACE
- See Also:
-
V_REFERRAL_FOLLOW
- See Also:
-
V_REFERRAL_IGNORE
- See Also:
-
V_REFERRAL_THROW_EXCEPTION
- See Also:
-
V_DEREF_NEVER
- See Also:
-
V_DEREF_SEARCHING
- See Also:
-
V_DEREF_FINDING
- See Also:
-
V_DEREF_ALWAYS
- See Also:
-
V_AUTH_NONE
- See Also:
-
V_AUTH_SIMPLE
- See Also:
-
-
Constructor Details
-
ContextEnv
Constructor for the root context- Parameters:
initialEnv- a hashtable with environemnt properties
-
Method Details
-
clone
Clone ShareableEnv The code is the same as in the superclass (ShareableEnv) except that a ContextEnv instance is returned- Overrides:
clonein classShareableEnv- Returns:
- A "clone" of the current context environment
-
updateProperty
Update property value. Properties that pertain to LDAPSearchConstraints are immediately propagated. To take effect of properties that are connection related, (like user name/password, ssl mode) the context mujst be reconnected after the change of environment- Throws:
NamingException
-
updateSearchCons
Initialize LDAPSearchConstraints with environment properties- Throws:
NamingException
-
updateBatchSize
Set the suggested number of result to return at a time during search in the default SearchConstraints for the connection. Specified with the env property java.naming.batchsize -
updateTimeLimit
Set the maximum number of milliseconds to wait for any operation under default SearchConstraints for the connection. Specified with the env property java.naming.ldap.timelimit Note: sun ldap does not have this property -
updateMaxResults
Set the maximum number of search results to be returned under default SearchConstraints for the connection. Specified with the env property java.naming.ldap.maxresults Note: sun ldap does not have this property -
updateDerefAliases
Set how aliases should be dereferenced under default SearchConstraints for the connection. Specified with the env property java.naming.ldap.derefAliases- Throws:
IllegalArgumentException
-
updateReferralMode
Set referral parameters for the default SearchConstraints for the connection. Specified with the env property java.naming.referral -
ignoreReferralsMode
boolean ignoreReferralsMode()Check if referrals are to be ignored -
updateReferralHopLimit
Set maximal number of referral hops under default SearchConstraints for the connection. Specified with the env property java.naming.referral.limit- Throws:
IllegalArgumentException
-
isSSLEnabled
Check if SSL mode is enabled- Throws:
NamingException
-
getDirectoryServerURL
Get the Directory Server URL- Throws:
NamingException
-
getLdapVersion
Get Ldap Version. If not specified the default is version 3- Throws:
NamingException
-
getUserDN
String getUserDN()Get user authenticate name -
getUserPassword
String getUserPassword()Get user authenticate password -
getSocketFactory
String getSocketFactory()Get full qualified socket factory class name -
getCipherSuite
Object getCipherSuite()Get cipher suite for the socket factory -
getConnectControls
Get controls to be used during a connection request like ProxyAuth- Throws:
NamingException
-
getAttrsOnlyFlag
boolean getAttrsOnlyFlag()Flag whether search operation should return attribute names only (no values). Read environment property P_ATTRS_ONLY. If not defined FALSE is returned (return attribute values by default) -
getDeleteOldRDNFlag
boolean getDeleteOldRDNFlag()Flag whether rename operation should delete old RDN Read environment property P_ATTRS_ONLY. If not defined TRUE is returned (delete old RDN by default) -
getRefSeparator
A user defined value for the separator for JNDI References. The default value is '#'. Read environment property P_JNDIREF_SEPARATOR.- Throws:
NamingException
-
getUserDefBinaryAttrs
String[] getUserDefBinaryAttrs()A user defined list of names of binary attributes. This list augments the default list of well-known binary attributes. List entries are space separated Read environment property P_BINARY_ATTRS. -
getSaslMechanisms
String[] getSaslMechanisms()Check if sasl auth mode is requested. If the value of auth property is neither of (null, none, or simple) then assume it is a space separated list of sasl mechanis names -
getSaslProps
Returned all sasl properties (startwith javax.security.sasl) except AUTHID and CALLBACK, as a Hashtable. AUTHID and CALLBACK as used directly as parameters to authenticate() -
getSaslAuthId
String getSaslAuthId()Return DN to be used for sasl auth. Check first the P_SASL_AUTHID property, then fallback to P_USERDN if not defined. -
getSaslCallback
Object getSaslCallback()Return the callback object for sasl, if specified
-