|
Spring LDAP | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.ldap.control.AbstractRequestControlDirContextProcessor
org.springframework.ldap.control.AbstractFallbackRequestAndResponseControlDirContextProcessor
org.springframework.ldap.control.PagedResultsDirContextProcessor
public class PagedResultsDirContextProcessor
DirContextProcessor implementation for managing the paged results control.
Note that due to the internal workings of 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
).
Field Summary |
---|
Fields inherited from class org.springframework.ldap.control.AbstractFallbackRequestAndResponseControlDirContextProcessor |
---|
critical, defaultRequestControl, defaultResponseControl, fallbackRequestControl, fallbackResponseControl, requestControlClass, responseControlClass |
Fields inherited from class org.springframework.ldap.control.AbstractRequestControlDirContextProcessor |
---|
log |
Constructor Summary | |
---|---|
PagedResultsDirContextProcessor(int pageSize)
Constructs a new instance. |
|
PagedResultsDirContextProcessor(int pageSize,
PagedResultsCookie cookie)
Constructs a new instance with the supplied page size and cookie. |
Method Summary | |
---|---|
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)
|
boolean |
hasMore()
Check whether there are more results to retrieved. |
Methods inherited from class org.springframework.ldap.control.AbstractFallbackRequestAndResponseControlDirContextProcessor |
---|
createRequestControl, invokeMethod, loadControlClasses, postProcess, setCritical, setRequestControlClass, setResponseControlClass |
Methods inherited from class org.springframework.ldap.control.AbstractRequestControlDirContextProcessor |
---|
isReplaceSameControlEnabled, preProcess, setReplaceSameControlEnabled |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
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.Method Detail |
---|
public PagedResultsCookie getCookie()
null
, indicating that there are no more results, in which case hasMore()
will return
false
.hasMore()
public int getPageSize()
public int getResultSize()
public Control createRequestControl()
AbstractRequestControlDirContextProcessor
createRequestControl
in class AbstractRequestControlDirContextProcessor
public boolean hasMore()
null
cookie being returned from the server.
When this happen, the internal status will set to false.
true
if there are more results to retrieve, false
otherwise.protected void handleResponse(Object control)
handleResponse
in class AbstractFallbackRequestAndResponseControlDirContextProcessor
|
Spring LDAP | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |