Class VirtualListViewRequestControl
- java.lang.Object
- 
- org.ldaptive.control.AbstractControl
- 
- org.ldaptive.control.VirtualListViewRequestControl
 
 
- 
- All Implemented Interfaces:
- Control,- RequestControl
 
 public class VirtualListViewRequestControl extends AbstractControl implements RequestControl Request control for virtual list view. See http://tools.ietf.org/html/draft-ietf-ldapext-ldapv3-vlv-09. Control is defined as:VirtualListViewRequest ::= SEQUENCE { beforeCount INTEGER (0..maxInt), afterCount INTEGER (0..maxInt), target CHOICE { byOffset [0] SEQUENCE { offset INTEGER (1 .. maxInt), contentCount INTEGER (0 .. maxInt) }, greaterThanOrEqual [1] AssertionValue }, contextID OCTET STRING OPTIONAL }
- 
- 
Field SummaryFields Modifier and Type Field Description private intafterCountnumber of entries after the target entry the server should send.private StringassertionValuevalue to match against the ordering matching rule for the attributeDescription in the sort control.private intbeforeCountnumber of entries before the target entry the server should send.private intcontentCountserver's estimate of the current number of entries in the ordered search result set.private byte[]contextIDvalue that clients should send back to the server to indicate that the server is willing to return contiguous data from a subsequent search request which uses the same search criteria.private static intHASH_CODE_SEEDhash code seed.static StringOIDOID of this control.private inttargetOffsettarget entry's offset within the ordered search result set.- 
Fields inherited from class org.ldaptive.control.AbstractControllogger
 
- 
 - 
Constructor SummaryConstructors Constructor Description VirtualListViewRequestControl()Default constructor.VirtualListViewRequestControl(int offset, int before, int after)Creates a new virtual list view request control.VirtualListViewRequestControl(int offset, int before, int after, boolean critical)Creates a new virtual list view request control.VirtualListViewRequestControl(int offset, int before, int after, byte[] context, boolean critical)Creates a new virtual list view request control.VirtualListViewRequestControl(int offset, int before, int after, int count, byte[] context)Creates a new virtual list view request control.VirtualListViewRequestControl(int offset, int before, int after, int count, byte[] context, boolean critical)Creates a new virtual list view request control.VirtualListViewRequestControl(String assertion, int before, int after)Creates a new virtual list view request control.VirtualListViewRequestControl(String assertion, int before, int after, boolean critical)Creates a new virtual list view request control.VirtualListViewRequestControl(String assertion, int before, int after, byte[] context)Creates a new virtual list view request control.VirtualListViewRequestControl(String assertion, int before, int after, byte[] context, boolean critical)Creates a new virtual list view request control.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]encode()Provides the BER encoding of this control.booleanequals(Object o)intgetAfterCount()Returns the after count.StringgetAssertionValue()Returns the assertion value.intgetBeforeCount()Returns the before count.intgetContentCount()Returns the content count.byte[]getContextID()Returns the context id.intgetTargetOffset()Returns the target offset.inthashCode()Returns the hash code for this object.booleanhasValue()Returns whether the control has a value associated with it.voidsetAfterCount(int count)Sets the after count.voidsetAssertionValue(String value)Sets the assertion value.voidsetBeforeCount(int count)Sets the before count.voidsetContentCount(int count)Sets the content count.voidsetContextID(byte[] id)Sets the context id.voidsetTargetOffset(int offset)Sets the target offset.StringtoString()- 
Methods inherited from class org.ldaptive.control.AbstractControlgetCriticality, getOID
 - 
Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface org.ldaptive.control.ControlgetCriticality, getOID
 
- 
 
- 
- 
- 
Field Detail- 
OIDpublic static final String OID OID of this control.- See Also:
- Constant Field Values
 
 - 
HASH_CODE_SEEDprivate static final int HASH_CODE_SEED hash code seed.- See Also:
- Constant Field Values
 
 - 
beforeCountprivate int beforeCount number of entries before the target entry the server should send.
 - 
afterCountprivate int afterCount number of entries after the target entry the server should send.
 - 
targetOffsetprivate int targetOffset target entry's offset within the ordered search result set.
 - 
contentCountprivate int contentCount server's estimate of the current number of entries in the ordered search result set.
 - 
assertionValueprivate String assertionValue value to match against the ordering matching rule for the attributeDescription in the sort control.
 - 
contextIDprivate byte[] contextID value that clients should send back to the server to indicate that the server is willing to return contiguous data from a subsequent search request which uses the same search criteria.
 
- 
 - 
Constructor Detail- 
VirtualListViewRequestControlpublic VirtualListViewRequestControl() Default constructor.
 - 
VirtualListViewRequestControlpublic VirtualListViewRequestControl(int offset, int before, int after)Creates a new virtual list view request control.- Parameters:
- offset- target entry offset
- before- number of entries before the target
- after- number of entries after the target
 
 - 
VirtualListViewRequestControlpublic VirtualListViewRequestControl(int offset, int before, int after, boolean critical)Creates a new virtual list view request control.- Parameters:
- offset- target entry offset
- before- number of entries before the target
- after- number of entries after the target
- critical- whether this control is critical
 
 - 
VirtualListViewRequestControlpublic VirtualListViewRequestControl(int offset, int before, int after, byte[] context, boolean critical)Creates a new virtual list view request control.- Parameters:
- offset- target entry offset
- before- number of entries before the target
- after- number of entries after the target
- context- server context id
- critical- whether this control is critical
 
 - 
VirtualListViewRequestControlpublic VirtualListViewRequestControl(int offset, int before, int after, int count, byte[] context)Creates a new virtual list view request control.- Parameters:
- offset- target entry offset
- before- number of entries before the target
- after- number of entries after the target
- count- server estimate of the number of entries
- context- server context id
 
 - 
VirtualListViewRequestControlpublic VirtualListViewRequestControl(int offset, int before, int after, int count, byte[] context, boolean critical)Creates a new virtual list view request control.- Parameters:
- offset- target entry offset
- before- number of entries before the target
- after- number of entries after the target
- count- server estimate of the number of entries
- context- server context id
- critical- whether this control is critical
 
 - 
VirtualListViewRequestControlpublic VirtualListViewRequestControl(String assertion, int before, int after) Creates a new virtual list view request control.- Parameters:
- assertion- value to match in the sort control
- before- number of entries before the target
- after- number of entries after the target
 
 - 
VirtualListViewRequestControlpublic VirtualListViewRequestControl(String assertion, int before, int after, boolean critical) Creates a new virtual list view request control.- Parameters:
- assertion- value to match in the sort control
- before- number of entries before the target
- after- number of entries after the target
- critical- whether this control is critical
 
 - 
VirtualListViewRequestControlpublic VirtualListViewRequestControl(String assertion, int before, int after, byte[] context) Creates a new virtual list view request control.- Parameters:
- assertion- value to match in the sort control
- before- number of entries before the target
- after- number of entries after the target
- context- server context id
 
 - 
VirtualListViewRequestControlpublic VirtualListViewRequestControl(String assertion, int before, int after, byte[] context, boolean critical) Creates a new virtual list view request control.- Parameters:
- assertion- value to match in the sort control
- before- number of entries before the target
- after- number of entries after the target
- context- server context id
- critical- whether this control is critical
 
 
- 
 - 
Method Detail- 
hasValuepublic boolean hasValue() Description copied from interface:RequestControlReturns whether the control has a value associated with it.- Specified by:
- hasValuein interface- RequestControl
- Returns:
- whether the control has a value
 
 - 
getBeforeCountpublic int getBeforeCount() Returns the before count. This indicates how many entries before the target entry the client wants the server to send.- Returns:
- before count
 
 - 
setBeforeCountpublic void setBeforeCount(int count) Sets the before count.- Parameters:
- count- before count
 
 - 
getAfterCountpublic int getAfterCount() Returns the after count. This indicates how many entries after the target entry the client wants the server to send.- Returns:
- after count
 
 - 
setAfterCountpublic void setAfterCount(int count) Sets the after count.- Parameters:
- count- after count
 
 - 
getTargetOffsetpublic int getTargetOffset() Returns the target offset. This indicates the return entry's offset within the ordered search result set.- Returns:
- target offset
 
 - 
setTargetOffsetpublic void setTargetOffset(int offset) Sets the target offset.- Parameters:
- offset- target offset
 
 - 
getContentCountpublic int getContentCount() Returns the content count. From the RFC:contentCount gives the server's estimate of the current number of entries in the list. Together these give sufficient information for the client to update a list box slider position to match the newly retrieved entries and identify the target entry. The contentCount value returned SHOULD be used in a subsequent VirtualListViewRequest control. - Returns:
- content count
 
 - 
setContentCountpublic void setContentCount(int count) Sets the content count.- Parameters:
- count- content count
 
 - 
getAssertionValuepublic String getAssertionValue() Returns the assertion value. From the RFC:The assertion value is encoded according to the ORDERING matching rule for the attributeDescription in the sort control [SSS]. If present, the value supplied in greaterThanOrEqual is used to determine the target entry by comparison with the values of the attribute specified as the primary sort key. The first list entry who's value is no less than (less than or equal to when the sort order is reversed) the supplied value is the target entry. - Returns:
- assertion value
 
 - 
setAssertionValuepublic void setAssertionValue(String value) Sets the assertion value.- Parameters:
- value- assertion value
 
 - 
getContextIDpublic byte[] getContextID() Returns the context id. From the RFC:The contextID is a server-defined octet string. If present, the contents of the contextID field SHOULD be returned to the server by a client in a subsequent virtual list request. The presence of a contextID here indicates that the server is willing to return contiguous data from a subsequent search request which uses the same search criteria, accompanied by a VirtualListViewRequest which indicates that the client wishes to receive an adjoining page of data. - Returns:
- context id
 
 - 
setContextIDpublic void setContextID(byte[] id) Sets the context id.- Parameters:
- id- context id
 
 - 
equalspublic boolean equals(Object o) - Overrides:
- equalsin class- AbstractControl
 
 - 
hashCodepublic int hashCode() Description copied from class:AbstractControlReturns the hash code for this object.- Specified by:
- hashCodein class- AbstractControl
- Returns:
- hash code
 
 - 
toStringpublic String toString() - Overrides:
- toStringin class- AbstractControl
 
 - 
encodepublic byte[] encode() Description copied from interface:RequestControlProvides the BER encoding of this control.- Specified by:
- encodein interface- RequestControl
- Returns:
- BER encoded request control
 
 
- 
 
-