org.apache.asn1.ber.digester
Interface Rule

All Known Implementing Classes:
AbstractRule

public interface Rule

A BER event processing rule.

Version:
$Rev: 157644 $
Author:
Apache Directory Project

Method Summary
 void finish()
          Called when the tlv has been completely consumed.
 BERDigester getDigester()
          Get the BERDigester with which this Rule has been associated.
 void length(int length)
          Called when the length of a TLV is encountered.
 void setDigester(BERDigester digester)
          Set the BERDigester with which this Rule will be associated.
 void tag(int id, boolean isPrimitive, TypeClass typeClass)
          Called when the tag of the matched TLV is encountered.
 void value(java.nio.ByteBuffer buf)
          Called when a peice of the value is available.
 

Method Detail

getDigester

public BERDigester getDigester()
Get the BERDigester with which this Rule has been associated.

Returns:
the associated rulesBase

setDigester

public void setDigester(BERDigester digester)
Set the BERDigester with which this Rule will be associated.

Parameters:
digester - the rulesBase to associate this rule with

tag

public void tag(int id,
                boolean isPrimitive,
                TypeClass typeClass)
Called when the tag of the matched TLV is encountered.

Parameters:
id - the tag's id
isPrimitive - whether tlv is primitive or constructed
typeClass - the tag's type class

length

public void length(int length)
Called when the length of a TLV is encountered.

Parameters:
length - the length in bytes of the value

value

public void value(java.nio.ByteBuffer buf)
Called when a peice of the value is available.

Parameters:
buf - a portion of the value

finish

public void finish()
Called when the tlv has been completely consumed.



Copyright © 2004-2006 . All Rights Reserved.