public abstract class AbstractServletSearchExecutor extends java.lang.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 org.slf4j.Logger |
logger
Logger for this class.
|
private static java.lang.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 java.util.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 java.lang.String POOL_TYPE
protected final org.slf4j.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 java.util.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,
java.io.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 searchjava.io.IOException - if an error occurs writing to the responseprotected abstract void writeResponse(SearchResult result, javax.servlet.http.HttpServletResponse response) throws java.io.IOException
result - search result to writeresponse - to write tojava.io.IOException - if an error occurs writing to the responsepublic void close()
ServletSearchExecutorclose in interface ServletSearchExecutor