KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * @(#)file SnmpCounter.java
3  * @(#)author Sun Microsystems, Inc.
4  * @(#)version 4.8
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
17 /**
18  * Represents an SNMP counter.
19  *
20  * <p><b>This API is a Sun Microsystems internal API and is subject
21  * to change without notice.</b></p>
22  * @version 4.8 12/19/03
23  * @author Sun Microsystems, Inc
24  */

25
26 public class SnmpCounter extends SnmpUnsignedInt {
27
28     // CONSTRUCTORS
29
//-------------
30
/**
31      * Constructs a new <CODE>SnmpCounter</CODE> from the specified integer value.
32      * @param v The initialization value.
33      * @exception IllegalArgumentException The specified value is negative
34      * or larger than {@link SnmpUnsignedInt#MAX_VALUE SnmpUnsignedInt.MAX_VALUE}.
35      */

36     public SnmpCounter(int v) throws IllegalArgumentException JavaDoc {
37     super(v) ;
38     }
39
40     /**
41      * Constructs a new <CODE>SnmpCounter</CODE> from the specified <CODE>Integer</CODE> value.
42      * @param v The initialization value.
43      * @exception IllegalArgumentException The specified value is negative
44      * or larger than {@link SnmpUnsignedInt#MAX_VALUE SnmpUnsignedInt.MAX_VALUE}.
45      */

46     public SnmpCounter(Integer JavaDoc v) throws IllegalArgumentException JavaDoc {
47     super(v) ;
48     }
49
50     /**
51      * Constructs a new <CODE>SnmpCounter</CODE> from the specified long value.
52      * @param v The initialization value.
53      * @exception IllegalArgumentException The specified value is negative
54      * or larger than {@link SnmpUnsignedInt#MAX_VALUE SnmpUnsignedInt.MAX_VALUE}.
55      */

56     public SnmpCounter(long v) throws IllegalArgumentException JavaDoc {
57     super(v) ;
58     }
59
60     /**
61      * Constructs a new <CODE>SnmpCounter</CODE> from the specified <CODE>Long</CODE> value.
62      * @param v The initialization value.
63      * @exception IllegalArgumentException The specified value is negative
64      * or larger than {@link SnmpUnsignedInt#MAX_VALUE SnmpUnsignedInt.MAX_VALUE}.
65      */

66     public SnmpCounter(Long JavaDoc v) throws IllegalArgumentException JavaDoc {
67     super(v) ;
68     }
69
70     // PUBLIC METHODS
71
//---------------
72
/**
73      * Returns a textual description of the type object.
74      * @return ASN.1 textual description.
75      */

76     final public String JavaDoc getTypeName() {
77     return name ;
78     }
79
80     // VARIABLES
81
//----------
82
/**
83      * Name of the type.
84      */

85     final static String JavaDoc name = "Counter32" ;
86 }
87
Popular Tags