Class VirtualListViewRequestControl
- All Implemented Interfaces:
Control
,RequestControl
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 Summary
FieldsModifier and TypeFieldDescriptionprivate int
number of entries after the target entry the server should send.private String
value to match against the ordering matching rule for the attributeDescription in the sort control.private int
number of entries before the target entry the server should send.private int
server's estimate of the current number of entries in the ordered search result set.private byte[]
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.private static final int
hash code seed.static final String
OID of this control.private int
target entry's offset within the ordered search result set.Fields inherited from class org.ldaptive.control.AbstractControl
logger
-
Constructor Summary
ConstructorsConstructorDescriptionDefault 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, 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 Summary
Modifier and TypeMethodDescriptionbyte[]
encode()
Provides the BER encoding of this control.boolean
int
Returns the after count.Returns the assertion value.int
Returns the before count.int
Returns the content count.byte[]
Returns the context id.int
Returns the target offset.int
hashCode()
Returns the hash code for this object.boolean
hasValue()
Returns whether the control has a value associated with it.void
setAfterCount
(int count) Sets the after count.void
setAssertionValue
(String value) Sets the assertion value.void
setBeforeCount
(int count) Sets the before count.void
setContentCount
(int count) Sets the content count.void
setContextID
(byte[] id) Sets the context id.void
setTargetOffset
(int offset) Sets the target offset.toString()
Methods inherited from class org.ldaptive.control.AbstractControl
getCriticality, getOID
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.ldaptive.control.Control
getCriticality, getOID
-
Field Details
-
OID
OID of this control.- See Also:
-
HASH_CODE_SEED
private static final int HASH_CODE_SEEDhash code seed.- See Also:
-
beforeCount
private int beforeCountnumber of entries before the target entry the server should send. -
afterCount
private int afterCountnumber of entries after the target entry the server should send. -
targetOffset
private int targetOffsettarget entry's offset within the ordered search result set. -
contentCount
private int contentCountserver's estimate of the current number of entries in the ordered search result set. -
assertionValue
value to match against the ordering matching rule for the attributeDescription in the sort control. -
contextID
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.
-
-
Constructor Details
-
VirtualListViewRequestControl
public VirtualListViewRequestControl()Default constructor. -
VirtualListViewRequestControl
public VirtualListViewRequestControl(int offset, int before, int after) Creates a new virtual list view request control.- Parameters:
offset
- target entry offsetbefore
- number of entries before the targetafter
- number of entries after the target
-
VirtualListViewRequestControl
public VirtualListViewRequestControl(int offset, int before, int after, boolean critical) Creates a new virtual list view request control.- Parameters:
offset
- target entry offsetbefore
- number of entries before the targetafter
- number of entries after the targetcritical
- whether this control is critical
-
VirtualListViewRequestControl
public VirtualListViewRequestControl(int offset, int before, int after, int count, byte[] context) Creates a new virtual list view request control.- Parameters:
offset
- target entry offsetbefore
- number of entries before the targetafter
- number of entries after the targetcount
- server estimate of the number of entriescontext
- server context id
-
VirtualListViewRequestControl
public 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 offsetbefore
- number of entries before the targetafter
- number of entries after the targetcount
- server estimate of the number of entriescontext
- server context idcritical
- whether this control is critical
-
VirtualListViewRequestControl
Creates a new virtual list view request control.- Parameters:
assertion
- value to match in the sort controlbefore
- number of entries before the targetafter
- number of entries after the target
-
VirtualListViewRequestControl
Creates a new virtual list view request control.- Parameters:
assertion
- value to match in the sort controlbefore
- number of entries before the targetafter
- number of entries after the targetcritical
- whether this control is critical
-
VirtualListViewRequestControl
Creates a new virtual list view request control.- Parameters:
assertion
- value to match in the sort controlbefore
- number of entries before the targetafter
- number of entries after the targetcontext
- server context id
-
VirtualListViewRequestControl
public 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 controlbefore
- number of entries before the targetafter
- number of entries after the targetcontext
- server context idcritical
- whether this control is critical
-
-
Method Details
-
hasValue
public boolean hasValue()Description copied from interface:RequestControl
Returns whether the control has a value associated with it.- Specified by:
hasValue
in interfaceRequestControl
- Returns:
- whether the control has a value
-
getBeforeCount
public 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
-
setBeforeCount
public void setBeforeCount(int count) Sets the before count.- Parameters:
count
- before count
-
getAfterCount
public 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
-
setAfterCount
public void setAfterCount(int count) Sets the after count.- Parameters:
count
- after count
-
getTargetOffset
public int getTargetOffset()Returns the target offset. This indicates the return entry's offset within the ordered search result set.- Returns:
- target offset
-
setTargetOffset
public void setTargetOffset(int offset) Sets the target offset.- Parameters:
offset
- target offset
-
getContentCount
public 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
-
setContentCount
public void setContentCount(int count) Sets the content count.- Parameters:
count
- content count
-
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
-
setAssertionValue
Sets the assertion value.- Parameters:
value
- assertion value
-
getContextID
public 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
-
setContextID
public void setContextID(byte[] id) Sets the context id.- Parameters:
id
- context id
-
equals
- Overrides:
equals
in classAbstractControl
-
hashCode
public int hashCode()Description copied from class:AbstractControl
Returns the hash code for this object.- Specified by:
hashCode
in classAbstractControl
- Returns:
- hash code
-
toString
- Overrides:
toString
in classAbstractControl
-
encode
public byte[] encode()Description copied from interface:RequestControl
Provides the BER encoding of this control.- Specified by:
encode
in interfaceRequestControl
- Returns:
- BER encoded request control
-