|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--dtw.webmail.directory.ContextPool
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.
DirContext| Constructor Summary | |
ContextPool(int size,
java.lang.String url)
Constructs a DirContextPool instance. |
|
ContextPool(int size,
java.lang.String url,
java.lang.String username,
java.lang.String password)
Constructs a DirContextPool instance. |
|
| Method Summary | |
void |
clear()
Removes all DirContext references from this pool. |
java.lang.String |
getBaseFilter()
|
int |
getCeiling()
Returns the ceiling (in terms of size) of this pool. |
java.lang.String[] |
getResultAttributes()
|
java.lang.String |
getSearchName()
|
protected void |
initPool()
Initializes a pool of DirContext instances. |
javax.naming.directory.DirContext |
leaseContext()
Returns a leased DirContext instance from this pool. |
void |
releaseContext(javax.naming.directory.DirContext ctx)
Releases a formerly leased DirContext, returning it into this pool. |
void |
resize(int size)
Resizes the pool. |
void |
setBaseFilter(java.lang.String filter)
|
void |
setResultAttributes(java.lang.String[] atts)
|
void |
setSearchName(java.lang.String sname)
|
int |
size()
Returns the size of this pool. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ContextPool(int size,
java.lang.String url)
size - the size of the pool as int.url - the URL specifying the directory context as String.
public ContextPool(int size,
java.lang.String url,
java.lang.String username,
java.lang.String password)
size - the size of the pool as int.url - the URL specifying the directory context as String.username - the username to be used for authentication as String.password - the password to be used for authentication as String.| Method Detail |
public javax.naming.directory.DirContext leaseContext()
public void releaseContext(javax.naming.directory.DirContext ctx)
ctx - the formerly leased DirContext
to be released.public int getCeiling()
public int size()
public void resize(int size)
size - the new size as int.public void clear()
public java.lang.String getSearchName()
public void setSearchName(java.lang.String sname)
public java.lang.String getBaseFilter()
public void setBaseFilter(java.lang.String filter)
public java.lang.String[] getResultAttributes()
public void setResultAttributes(java.lang.String[] atts)
protected void initPool()
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||