Package org.ldaptive.ad.handler
Class AbstractBinaryAttributeHandler<T>
- 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<T>
-
- org.ldaptive.ad.handler.AbstractBinaryAttributeHandler<T>
-
- Type Parameters:
T
- type of object to handle
- Direct Known Subclasses:
ObjectGuidHandler
,ObjectSidHandler
public abstract class AbstractBinaryAttributeHandler<T> extends AbstractMessageFunctionalEntryHandler<T>
Base class for entry handlers that convert a binary attribute to its string form.
-
-
Field Summary
Fields Modifier and Type Field Description private String
attributeName
attribute name.private static int
HASH_CODE_SEED
hash code seed.-
Fields inherited from class org.ldaptive.transport.AbstractMessageFunctionalEntryHandler
logger
-
-
Constructor Summary
Constructors Constructor Description AbstractBinaryAttributeHandler()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract String
convertValue(byte[] value)
Converts the supplied binary value to its string form.boolean
equals(Object o)
String
getAttributeName()
Returns the attribute name to convert from binary to string.protected void
handleAttributes(LdapEntry entry)
Handle the attributes of a search entry.int
hashCode()
void
setAttributeName(String name)
Sets the attribute name to convert from binary to string.void
setRequest(SearchRequest request)
-
Methods inherited from class org.ldaptive.transport.AbstractMessageFunctionalEntryHandler
handleAttribute, handleAttributeName, handleAttributeValue, handleAttributeValue, handleDn, handleEntry
-
Methods inherited from class org.ldaptive.transport.MessageFunctional
getConnection, getHandle, getRequest, newInstance, setConnection, setHandle
-
Methods inherited from class org.ldaptive.AbstractFreezable
assertMutable, freeze, freeze, freeze, isFrozen
-
-
-
-
Field Detail
-
HASH_CODE_SEED
private static final int HASH_CODE_SEED
hash code seed.- See Also:
- Constant Field Values
-
attributeName
private String attributeName
attribute name.
-
-
Method Detail
-
getAttributeName
public String getAttributeName()
Returns the attribute name to convert from binary to string.- Returns:
- attribute name
-
setAttributeName
public void setAttributeName(String name)
Sets the attribute name to convert from binary to string.- Parameters:
name
- of the attribute
-
handleAttributes
protected void handleAttributes(LdapEntry entry)
Description copied from class:AbstractMessageFunctionalEntryHandler
Handle the attributes of a search entry.- Overrides:
handleAttributes
in classAbstractMessageFunctionalEntryHandler<T>
- Parameters:
entry
- search entry to extract the attributes from
-
convertValue
protected abstract String convertValue(byte[] value)
Converts the supplied binary value to its string form.- Parameters:
value
- to convert- Returns:
- string form of the value
-
setRequest
public void setRequest(SearchRequest request)
- Overrides:
setRequest
in classMessageFunctional<SearchRequest,SearchResponse>
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classAbstractMessageFunctionalEntryHandler<T>
-
hashCode
public int hashCode()
- Specified by:
hashCode
in classAbstractMessageFunctionalEntryHandler<T>
-
-