KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * @(#)file SnmpPduTrap.java
3  * @(#)author Sun Microsystems, Inc.
4  * @(#)version 4.10
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 SNMPv1-trap PDU.
19  * <P>
20  * You will not usually need to use this class, except if you
21  * decide to implement your own
22  * {@link com.sun.jmx.snmp.SnmpPduFactory SnmpPduFactory} object.
23  * <P>
24  * The <CODE>SnmpPduTrap</CODE> extends {@link com.sun.jmx.snmp.SnmpPduPacket SnmpPduPacket}
25  * and defines attributes specific to an SNMPv1 trap (see RFC1157).
26  *
27  * <p><b>This API is a Sun Microsystems internal API and is subject
28  * to change without notice.</b></p>
29  * @version 4.10 12/19/03
30  * @author Sun Microsystems, Inc
31  */

32
33 public class SnmpPduTrap extends SnmpPduPacket {
34
35     
36     /**
37      * Enterprise object identifier.
38      * @serial
39      */

40     public SnmpOid enterprise ;
41   
42     /**
43      * Agent address. If the agent address source was not an IPv4 one (eg : IPv6), this field is null.
44      * @serial
45      */

46     public SnmpIpAddress agentAddr ;
47   
48     /**
49      * Generic trap number.
50      * <BR>
51      * The possible values are defined in
52      * {@link com.sun.jmx.snmp.SnmpDefinitions#trapColdStart SnmpDefinitions}.
53      * @serial
54      */

55     public int genericTrap ;
56   
57     /**
58      * Specific trap number.
59      * @serial
60      */

61     public int specificTrap ;
62   
63     /**
64      * Time-stamp.
65      * @serial
66      */

67     public long timeStamp ;
68
69
70
71     /**
72      * Builds a new trap PDU.
73      * <BR><CODE>type</CODE> and <CODE>version</CODE> fields are initialized with
74      * {@link com.sun.jmx.snmp.SnmpDefinitions#pduV1TrapPdu pduV1TrapPdu}
75      * and {@link com.sun.jmx.snmp.SnmpDefinitions#snmpVersionOne snmpVersionOne}.
76      */

77     public SnmpPduTrap() {
78     type = pduV1TrapPdu ;
79     version = snmpVersionOne ;
80     }
81 }
82
83
84
85
86
Popular Tags