0N/A/*
2362N/A * Copyright (c) 2002, 2006, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
2362N/A * published by the Free Software Foundation. Oracle designates this
0N/A * particular file as subject to the "Classpath" exception as provided
2362N/A * by Oracle in the LICENSE file that accompanied this code.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A * or visit www.oracle.com if you need additional information or have any
2362N/A * questions.
0N/A */
0N/A
0N/Apackage com.sun.jmx.snmp;
0N/A
0N/Aimport java.io.Serializable;
0N/A
0N/A/**
0N/A * This class is used to pass some specific parameters to an <CODE>
0N/A * SnmpEngineFactory </CODE>.
0N/A *
0N/A * <p><b>This API is a Sun Microsystems internal API and is subject
0N/A * to change without notice.</b></p>
0N/A * @since 1.5
0N/A */
0N/Apublic class SnmpEngineParameters implements Serializable {
0N/A private static final long serialVersionUID = 3720556613478400808L;
0N/A
0N/A private UserAcl uacl = null;
0N/A private String securityFile = null;
0N/A private boolean encrypt = false;
0N/A private SnmpEngineId engineId = null;
0N/A
0N/A /**
0N/A * Sets the file to use for SNMP Runtime Lcd. If no file is provided, the default location will be checked.
0N/A */
0N/A public void setSecurityFile(String securityFile) {
0N/A this.securityFile = securityFile;
0N/A }
0N/A
0N/A /**
0N/A * Gets the file to use for SNMP Runtime Lcd.
0N/A * @return The security file.
0N/A */
0N/A public String getSecurityFile() {
0N/A return securityFile;
0N/A }
0N/A /**
0N/A * Sets a customized user ACL. User Acl is used in order to check
0N/A * access for SNMP V3 requests. If no ACL is provided,
0N/A * <CODE>com.sun.jmx.snmp.usm.UserAcl.UserAcl</CODE> is instantiated.
0N/A * @param uacl The user ACL to use.
0N/A */
0N/A public void setUserAcl(UserAcl uacl) {
0N/A this.uacl = uacl;
0N/A }
0N/A
0N/A /**
0N/A * Gets the customized user ACL.
0N/A * @return The customized user ACL.
0N/A */
0N/A public UserAcl getUserAcl() {
0N/A return uacl;
0N/A }
0N/A
0N/A /**
0N/A * Activate SNMP V3 encryption. By default the encryption is not activated. Be sure that the security provider classes needed for DES are in your classpath (eg:JCE classes)
0N/A *
0N/A */
0N/A public void activateEncryption() {
0N/A this.encrypt = true;
0N/A }
0N/A
0N/A /**
0N/A * Deactivate SNMP V3 encryption. By default the encryption is not activated. Be sure that the security provider classes needed for DES are in your classpath (eg:JCE classes)
0N/A *
0N/A */
0N/A public void deactivateEncryption() {
0N/A this.encrypt = false;
0N/A }
0N/A
0N/A /**
0N/A * Check if encryption is activated. By default the encryption is not activated.
0N/A * @return The encryption activation status.
0N/A */
0N/A public boolean isEncryptionEnabled() {
0N/A return encrypt;
0N/A }
0N/A
0N/A /**
0N/A * Set the engine Id.
0N/A * @param engineId The engine Id to use.
0N/A */
0N/A public void setEngineId(SnmpEngineId engineId) {
0N/A this.engineId = engineId;
0N/A }
0N/A
0N/A /**
0N/A * Get the engine Id.
0N/A * @return The engineId.
0N/A */
0N/A public SnmpEngineId getEngineId() {
0N/A return engineId;
0N/A }
0N/A}