public abstract class AbstractServletSearchExecutor extends Object implements ServletSearchExecutor
PooledConnectionFactory and SearchExecutor to perform search operations. These objects are
configured from properties found in the servlet configuration.| Modifier and Type | Field and Description |
|---|---|
private PooledConnectionFactory |
connectionFactory
Connections for searching.
|
protected Logger |
logger
Logger for this class.
|
private static String |
POOL_TYPE
Type of pool used, value is "poolType".
|
private SearchExecutor |
searchExecutor
Search executor for storing search properties.
|
| Constructor and Description |
|---|
AbstractServletSearchExecutor() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes any resources associated with this servlet search executor.
|
protected static Properties |
createProperties(javax.servlet.ServletConfig config)
Returns context specific properties based on the supplied JAAS options.
|
void |
initialize(javax.servlet.ServletConfig config)
Prepares this servlet search executor for use.
|
void |
search(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Reads parameters from the request, performs an ldap search, and writes the result to the response.
|
protected abstract void |
writeResponse(SearchResult result,
javax.servlet.http.HttpServletResponse response)
Writes the supplied search result to the servlet response output stream.
|
private static final String POOL_TYPE
protected final Logger logger
private PooledConnectionFactory connectionFactory
private SearchExecutor searchExecutor
public void initialize(javax.servlet.ServletConfig config)
ServletSearchExecutorinitialize in interface ServletSearchExecutorconfig - to initialize this object withprotected static Properties createProperties(javax.servlet.ServletConfig config)
config - to read properties frompublic void search(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws LdapException,
IOException
ServletSearchExecutorsearch in interface ServletSearchExecutorrequest - servlet request to read search parameters fromresponse - servlet response to write ldap search result toLdapException - if an error occurs performing the searchIOException - if an error occurs writing to the responseprotected abstract void writeResponse(SearchResult result, javax.servlet.http.HttpServletResponse response) throws IOException
result - search result to writeresponse - to write toIOException - if an error occurs writing to the responsepublic void close()
ServletSearchExecutorclose in interface ServletSearchExecutorCopyright © 2003-2019 Virginia Tech. All Rights Reserved.