Package org.ldaptive.ad.handler
Class RangeEntryHandler
java.lang.Object
org.ldaptive.AbstractFreezable
org.ldaptive.transport.MessageFunctional<Q,S>
org.ldaptive.transport.MessageFunctional.Function<SearchRequest,SearchResponse,T,T>
org.ldaptive.transport.AbstractMessageFunctionalEntryHandler<SearchResponse>
org.ldaptive.ad.handler.RangeEntryHandler
- All Implemented Interfaces:
Function<SearchResponse,,SearchResponse> Freezable,SearchResultHandler
public class RangeEntryHandler
extends AbstractMessageFunctionalEntryHandler<SearchResponse>
implements SearchResultHandler
Rewrites attributes returned from Active Directory to include all values by performing additional searches. This
behavior is based on the expired RFC "Incremental Retrieval of Multi-valued Properties"
http://www.ietf.org/proceedings/53/I-D/draft-kashi-incremental-00.txt.
For example, when the membership of a group exceeds 1500, requests for the member attribute will likely return an attribute with name "member;Range=0-1499" and 1500 values. For a group with just over 3000 members, subsequent searches will request "member;Range=1500-2999" and then "member;Range=3000-4499". When the returned attribute is of the form "member;Range=3000-*", all values have been retrieved.
This handler should only be used with theSearchOperation.execute() method since it leverages
the connection to make further searches.-
Nested Class Summary
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final StringThe character indicating that the end of the range has been reached.private static final inthash code seed.private static final StringThe format used to calculate attribute IDs for subsequent searches.private static final PatternThe pattern matching the range attribute ID.private static final StringThe expression matching the range attribute ID "<id>range=<X>-<Y>".Fields inherited from class org.ldaptive.transport.AbstractMessageFunctionalEntryHandler
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(SearchResponse response) booleanprotected voidhandleAttributes(LdapEntry entry) Handle the attributes of a search entry.inthashCode()Create a new instance of this message functional.Methods inherited from class org.ldaptive.transport.AbstractMessageFunctionalEntryHandler
handleAttribute, handleAttributeName, handleAttributeValue, handleAttributeValue, handleDn, handleEntryMethods inherited from class org.ldaptive.transport.MessageFunctional
getConnection, getHandle, getRequest, setConnection, setHandle, setRequestMethods inherited from class org.ldaptive.AbstractFreezable
assertMutable, freeze, freeze, freeze, isFrozen
-
Field Details
-
HASH_CODE_SEED
private static final int HASH_CODE_SEEDhash code seed.- See Also:
-
END_OF_RANGE
The character indicating that the end of the range has been reached.- See Also:
-
RANGE_FORMAT
The format used to calculate attribute IDs for subsequent searches.- See Also:
-
RANGE_PATTERN_STRING
The expression matching the range attribute ID "<id>range=<X>-<Y>".- See Also:
-
RANGE_PATTERN
The pattern matching the range attribute ID.
-
-
Constructor Details
-
RangeEntryHandler
public RangeEntryHandler()
-
-
Method Details
-
apply
- Specified by:
applyin interfaceFunction<SearchResponse,SearchResponse>
-
handleAttributes
Description copied from class:AbstractMessageFunctionalEntryHandlerHandle the attributes of a search entry.- Overrides:
handleAttributesin classAbstractMessageFunctionalEntryHandler<SearchResponse>- Parameters:
entry- search entry to extract the attributes from
-
newInstance
Description copied from class:MessageFunctionalCreate a new instance of this message functional.- Specified by:
newInstancein classMessageFunctional<SearchRequest,SearchResponse> - Returns:
- new instance of this message functional
-
equals
- Overrides:
equalsin classAbstractMessageFunctionalEntryHandler<SearchResponse>
-
hashCode
public int hashCode()- Specified by:
hashCodein classAbstractMessageFunctionalEntryHandler<SearchResponse>
-