org.apache.directory.api.ldap.model.message.controls
Class PagedResultsImpl

java.lang.Object
  extended by org.apache.directory.api.ldap.model.message.controls.AbstractControl
      extended by org.apache.directory.api.ldap.model.message.controls.PagedResultsImpl
All Implemented Interfaces:
Control, PagedResults

public class PagedResultsImpl
extends AbstractControl
implements PagedResults

A request/response control used to implement a simple paging of search results. This is an implementation of RFC 2696 : LDAP Control Extension for Simple Paged Results Manipulation

    This control is included in the searchRequest and searchResultDone
    messages as part of the controls field of the LDAPMessage, as defined
    in Section 4.1.12 of [LDAPv3]. The structure of this control is as
    follows:

 pagedResultsControl ::= SEQUENCE {
         controlType     1.2.840.113556.1.4.319,
         criticality     BOOLEAN DEFAULT FALSE,
         controlValue    searchControlValue
 }
 
 The searchControlValue is an OCTET STRING wrapping the BER-encoded
 version of the following SEQUENCE:
 
 realSearchControlValue ::= SEQUENCE {
         size            INTEGER (0..maxInt),
                                 -- requested page size from client
                                 -- result set size estimate from server
         cookie          OCTET STRING
 }
 
 

Author:
Apache Directory Project

Field Summary
 
Fields inherited from interface org.apache.directory.api.ldap.model.message.controls.PagedResults
OID
 
Constructor Summary
PagedResultsImpl()
          Creates a new instance of PagedResultsDecorator.
 
Method Summary
 boolean equals(Object o)
           
 byte[] getCookie()
           
 int getCookieValue()
           
 int getSize()
           
 int hashCode()
           
 void setCookie(byte[] cookie)
          Set the cookie
 void setSize(int size)
          Set the number of entry requested or returned
 String toString()
          Return a String representing this PagedSearchControl.
 
Methods inherited from class org.apache.directory.api.ldap.model.message.controls.AbstractControl
getOid, isCritical, setCritical
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.directory.api.ldap.model.message.Control
getOid, isCritical, setCritical
 

Constructor Detail

PagedResultsImpl

public PagedResultsImpl()
Creates a new instance of PagedResultsDecorator.

Method Detail

getSize

public int getSize()
Specified by:
getSize in interface PagedResults
Returns:
The requested or returned number of entries

setSize

public void setSize(int size)
Description copied from interface: PagedResults
Set the number of entry requested or returned

Specified by:
setSize in interface PagedResults
Parameters:
size - The number of entries

getCookie

public byte[] getCookie()
Specified by:
getCookie in interface PagedResults
Returns:
The stored cookie

setCookie

public void setCookie(byte[] cookie)
Description copied from interface: PagedResults
Set the cookie

Specified by:
setCookie in interface PagedResults
Parameters:
cookie - The cookie to store in this control

getCookieValue

public int getCookieValue()
Specified by:
getCookieValue in interface PagedResults
Returns:
The integer value for the current cookie

hashCode

public int hashCode()
Overrides:
hashCode in class AbstractControl
See Also:
Object.hashCode()

equals

public boolean equals(Object o)
Overrides:
equals in class AbstractControl
See Also:
Object.equals(Object)

toString

public String toString()
Return a String representing this PagedSearchControl.

Overrides:
toString in class AbstractControl


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.