| java.lang.Object dtw.webmail.directory.ContextPool
ContextPool | public class ContextPool (Code) | | Class that implements a pool for DirContext
instances.
Note that each context has a distinct connection, thus
allows to be used concurrently with the other contexts in the pool.
However, a context itself cannot be used concurrently.
author: Dieter Wimberger version: 0.9.7 07/02/2003 See Also: javax.naming.directory.DirContext |
ContextPool | public ContextPool(int size, String url)(Code) | | Constructs a DirContextPool instance.
Parameters: size - the size of the pool as int. Parameters: url - the URL specifying the directory context as String. |
ContextPool | public ContextPool(int size, String url, String username, String password)(Code) | | Constructs a DirContextPool instance.
This instance enables authenticated connections to the directory,
using the given username and password.
Parameters: size - the size of the pool as int. Parameters: url - the URL specifying the directory context as String. Parameters: username - the username to be used for authentication as String. Parameters: password - the password to be used for authentication as String. |
clear | public void clear()(Code) | | Removes all DirContext references from
this pool.
Note that it will do so gracefully, waiting for
leased ProcessingResources.
|
getCeiling | public int getCeiling()(Code) | | Returns the ceiling (in terms of size) of this pool.
the ceiling size of this pool as int. |
getResultAttributes | public String[] getResultAttributes()(Code) | | |
initPool | protected void initPool()(Code) | | Initializes a pool of DirContext instances.
|
leaseContext | public synchronized DirContext leaseContext()(Code) | | Returns a leased DirContext instance from this
pool.
the leased DirContext from this pool. |
releaseContext | public synchronized void releaseContext(DirContext ctx)(Code) | | Releases a formerly leased DirContext, returning
it into this pool.
Parameters: ctx - the formerly leased DirContextto be released. |
resize | public void resize(int size)(Code) | | Resizes the pool.
Parameters: size - the new size as int. |
setResultAttributes | public void setResultAttributes(String[] atts)(Code) | | |
size | public int size()(Code) | | Returns the size of this pool.
the actual size of this pool as int. |
|
|