public class PagedResultsDirContextProcessor extends AbstractFallbackRequestAndResponseControlDirContextProcessor
LdapTemplate
, the
target connection is closed after each LDAP call. The PagedResults control
require the same connection be used for each call, which means we need to
make sure the target connection is never actually closed. There's basically
two ways of making this happen: use the SingleContextSource
implementation or make sure all calls happen within a single LDAP transaction
(using ContextSourceTransactionManager
).critical, defaultRequestControl, defaultResponseControl, fallbackRequestControl, fallbackResponseControl, requestControlClass, responseControlClass
log
Constructor and Description |
---|
PagedResultsDirContextProcessor(int pageSize)
Constructs a new instance.
|
PagedResultsDirContextProcessor(int pageSize,
PagedResultsCookie cookie)
Constructs a new instance with the supplied page size and cookie.
|
Modifier and Type | Method and Description |
---|---|
Control |
createRequestControl()
Create an instance of the appropriate RequestControl.
|
PagedResultsCookie |
getCookie()
Get the cookie.
|
int |
getPageSize()
Get the page size.
|
int |
getResultSize()
Get the total estimated number of entries that matches the issued search.
|
protected void |
handleResponse(Object control) |
createRequestControl, invokeMethod, loadControlClasses, postProcess, setRequestControlClass, setResponseControlClass
isReplaceSameControlEnabled, preProcess, setReplaceSameControlEnabled
public PagedResultsDirContextProcessor(int pageSize)
pageSize
- the page size.public PagedResultsDirContextProcessor(int pageSize, PagedResultsCookie cookie)
null
if it is the first in an operation
sequence.pageSize
- the page size.cookie
- the cookie, as received from a previous search.public PagedResultsCookie getCookie()
public int getPageSize()
public int getResultSize()
public Control createRequestControl()
AbstractRequestControlDirContextProcessor
createRequestControl
in class AbstractRequestControlDirContextProcessor
protected void handleResponse(Object control)
handleResponse
in class AbstractFallbackRequestAndResponseControlDirContextProcessor
Copyright © 2005-2012 The Spring LDAP Framework. All Rights Reserved.