Class LdapMessageContainer<E extends MessageDecorator<? extends Message>>
- java.lang.Object
-
- org.apache.directory.api.asn1.ber.AbstractContainer
-
- org.apache.directory.api.ldap.codec.api.LdapMessageContainer<E>
-
- Type Parameters:
E
- The decorated message
- All Implemented Interfaces:
Asn1Container
public class LdapMessageContainer<E extends MessageDecorator<? extends Message>> extends AbstractContainer
The LdapMessage container stores all the messages decoded by the Asn1Decoder. When dealing with an encoding PDU, we will obtain a LdapMessage in the container.- Author:
- Apache Directory Project
-
-
Constructor Summary
Constructors Constructor Description LdapMessageContainer(LdapApiService codec)
Creates a new LdapMessageContainer object.LdapMessageContainer(LdapApiService codec, BinaryAttributeDetector binaryAttributeDetector)
Creates a new LdapMessageContainer object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clean()
Clean the container for the next usage.BinaryAttributeDetector
getBinaryAttributeDetector()
ControlDecorator<? extends Control>
getCurrentControl()
LdapApiService
getLdapCodecService()
Gets theLdapApiService
associated with this Container.E
getMessage()
int
getMessageId()
boolean
isBinary(String id)
void
setBinaryAttributeDetector(BinaryAttributeDetector binaryAttributeDetector)
Sets the binary attribute detectorvoid
setCurrentControl(ControlDecorator<? extends Control> currentControl)
Store a newly created controlvoid
setMessage(E messageDecorator)
Set a Message Object into the container.void
setMessageId(int messageId)
Set the message ID-
Methods inherited from class org.apache.directory.api.asn1.ber.AbstractContainer
getCurrentTLV, getDecodedBytes, getGrammar, getMaxPDUSize, getNewTlvId, getParentTLV, getState, getStream, getTlvId, getTransition, incrementDecodedBytes, isGathering, isGrammarEndAllowed, rewind, setCurrentTLV, setDecodedBytes, setGathering, setGrammar, setGrammarEndAllowed, setMaxPDUSize, setParentTLV, setState, setStream, setTransition, updateParent
-
-
-
-
Constructor Detail
-
LdapMessageContainer
public LdapMessageContainer(LdapApiService codec)
Creates a new LdapMessageContainer object. We will store ten grammars, it's enough ...- Parameters:
codec
- The LDAP service instance
-
LdapMessageContainer
public LdapMessageContainer(LdapApiService codec, BinaryAttributeDetector binaryAttributeDetector)
Creates a new LdapMessageContainer object. We will store ten grammars, it's enough ...- Parameters:
codec
- The LDAP service instancebinaryAttributeDetector
- checks if an attribute is binary
-
-
Method Detail
-
getLdapCodecService
public LdapApiService getLdapCodecService()
Gets theLdapApiService
associated with this Container.- Returns:
- The LDAP service instance
-
getMessage
public E getMessage()
- Returns:
- Returns the ldapMessage.
-
setMessage
public void setMessage(E messageDecorator)
Set a Message Object into the container. It will be completed by the ldapDecoder.- Parameters:
messageDecorator
- The message to set.
-
clean
public void clean()
Clean the container for the next usage.- Overrides:
clean
in classAbstractContainer
-
isBinary
public boolean isBinary(String id)
- Parameters:
id
- checks if an attribute id is binary- Returns:
- Returns true if the attribute is binary.
-
getMessageId
public int getMessageId()
- Returns:
- The message ID
-
setMessageId
public void setMessageId(int messageId)
Set the message ID- Parameters:
messageId
- the id of the message
-
getCurrentControl
public ControlDecorator<? extends Control> getCurrentControl()
- Returns:
- the current control being created
-
setCurrentControl
public void setCurrentControl(ControlDecorator<? extends Control> currentControl)
Store a newly created control- Parameters:
currentControl
- The control to store
-
setBinaryAttributeDetector
public void setBinaryAttributeDetector(BinaryAttributeDetector binaryAttributeDetector)
Sets the binary attribute detector- Parameters:
binaryAttributeDetector
- the binary attribute detector
-
getBinaryAttributeDetector
public BinaryAttributeDetector getBinaryAttributeDetector()
- Returns:
- the binary attribute detector
-
-