KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > jmx > snmp > SnmpTooBigException


1 /*
2  * @(#)file SnmpTooBigException.java
3  * @(#)author Sun Microsystems, Inc.
4  * @(#)version 4.9
5  * @(#)date 08/02/09
6  *
7  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
8  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
9  *
10  */

11
12
13 package com.sun.jmx.snmp;
14
15
16 // "@(#)SnmpTooBigException.java 1.1 98/07/23 SMI"
17

18 /**
19  * Is used internally to signal that the size of a PDU exceeds the packet size limitation.
20  * <p>
21  * You will not usually need to use this class, except if you
22  * decide to implement your own
23  * {@link com.sun.jmx.snmp.SnmpPduFactory SnmPduFactory} object.
24  * <p>
25  * The <CODE>varBindCount</CODE> property contains the
26  * number of <CODE>SnmpVarBind</CODE> successfully encoded
27  * before the exception was thrown. Its value is 0
28  * when this number is unknown.
29  *
30  * <p><b>This API is a Sun Microsystems internal API and is subject
31  * to change without notice.</b></p>
32  * @version 1.1 07/23/98
33  * @author Sun Microsystems, Inc
34  */

35
36 public class SnmpTooBigException extends Exception JavaDoc {
37
38   /**
39    * Builds an <CODE>SnmpTooBigException</CODE> with
40    * <CODE>varBindCount</CODE> set to 0.
41    */

42   public SnmpTooBigException() {
43     varBindCount = 0 ;
44   }
45   
46   /**
47    * Builds an <CODE>SnmpTooBigException</CODE> with
48    * <CODE>varBindCount</CODE> set to the specified value.
49    * @param n The <CODE>varBindCount</CODE> value.
50    */

51   public SnmpTooBigException(int n) {
52     varBindCount = n ;
53   }
54   
55   
56   /**
57    * Returns the number of <CODE>SnmpVarBind</CODE> successfully
58    * encoded before the exception was thrown.
59    *
60    * @return A positive integer (0 means the number is unknown).
61    */

62   public int getVarBindCount() {
63     return varBindCount ;
64   }
65   
66   /**
67    * The <CODE>varBindCount</CODE>.
68    * @serial
69    */

70   private int varBindCount ;
71 }
72
73
74
75
76
Popular Tags