public class PagedResultsRequestControl extends AbstractRequestControlDirContextProcessor
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
).log
Constructor and Description |
---|
PagedResultsRequestControl(int pageSize)
Deprecated.
Constructs a new instance.
|
PagedResultsRequestControl(int pageSize,
PagedResultsCookie cookie)
Deprecated.
Constructs a new instance with the supplied page size and cookie.
|
Modifier and Type | Method and Description |
---|---|
Control |
createRequestControl()
Deprecated.
Create an instance of the appropriate RequestControl.
|
PagedResultsCookie |
getCookie()
Deprecated.
Get the cookie.
|
int |
getPageSize()
Deprecated.
Get the page size.
|
int |
getResultSize()
Deprecated.
Get the total estimated number of entries that matches the issued search.
|
void |
postProcess(DirContext ctx)
Deprecated.
Perform post-processing on the supplied
DirContext . |
void |
setRequestControlClass(Class requestControlClass)
Deprecated.
|
void |
setResponseControlClass(Class responseControlClass)
Deprecated.
Set the class of the expected ResponseControl for the paged results
response.
|
isReplaceSameControlEnabled, preProcess, setReplaceSameControlEnabled
public PagedResultsRequestControl(int pageSize)
pageSize
- the page size.public PagedResultsRequestControl(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 void setResponseControlClass(Class responseControlClass)
responseControlClass
- Class of the expected response control.public void setRequestControlClass(Class requestControlClass)
public Control createRequestControl()
AbstractRequestControlDirContextProcessor
createRequestControl
in class AbstractRequestControlDirContextProcessor
public void postProcess(DirContext ctx) throws NamingException
DirContextProcessor
DirContext
.ctx
- the DirContext
instance.NamingException
- if thrown by the underlying operation.