Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/classes/com/sun/jmx/snmp/SnmpEngine.java
38924 views
/*1* Copyright (c) 2002, 2003, 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*/24package com.sun.jmx.snmp;2526/**27* This engine is conformant with the RFC 2571. It is the main object within an SNMP entity (agent, manager...).28* To an engine is associated an {@link SnmpEngineId}.29* Engine instantiation is based on a factory {@link com.sun.jmx.snmp.SnmpEngineFactory SnmpEngineFactory}.30* When an <CODE> SnmpEngine </CODE> is created, a User based Security Model (USM) is initialized. The security configuration is located in a text file.31* The text file is read when the engine is created.32* <p>Note that the engine is not used when the agent is SNMPv1/SNMPv2 only.33<P> The USM configuration text file is remotely updatable using the USM Mib.</P>34<P> User that are configured in the Usm text file are nonVolatile. </P>35<P> Usm Mib userEntry supported storage type values are : volatile or nonVolatile only. Other values are rejected and a wrongValue is returned) </P>36<ul>37<li> volatile means that user entry is not flushed in security file </li>38<li> nonVolatile means that user entry is flushed in security file </li>39<li> If a nonVolatile row is set to be volatile, it will be not flushed in the file </li>40<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>41</ul>42* <p><b>This API is a Sun Microsystems internal API and is subject43* to change without notice.</b></p>44* @since 1.545*/46public interface SnmpEngine {47/**48* Gets the engine time in seconds. This is the time from the last reboot.49* @return The time from the last reboot.50*/51public int getEngineTime();52/**53* Gets the engine Id. This is unique for each engine.54* @return The engine Id object.55*/56public SnmpEngineId getEngineId();5758/**59* 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.60* @return The engine's number of reboot.61*/62public int getEngineBoots();6364/**65* Gets the Usm key handler.66* @return The key handler.67*/68public SnmpUsmKeyHandler getUsmKeyHandler();69}707172