|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectno.feide.moria.directory.backend.JNDIBackendFactory
public class JNDIBackendFactory
Factory class for JNDI backends.
Field Summary | |
---|---|
private int |
backendTimeouts
The number of seconds before a backend connection times out. |
private java.lang.String |
guessedAttribute
The name of the attribute used to guess the user element's (R)DN, if it cannot be found by searching. |
private java.lang.String |
usernameAttribute
The name of the attribute containing the username. |
private boolean |
useSSL
Whether the backend should use SSL. |
Constructor Summary | |
---|---|
JNDIBackendFactory()
|
Method Summary | |
---|---|
DirectoryManagerBackend |
createBackend(java.lang.String sessionTicket)
Creates a new JNDIBackend instance. |
void |
setConfig(org.jdom.Element config)
Sets the factory-specific configuration. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private int backendTimeouts
private boolean useSSL
false
.
private java.lang.String usernameAttribute
private java.lang.String guessedAttribute
Constructor Detail |
---|
public JNDIBackendFactory()
Method Detail |
---|
public final void setConfig(org.jdom.Element config) throws DirectoryManagerConfigurationException
Security
element) is likely to cause any open backend
connections to fail.
setConfig
in interface DirectoryManagerBackendFactory
config
- The configuration for this backend factory. The root node must
be a JNDI
element, containing an optional
Security
element, which in turn may contain an
optional Truststore
element. If the
Truststore
exists, it must contain the
attributes filename
and password
,
giving the truststore file location and password,
respectively. The JNDI
element may contain an
optional attribute timeout
, which gives the
number of seconds before a backend connection should time out.
If this value is a negative number, the timeout value will be
set to zero (meaning the connection will never time out).
Also, the JNDI
element may contain an attribute
guessedAttribute
, which should give the name
of an attribute used to construct "guessed" user element
(R)DNs if the actual element cannot be found by searching (the
default value is uid
). Finally the
JNDI
element must contain an attribute
usernameAttribute
, which should give the name
of the attribute holding the username.
java.lang.IllegalArgumentException
- If config
is null.
DirectoryManagerConfigurationException
- If the configuration element is not a JNDI
Backend
element, or if the optional Truststore
element
is found, but without either of the filename
or password
attributes. Also thrown if the
timeout
attribute contains an illegal timeout
value, if the username
attribute does not
exist, if the guess
attribute does not exist,
or if the filename
file does not exist.DirectoryManagerBackendFactory.setConfig(Element)
public final DirectoryManagerBackend createBackend(java.lang.String sessionTicket)
JNDIBackend
instance.
createBackend
in interface DirectoryManagerBackendFactory
sessionTicket
- The session ticket passed on to instances of
DirectoryManagerBackend
(actually
JNDIBackend
instances) for logging purposes.
May be null
or an empty string.
DirectoryManagerBackendFactory.createBackend(String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |