KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * @(#)file SnmpEngine.java
3  * @(#)author Sun Microsystems, Inc.
4  * @(#)version 1.19
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 package com.sun.jmx.snmp;
12
13 /**
14  * This engine is conformant with the RFC 2571. It is the main object within an SNMP entity (agent, manager...).
15  * To an engine is associated an {@link SnmpEngineId}.
16  * Engine instantiation is based on a factory {@link com.sun.jmx.snmp.SnmpEngineFactory SnmpEngineFactory}.
17  * When an <CODE> SnmpEngine </CODE> is created, a User based Security Model (USM) is initialized. The security configuration is located in a text file.
18  * The text file is read when the engine is created.
19  * <p>Note that the engine is not used when the agent is SNMPv1/SNMPv2 only.
20 <P> The USM configuration text file is remotely updatable using the USM Mib.</P>
21 <P> User that are configured in the Usm text file are nonVolatile. </P>
22 <P> Usm Mib userEntry supported storage type values are : volatile or nonVolatile only. Other values are rejected and a wrongValue is returned) </P>
23 <ul>
24 <li> volatile means that user entry is not flushed in security file </li>
25 <li> nonVolatile means that user entry is flushed in security file </li>
26 <li> If a nonVolatile row is set to be volatile, it will be not flushed in the file </li>
27 <li>If a volatile row created from the UsmMib is set to nonVolatile, it will be flushed in the file (if the file exist and is writable otherwise an inconsistentValue is returned)</li>
28 </ul>
29  * <p><b>This API is a Sun Microsystems internal API and is subject
30  * to change without notice.</b></p>
31  * @since 1.5
32  */

33 public interface SnmpEngine {
34     /**
35      * Gets the engine time in seconds. This is the time from the last reboot.
36      * @return The time from the last reboot.
37      */

38     public int getEngineTime();
39     /**
40      * Gets the engine Id. This is unique for each engine.
41      * @return The engine Id object.
42      */

43     public SnmpEngineId getEngineId();
44
45     /**
46      * Gets the engine boot number. This is the number of time this engine has rebooted. Each time an <CODE>SnmpEngine</CODE> is instantiated, it will read this value in its Lcd, and store back the value incremented by one.
47      * @return The engine's number of reboot.
48      */

49     public int getEngineBoots();
50
51     /**
52      * Gets the Usm key handler.
53      * @return The key handler.
54      */

55     public SnmpUsmKeyHandler getUsmKeyHandler();
56 }
57
Popular Tags