org.apache.asn1new.ber.containers
Interface IAsn1Container

All Known Implementing Classes:
AbstractContainer

public interface IAsn1Container

Every ASN1 container must implement this interface.

Author:
Apache Directory Project

Method Summary
 void addGrammar(IGrammar grammar)
          Add a new IGrammar to use
 int getCurrentGrammar()
           
 int getCurrentGrammarType()
           
 TLV getCurrentTLV()
          Get the currentTLV
 IGrammar getGrammar()
          Get the grammar
 TLV getParentTLV()
           
 int getState()
          Get the current grammar state
 IStates getStates()
           
 int getTransition()
          Get the transition
 int restoreGrammar()
          restore the previous grammar (the one before a switch has occured)
 void setCurrentTLV(TLV tlv)
          Set the current TLV
 void setInitGrammar(int grammar)
          Set the first grammar to use
 void setParentTLV(TLV parentTLV)
          Set the parent TLV
 void setState(int state)
          Set the new current state
 void setTransition(int transition)
          Update the transition from a state to another
 void switchGrammar(int currentState, int grammar)
          Switch to another grammar
 

Method Detail

getState

public int getState()
Get the current grammar state

Returns:
Returns the current grammar state

setState

public void setState(int state)
Set the new current state

Parameters:
state - The new state

setCurrentTLV

public void setCurrentTLV(TLV tlv)
Set the current TLV

Parameters:
tlv - The current TLV

getCurrentTLV

public TLV getCurrentTLV()
Get the currentTLV

Returns:
Returns the current TLV being decoded

getGrammar

public IGrammar getGrammar()
Get the grammar

Returns:
Returns the grammar used to decode a LdapMessage.

addGrammar

public void addGrammar(IGrammar grammar)
Add a new IGrammar to use

Parameters:
grammar - The grammar to add.

switchGrammar

public void switchGrammar(int currentState,
                          int grammar)
Switch to another grammar

Parameters:
grammar - The grammar to switch to.

restoreGrammar

public int restoreGrammar()
restore the previous grammar (the one before a switch has occured)

Returns:
Returns the previous state if any.

getCurrentGrammar

public int getCurrentGrammar()
Returns:
Returns the currentGrammar.

setInitGrammar

public void setInitGrammar(int grammar)
Set the first grammar to use


getTransition

public int getTransition()
Get the transition

Returns:
Returns the transition from the previous state to the new state

setTransition

public void setTransition(int transition)
Update the transition from a state to another

Parameters:
transition - The transition to set

getCurrentGrammarType

public int getCurrentGrammarType()
Returns:
Returns the current Grammar type, or -1 if not found.

getStates

public IStates getStates()
Returns:
Returns the states.

getParentTLV

public TLV getParentTLV()
Returns:
get the parent TLV.

setParentTLV

public void setParentTLV(TLV parentTLV)
Set the parent TLV



Copyright © 2005-2006 . All Rights Reserved.