Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/classes/com/sun/jmx/snmp/SnmpTooBigException.java
38924 views
/*1* Copyright (c) 1998, 2007, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/242526package com.sun.jmx.snmp;272829/**30* Is used internally to signal that the size of a PDU exceeds the packet size limitation.31* <p>32* You will not usually need to use this class, except if you33* decide to implement your own34* {@link com.sun.jmx.snmp.SnmpPduFactory SnmPduFactory} object.35* <p>36* The <CODE>varBindCount</CODE> property contains the37* number of <CODE>SnmpVarBind</CODE> successfully encoded38* before the exception was thrown. Its value is 039* when this number is unknown.40*41* <p><b>This API is a Sun Microsystems internal API and is subject42* to change without notice.</b></p>43*/4445public class SnmpTooBigException extends Exception {46private static final long serialVersionUID = 4754796246674803969L;4748/**49* Builds an <CODE>SnmpTooBigException</CODE> with50* <CODE>varBindCount</CODE> set to 0.51*/52public SnmpTooBigException() {53varBindCount = 0 ;54}5556/**57* Builds an <CODE>SnmpTooBigException</CODE> with58* <CODE>varBindCount</CODE> set to the specified value.59* @param n The <CODE>varBindCount</CODE> value.60*/61public SnmpTooBigException(int n) {62varBindCount = n ;63}646566/**67* Returns the number of <CODE>SnmpVarBind</CODE> successfully68* encoded before the exception was thrown.69*70* @return A positive integer (0 means the number is unknown).71*/72public int getVarBindCount() {73return varBindCount ;74}7576/**77* The <CODE>varBindCount</CODE>.78* @serial79*/80private int varBindCount ;81}828384