Class VirtualListViewResponseControl
- java.lang.Object
-
- org.ldaptive.control.AbstractControl
-
- org.ldaptive.control.VirtualListViewResponseControl
-
- All Implemented Interfaces:
Control,ResponseControl
public class VirtualListViewResponseControl extends AbstractControl implements ResponseControl
Response control for virtual list view. See http://tools.ietf.org/html/draft-ietf-ldapext-ldapv3-vlv-09. Control is defined as:VirtualListViewResponse ::= SEQUENCE { targetPosition INTEGER (0 .. maxInt), contentCount INTEGER (0 .. maxInt), virtualListViewResult ENUMERATED { success (0), operationsError (1), protocolError (2), unwillingToPerform (53), insufficientAccessRights (50), timeLimitExceeded (3), adminLimitExceeded (11), innapropriateMatching (18), sortControlMissing (60), offsetRangeError (61), other(80), ... }, contextID OCTET STRING OPTIONAL }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classVirtualListViewResponseControl.ContentCountHandlerParse handler implementation for the content count.private static classVirtualListViewResponseControl.ContextIDHandlerParse handler implementation for the context ID.private static classVirtualListViewResponseControl.TargetPositionHandlerParse handler implementation for the target position.private static classVirtualListViewResponseControl.ViewResultHandlerParse handler implementation for the view result.
-
Field Summary
Fields Modifier and Type Field Description 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 inttargetPositionlist offset for the target entry.private ResultCodeviewResultResult of the vlv operation.-
Fields inherited from class org.ldaptive.control.AbstractControl
logger
-
-
Constructor Summary
Constructors Constructor Description VirtualListViewResponseControl()Default constructor.VirtualListViewResponseControl(boolean critical)Creates a new virtual list view response control.VirtualListViewResponseControl(int position, int count, ResultCode code, byte[] context)Creates a new virtual list view response control.VirtualListViewResponseControl(int position, int count, ResultCode code, byte[] context, boolean critical)Creates a new virtual list view response control.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddecode(DERBuffer encoded)Initializes this response control with the supplied BER encoded data.booleanequals(Object o)intgetContentCount()Returns the content count.byte[]getContextID()Returns the context id.intgetTargetPosition()Returns the target position.ResultCodegetViewResult()Returns the result code of the virtual list view.inthashCode()Returns the hash code for this object.voidsetContentCount(int count)Sets the content count.voidsetContextID(byte[] id)Sets the context id.voidsetTargetPosition(int position)Sets the target position.voidsetViewResult(ResultCode code)Sets the result code of the virtual list view.StringtoString()-
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 Detail
-
OID
public static final String OID
OID of this control.- See Also:
- Constant Field Values
-
HASH_CODE_SEED
private static final int HASH_CODE_SEED
hash code seed.- See Also:
- Constant Field Values
-
targetPosition
private int targetPosition
list offset for the target entry.
-
contentCount
private int contentCount
server's estimate of the current number of entries in the ordered search result set.
-
viewResult
private ResultCode viewResult
Result of the vlv operation.
-
contextID
private 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
-
VirtualListViewResponseControl
public VirtualListViewResponseControl()
Default constructor.
-
VirtualListViewResponseControl
public VirtualListViewResponseControl(boolean critical)
Creates a new virtual list view response control.- Parameters:
critical- whether this control is critical
-
VirtualListViewResponseControl
public VirtualListViewResponseControl(int position, int count, ResultCode code, byte[] context)Creates a new virtual list view response control.- Parameters:
position- offset for the target entrycount- server estimate of the number of entriescode- operation result codecontext- server context id
-
VirtualListViewResponseControl
public VirtualListViewResponseControl(int position, int count, ResultCode code, byte[] context, boolean critical)Creates a new virtual list view response control.- Parameters:
position- offset for the target entrycount- server estimate of the number of entriescode- operation result codecontext- server context idcritical- whether this control is critical
-
-
Method Detail
-
getTargetPosition
public int getTargetPosition()
Returns the target position. This indicates the list offset for the target entry.- Returns:
- target position
-
setTargetPosition
public void setTargetPosition(int position)
Sets the target position.- Parameters:
position- target position
-
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
-
getViewResult
public ResultCode getViewResult()
Returns the result code of the virtual list view.- Returns:
- result code
-
setViewResult
public void setViewResult(ResultCode code)
Sets the result code of the virtual list view.- Parameters:
code- result code
-
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
public boolean equals(Object o)
- Overrides:
equalsin classAbstractControl
-
hashCode
public int hashCode()
Description copied from class:AbstractControlReturns the hash code for this object.- Specified by:
hashCodein classAbstractControl- Returns:
- hash code
-
toString
public String toString()
- Overrides:
toStringin classAbstractControl
-
decode
public void decode(DERBuffer encoded)
Description copied from interface:ResponseControlInitializes this response control with the supplied BER encoded data.- Specified by:
decodein interfaceResponseControl- Parameters:
encoded- BER encoded response control
-
-