org.springframework.ldap.control
Class SortControlDirContextProcessor
java.lang.Object
org.springframework.ldap.control.AbstractRequestControlDirContextProcessor
org.springframework.ldap.control.AbstractFallbackRequestAndResponseControlDirContextProcessor
org.springframework.ldap.control.SortControlDirContextProcessor
- All Implemented Interfaces:
- DirContextProcessor
public class SortControlDirContextProcessor
- extends AbstractFallbackRequestAndResponseControlDirContextProcessor
DirContextProcessor implementation for managing the SortControl. Note that
this class is stateful, so a new instance needs to be instantiated for each
new search.
- Author:
- Ulrik Sandberg
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SortControlDirContextProcessor
public SortControlDirContextProcessor(String sortKey)
- Constructs a new instance using the supplied sort key.
- Parameters:
sortKey
- the sort key, i.e. the attribute name to sort on.
isSorted
public boolean isSorted()
- Check whether the returned values were actually sorted by the server.
- Returns:
true
if the result was sorted, false
otherwise.
getResultCode
public int getResultCode()
- Get the result code returned by the control.
- Returns:
- result code.
getSortKey
public String getSortKey()
- Get the sort key.
- Returns:
- the sort key.
createRequestControl
public Control createRequestControl()
- Description copied from class:
AbstractRequestControlDirContextProcessor
- Create an instance of the appropriate RequestControl.
- Specified by:
createRequestControl
in class AbstractRequestControlDirContextProcessor
- Returns:
- the new instance.
handleResponse
protected void handleResponse(Object control)
- Specified by:
handleResponse
in class AbstractFallbackRequestAndResponseControlDirContextProcessor