001 /*
002 * CDDL HEADER START
003 *
004 * The contents of this file are subject to the terms of the
005 * Common Development and Distribution License, Version 1.0 only
006 * (the "License"). You may not use this file except in compliance
007 * with the License.
008 *
009 * You can obtain a copy of the license at
010 * trunk/opends/resource/legal-notices/OpenDS.LICENSE
011 * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
012 * See the License for the specific language governing permissions
013 * and limitations under the License.
014 *
015 * When distributing Covered Code, include this CDDL HEADER in each
016 * file and include the License file at
017 * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
018 * add the following below this CDDL HEADER, with the fields enclosed
019 * by brackets "[]" replaced with your own identifying information:
020 * Portions Copyright [yyyy] [name of copyright owner]
021 *
022 * CDDL HEADER END
023 *
024 *
025 * Copyright 2008 Sun Microsystems, Inc.
026 */
027 package org.opends.server.admin.std.server;
028
029
030
031 import java.util.SortedSet;
032 import org.opends.server.admin.server.ConfigurationChangeListener;
033 import org.opends.server.admin.std.meta.SNMPConnectionHandlerCfgDefn.SecurityLevel;
034
035
036
037 /**
038 * A server-side interface for querying SNMP Connection Handler
039 * settings.
040 * <p>
041 * The SNMP Connection Handler can be used to process SNMP requests to
042 * retrieve monitoring information described by the MIB 2605. Supported
043 * protocol are SNMP V1, V2c and V3.
044 */
045 public interface SNMPConnectionHandlerCfg extends ConnectionHandlerCfg {
046
047 /**
048 * Gets the configuration class associated with this SNMP Connection Handler.
049 *
050 * @return Returns the configuration class associated with this SNMP Connection Handler.
051 */
052 Class<? extends SNMPConnectionHandlerCfg> configurationClass();
053
054
055
056 /**
057 * Register to be notified when this SNMP Connection Handler is changed.
058 *
059 * @param listener
060 * The SNMP Connection Handler configuration change listener.
061 */
062 void addSNMPChangeListener(ConfigurationChangeListener<SNMPConnectionHandlerCfg> listener);
063
064
065
066 /**
067 * Deregister an existing SNMP Connection Handler configuration change listener.
068 *
069 * @param listener
070 * The SNMP Connection Handler configuration change listener.
071 */
072 void removeSNMPChangeListener(ConfigurationChangeListener<SNMPConnectionHandlerCfg> listener);
073
074
075
076 /**
077 * Gets the "allowed-manager" property.
078 * <p>
079 * Specifies the hosts of the managers to be granted the access
080 * rights. This property is required for SNMP v1 and v2 security
081 * configuration. An asterik (*) opens access to all managers.
082 *
083 * @return Returns an unmodifiable set containing the values of the "allowed-manager" property.
084 */
085 SortedSet<String> getAllowedManager();
086
087
088
089 /**
090 * Gets the "allowed-user" property.
091 * <p>
092 * Specifies the users to be granted the access rights. This
093 * property is required for SNMP v3 security configuration. An
094 * asterik (*) opens access to all users.
095 *
096 * @return Returns an unmodifiable set containing the values of the "allowed-user" property.
097 */
098 SortedSet<String> getAllowedUser();
099
100
101
102 /**
103 * Gets the "community" property.
104 * <p>
105 * Specifies the v1,v2 community or the v3 context name allowed to
106 * access the MIB 2605 monitoring information or the USM MIB. The
107 * mapping between "community" and "context name" is set.
108 *
109 * @return Returns the value of the "community" property.
110 */
111 String getCommunity();
112
113
114
115 /**
116 * Gets the "java-class" property.
117 * <p>
118 * Specifies the fully-qualified name of the Java class that
119 * provides the SNMP Connection Handler implementation.
120 *
121 * @return Returns the value of the "java-class" property.
122 */
123 String getJavaClass();
124
125
126
127 /**
128 * Gets the "listen-port" property.
129 * <p>
130 * Specifies the port number on which the SNMP Connection Handler
131 * will listen for connections from clients.
132 * <p>
133 * Only a single port number may be provided.
134 *
135 * @return Returns the value of the "listen-port" property.
136 */
137 int getListenPort();
138
139
140
141 /**
142 * Gets the "opendmk-jarfile" property.
143 * <p>
144 * Indicates the OpenDMK runtime jar file location
145 *
146 * @return Returns the value of the "opendmk-jarfile" property.
147 */
148 String getOpendmkJarfile();
149
150
151
152 /**
153 * Gets the "registered-mbean" property.
154 * <p>
155 * Indicates whether the SNMP objects have to be registered in the
156 * Directory Server MBeanServer or not allowing to access SNMP
157 * Objects with RMI connector if enabled.
158 *
159 * @return Returns the value of the "registered-mbean" property.
160 */
161 boolean isRegisteredMbean();
162
163
164
165 /**
166 * Gets the "security-agent-file" property.
167 * <p>
168 * Specifies the USM security configuration to receive authenticated
169 * only SNMP requests.
170 *
171 * @return Returns the value of the "security-agent-file" property.
172 */
173 String getSecurityAgentFile();
174
175
176
177 /**
178 * Gets the "security-level" property.
179 * <p>
180 * Specifies the type of security level : NoAuthNoPriv : No security
181 * mechanisms activated, AuthNoPriv : Authentication activated with
182 * no privacy, AuthPriv : Authentication with privacy activated. This
183 * property id required for SNMP V3 security configuration.
184 *
185 * @return Returns the value of the "security-level" property.
186 */
187 SecurityLevel getSecurityLevel();
188
189
190
191 /**
192 * Gets the "trap-port" property.
193 * <p>
194 * Specifies the port to use to send SNMP Traps.
195 *
196 * @return Returns the value of the "trap-port" property.
197 */
198 int getTrapPort();
199
200
201
202 /**
203 * Gets the "traps-community" property.
204 * <p>
205 * Specifies the community string that must be include in the traps
206 * sent to define managers (trap-destinations). This property is used
207 * in the context of SNMP v1, v2 and v3.
208 *
209 * @return Returns the value of the "traps-community" property.
210 */
211 String getTrapsCommunity();
212
213
214
215 /**
216 * Gets the "traps-destination" property.
217 * <p>
218 * Specifies the hosts to which V1 traps will be sent. V1 Traps are
219 * sent to every host listed.
220 * <p>
221 * If this list is empty, V1 traps are sent to "localhost". Each
222 * host in the list must be identifed by its name or complete IP
223 * Addess.
224 *
225 * @return Returns an unmodifiable set containing the values of the "traps-destination" property.
226 */
227 SortedSet<String> getTrapsDestination();
228
229 }