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: 764131 $, $Date: 2009-04-11 03:03:00 +0200 (Sam, 11 avr 2009) $,
Author:
Apache Directory Project

Field Summary
 
Fields inherited from class org.apache.directory.shared.asn1.ber.AbstractContainer
decodeBytes, grammar, grammarEndAllowed, maxPDUSize, 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()
           
 ControlCodec getCurrentControl()
           
 LdapMessageCodec getLdapMessage()
           
 int getMessageId()
           
 boolean isBinary(java.lang.String id)
           
 void setCurrentControl(ControlCodec currentControl)
          Store a newly created control
 void setLdapMessage(LdapMessageCodec 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, getDecodeBytes, getGrammar, getMaxPDUSize, getNewTlvId, getParentTLV, getState, getStates, getTlvId, getTransition, grammarEndAllowed, incrementDecodeBytes, isGrammarEndAllowed, setCurrentTLV, setMaxPDUSize, 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 LdapMessageCodec getLdapMessage()
Returns:
Returns the ldapMessage.

setLdapMessage

public void setLdapMessage(LdapMessageCodec 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()
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 ControlCodec getCurrentControl()
Returns:
the current control being created

setCurrentControl

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

Parameters:
currentControl - The control to store


Copyright © 2004-2009 The Apache Software Foundation. All Rights Reserved.