|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.vt.middleware.ldap.LdapSearch
public class LdapSearch
LdapSearch queries an LDAP and returns the result. Each instance
of LdapSearch maintains it's own pool of LDAP connections.
| Field Summary | |
|---|---|
protected LdapBeanFactory |
beanFactory
Ldap bean factory. |
protected org.apache.commons.logging.Log |
logger
Log for this class. |
protected LdapPool<Ldap> |
pool
Ldap object to use for searching. |
| Constructor Summary | |
|---|---|
LdapSearch(LdapPool<Ldap> pool)
This creates a new LdapSearch with the supplied pool. |
|
| Method Summary | |
|---|---|
void |
close()
Empties the underlying ldap pool, closing all connections. |
protected void |
finalize()
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. |
LdapBeanFactory |
getLdapBeanFactory()
Returns the factory for creating ldap beans. |
Iterator<SearchResult> |
search(String query,
String[] attrs)
This will perform an LDAP search with the supplied query and return attributes. |
void |
search(String query,
String[] attrs,
Writer writer)
This will perform an LDAP search with the supplied query and return attributes. |
void |
setLdapBeanFactory(LdapBeanFactory lbf)
Sets the factory for creating ldap beans. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final org.apache.commons.logging.Log logger
protected LdapPool<Ldap> pool
protected LdapBeanFactory beanFactory
| Constructor Detail |
|---|
public LdapSearch(LdapPool<Ldap> pool)
LdapSearch with the supplied pool.
pool - LdapPool| Method Detail |
|---|
public LdapBeanFactory getLdapBeanFactory()
LdapBeanFactorypublic void setLdapBeanFactory(LdapBeanFactory lbf)
lbf - LdapBeanFactory
public Iterator<SearchResult> search(String query,
String[] attrs)
throws NamingException
query - String to search forattrs - String[] to return
Iterator of search results
NamingException - if an error occurs while searching
public void search(String query,
String[] attrs,
Writer writer)
throws NamingException,
IOException
Writer.
query - String to search forattrs - String[] to returnwriter - Writer to write to
NamingException - if an error occurs while searching
IOException - if an error occurs while writing search resultspublic void close()
LdapPool.close().
protected void finalize()
throws Throwable
finalize in class ObjectThrowable - if an exception is thrown by this method
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||