Package org.springframework.ldap.control
Class PagedResultsRequestControl
- java.lang.Object
-
- org.springframework.ldap.control.AbstractRequestControlDirContextProcessor
-
- org.springframework.ldap.control.PagedResultsRequestControl
-
- All Implemented Interfaces:
DirContextProcessor
public class PagedResultsRequestControl extends AbstractRequestControlDirContextProcessor
Deprecated.Use PagedResultsDirContextProcessor instead.DirContextProcessor implementation for managing the paged results control. Note that due to the internal workings ofLdapTemplate
, 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 theSingleContextSource
implementation or make sure all calls happen within a single LDAP transaction (usingContextSourceTransactionManager
).
-
-
Field Summary
-
Fields inherited from class org.springframework.ldap.control.AbstractRequestControlDirContextProcessor
log
-
-
Constructor Summary
Constructors Constructor 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description javax.naming.ldap.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(javax.naming.directory.DirContext ctx)
Deprecated.Perform post-processing on the suppliedDirContext
.void
setRequestControlClass(java.lang.Class requestControlClass)
Deprecated.void
setResponseControlClass(java.lang.Class responseControlClass)
Deprecated.Set the class of the expected ResponseControl for the paged results response.-
Methods inherited from class org.springframework.ldap.control.AbstractRequestControlDirContextProcessor
isReplaceSameControlEnabled, preProcess, setReplaceSameControlEnabled
-
-
-
-
Constructor Detail
-
PagedResultsRequestControl
public PagedResultsRequestControl(int pageSize)
Deprecated.Constructs a new instance. This constructor should be used when performing the first paged search operation, when no other results have been retrieved.- Parameters:
pageSize
- the page size.
-
PagedResultsRequestControl
public PagedResultsRequestControl(int pageSize, PagedResultsCookie cookie)
Deprecated.Constructs a new instance with the supplied page size and cookie. The cookie must be the exact same instance as received from a previous paged resullts search, ornull
if it is the first in an operation sequence.- Parameters:
pageSize
- the page size.cookie
- the cookie, as received from a previous search.
-
-
Method Detail
-
getCookie
public PagedResultsCookie getCookie()
Deprecated.Get the cookie.- Returns:
- the cookie.
-
getPageSize
public int getPageSize()
Deprecated.Get the page size.- Returns:
- the page size.
-
getResultSize
public int getResultSize()
Deprecated.Get the total estimated number of entries that matches the issued search. Note that this value is optional for the LDAP server to return, so it does not always contain any valid data.- Returns:
- the estimated result size, if returned from the server.
-
setResponseControlClass
public void setResponseControlClass(java.lang.Class responseControlClass)
Deprecated.Set the class of the expected ResponseControl for the paged results response.- Parameters:
responseControlClass
- Class of the expected response control.
-
setRequestControlClass
public void setRequestControlClass(java.lang.Class requestControlClass)
Deprecated.
-
createRequestControl
public javax.naming.ldap.Control createRequestControl()
Deprecated.Description copied from class:AbstractRequestControlDirContextProcessor
Create an instance of the appropriate RequestControl.- Specified by:
createRequestControl
in classAbstractRequestControlDirContextProcessor
- Returns:
- the new instance.
-
postProcess
public void postProcess(javax.naming.directory.DirContext ctx) throws javax.naming.NamingException
Deprecated.Description copied from interface:DirContextProcessor
Perform post-processing on the suppliedDirContext
.- Parameters:
ctx
- theDirContext
instance.- Throws:
javax.naming.NamingException
- if thrown by the underlying operation.
-
-