public class SearchRequestCodec extends LdapMessageCodec
ldapMessageLength
parent
Constructor and Description |
---|
SearchRequestCodec()
Creates a new SearchRequest object.
|
Modifier and Type | Method and Description |
---|---|
void |
addAttribute(String attribute)
Add an attribute to the attributes list.
|
void |
addCurrentFilter(Filter localFilter)
Add a current filter.
|
protected int |
computeLengthProtocolOp()
Compute the SearchRequest length
SearchRequest :
|
protected void |
encodeProtocolOp(ByteBuffer buffer)
Encode the SearchRequest message to a PDU.
|
List<EntryAttribute> |
getAttributes()
Get the list of attributes
|
DN |
getBaseObject()
Get the base object
|
Filter |
getCurrentFilter()
Get the current dilter
|
int |
getDerefAliases()
Get the derefAliases flag
|
Filter |
getFilter()
Get the filter
|
MessageTypeEnum |
getMessageType()
Get the message type
|
String |
getMessageTypeName()
Get the message type Name
|
SearchScope |
getScope()
Get the search scope
|
long |
getSizeLimit()
Get the size limit
|
Filter |
getTerminalFilter()
Get the comparison dilter
|
int |
getTimeLimit()
Get the time limit
|
boolean |
isTypesOnly()
Get the typesOnly flag
|
void |
setBaseObject(DN baseObject)
Set the base object
|
void |
setCurrentFilter(Filter filter)
Set the current dilter
|
void |
setDerefAliases(int derefAliases)
Set the derefAliases flag
|
void |
setFilter(Filter filter)
Set the filter
|
void |
setScope(SearchScope scope)
Set the search scope
|
void |
setSizeLimit(long sizeLimit)
Set the size limit
|
void |
setTerminalFilter(Filter terminalFilter)
Set the terminal filter
|
void |
setTimeLimit(int timeLimit)
Set the time limit
|
void |
setTypesOnly(boolean typesOnly)
Set the typesOnly flag
|
String |
toString()
Return a string the represent a SearchRequest
|
void |
unstackFilters(IAsn1Container container)
This method is used to clear the filter's stack for terminated elements.
|
addControl, addControls, computeLength, encode, getCodecControl, getControls, getControls, getCurrentControl, getMessageId, initControls, setMessageId, toString
addLength, encode, getCurrentLength, getExpectedLength, getParent, getTlvId, setCurrentLength, setExpectedLength, setParent
public SearchRequestCodec()
public MessageTypeEnum getMessageType()
getMessageType
in class LdapMessageCodec
public String getMessageTypeName()
getMessageTypeName
in class LdapMessageCodec
public List<EntryAttribute> getAttributes()
public void addAttribute(String attribute)
attribute
- The attribute to add to the listpublic DN getBaseObject()
public void setBaseObject(DN baseObject)
baseObject
- The baseObject to set.public int getDerefAliases()
public void setDerefAliases(int derefAliases)
derefAliases
- The derefAliases to set.public Filter getFilter()
public void setFilter(Filter filter)
filter
- The filter to set.public SearchScope getScope()
public void setScope(SearchScope scope)
scope
- The scope to set.public long getSizeLimit()
public void setSizeLimit(long sizeLimit)
sizeLimit
- The sizeLimit to set.public int getTimeLimit()
public void setTimeLimit(int timeLimit)
timeLimit
- The timeLimit to set.public boolean isTypesOnly()
public void setTypesOnly(boolean typesOnly)
typesOnly
- The typesOnly to set.public Filter getCurrentFilter()
public Filter getTerminalFilter()
public void setTerminalFilter(Filter terminalFilter)
terminalFilter
- the teminalFilter.public void addCurrentFilter(Filter localFilter) throws DecoderException
localFilter
- The filter to set.DecoderException
public void setCurrentFilter(Filter filter)
filter
- The filter to set.public void unstackFilters(IAsn1Container container)
container
- The container being decodedprotected int computeLengthProtocolOp()
0x63 L1 | +--> 0x04 L2 baseObject +--> 0x0A 0x01 scope +--> 0x0A 0x01 derefAliases +--> 0x02 0x0(1..4) sizeLimit +--> 0x02 0x0(1..4) timeLimit +--> 0x01 0x01 typesOnly +--> filter.computeLength() +--> 0x30 L3 (Attribute description list) | +--> 0x04 L4-1 Attribute description +--> 0x04 L4-2 Attribute description +--> ... +--> 0x04 L4-i Attribute description +--> ... +--> 0x04 L4-n Attribute description
computeLengthProtocolOp
in class LdapMessageCodec
protected void encodeProtocolOp(ByteBuffer buffer) throws EncoderException
0x63 LL 0x04 LL baseObject 0x0A 01 scope 0x0A 01 derefAliases 0x02 0N sizeLimit 0x02 0N timeLimit 0x01 0x01 typesOnly filter.encode() 0x30 LL attributeDescriptionList 0x04 LL attributeDescription ... 0x04 LL attributeDescription
encodeProtocolOp
in class LdapMessageCodec
buffer
- The buffer where to put the PDUEncoderException
Copyright © 2003–2013 The Apache Software Foundation. All rights reserved.