org.apache.directory.shared.ldap.codec
Class LdapMessageContainer

java.lang.Object
  extended by org.apache.directory.shared.asn1.ber.AbstractContainer
      extended by org.apache.directory.shared.ldap.codec.LdapMessageContainer
All Implemented Interfaces:
IAsn1Container

public class LdapMessageContainer
extends AbstractContainer

The LdapMessage container stores all the messages decoded by the Asn1Decoder. When dealing whith an incoding PDU, we will obtain a LdapMessage in the ILdapContainer.

Version:
$Rev: 664290 $, $Date: 2008-06-07 08:28:06 +0200 (Sa, 07 Jun 2008) $,
Author:
Apache Directory Project

Field Summary
 
Fields inherited from class org.apache.directory.shared.asn1.ber.AbstractContainer
grammar, grammarEndAllowed, parentTLV, state, states, stateStack, tlv, transition
 
Constructor Summary
LdapMessageContainer()
          Creates a new LdapMessageContainer object.
LdapMessageContainer(BinaryAttributeDetector binaryAttributeDetector)
          Creates a new LdapMessageContainer object.
 
Method Summary
 void clean()
          Clean the container for the next usage.
 Control getCurrentControl()
           
 LdapMessage getLdapMessage()
           
 int getMessageId()
           
 boolean isBinary(java.lang.String id)
           
 void setCurrentControl(Control currentControl)
          Store a newly created control
 void setLdapMessage(LdapMessage ldapMessage)
          Set a ldapMessage Object into the container.
 void setMessageId(int messageId)
          Set the message ID
 
Methods inherited from class org.apache.directory.shared.asn1.ber.AbstractContainer
getCurrentTLV, getGrammar, getNewTlvId, getParentTLV, getState, getStates, getTlvId, getTransition, grammarEndAllowed, isGrammarEndAllowed, setCurrentTLV, setParentTLV, setState, setTransition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LdapMessageContainer

public LdapMessageContainer()
Creates a new LdapMessageContainer object. We will store ten grammars, it's enough ...


LdapMessageContainer

public LdapMessageContainer(BinaryAttributeDetector binaryAttributeDetector)
Creates a new LdapMessageContainer object. We will store ten grammars, it's enough ...

Parameters:
binaryAttributeDetector - checks if an attribute is binary
Method Detail

getLdapMessage

public LdapMessage getLdapMessage()
Returns:
Returns the ldapMessage.

setLdapMessage

public void setLdapMessage(LdapMessage ldapMessage)
Set a ldapMessage Object into the container. It will be completed by the ldapDecoder .

Parameters:
ldapMessage - The message to set.

clean

public void clean()
Description copied from class: AbstractContainer
Clean the container for the next usage.

Overrides:
clean in class AbstractContainer

isBinary

public boolean isBinary(java.lang.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 Control getCurrentControl()
Returns:
the current control being created

setCurrentControl

public void setCurrentControl(Control currentControl)
Store a newly created control

Parameters:
currentControl - The control to store


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.