View Javadoc

1   /*
2    *   Copyright 2004 The Apache Software Foundation
3    *
4    *   Licensed under the Apache License, Version 2.0 (the "License");
5    *   you may not use this file except in compliance with the License.
6    *   You may obtain a copy of the License at
7    *
8    *       http://www.apache.org/licenses/LICENSE-2.0
9    *
10   *   Unless required by applicable law or agreed to in writing, software
11   *   distributed under the License is distributed on an "AS IS" BASIS,
12   *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   *   See the License for the specific language governing permissions and
14   *   limitations under the License.
15   *
16   */
17  package org.apache.asn1.ber ;
18  
19  
20  import org.apache.asn1.codec.stateful.EncoderCallback;
21  
22  
23  /***
24   * A specialized encoder callback that handles specific BER events.
25   *
26   * @author <a href="mailto:dev@directory.apache.org">
27   * Apache Directory Project</a>
28   * @version $Rev: 157644 $
29   */
30  public interface BEREncoderCallback extends EncoderCallback
31  {
32      /***
33       * Method used to receive notification that a tag was encoded.  The
34       * following tag properties of the TLV tuple are valid at this point:
35       * <ul>
36       * <li>id</li>
37       * <li>isPrimitive</li>
38       * <li>typeClass</li>
39       * </ul>
40       * 
41       * @param tlv the TLV tuple
42       */
43      void tagEncoded( Tuple tlv ) ;
44      
45      /***
46       * Method used to receive notification that a length was encoded.  The
47       * following properties of the TLV tuple are valid at this point:
48       * <ul>
49       * <li>id</li>
50       * <li>isPrimitive</li>
51       * <li>typeClass</li>
52       * <li>length</li>
53       * </ul>
54       * 
55       * @param tlv the TLV tuple
56       */
57      void lengthEncoded( Tuple tlv ) ;
58      
59      /***
60       * Method used to recieve notification that a part of the value was encoded.
61       * 
62       * @param tlv the TLV tuple 
63       */
64      void partialValueEncoded( Tuple tlv ) ;
65  }