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 legal-notices/CDDLv1_0.txt 010 * or http://forgerock.org/license/CDDLv1.0.html. 011 * See the License for the specific language governing permissions 012 * and limitations under the License. 013 * 014 * When distributing Covered Code, include this CDDL HEADER in each 015 * file and include the License file at legal-notices/CDDLv1_0.txt. 016 * If applicable, add the following below this CDDL HEADER, with the 017 * fields enclosed by brackets "[]" replaced with your own identifying 018 * information: 019 * Portions Copyright [yyyy] [name of copyright owner] 020 * 021 * CDDL HEADER END 022 * 023 * 024 * Copyright 2008 Sun Microsystems, Inc. 025 */ 026package org.opends.server.admin.std.client; 027 028 029 030import java.net.InetAddress; 031import java.util.Collection; 032import java.util.SortedSet; 033import org.opends.server.admin.ManagedObjectDefinition; 034import org.opends.server.admin.PropertyException; 035import org.opends.server.admin.std.meta.SNMPConnectionHandlerCfgDefn.SecurityLevel; 036import org.opends.server.admin.std.server.SNMPConnectionHandlerCfg; 037 038 039 040/** 041 * A client-side interface for reading and modifying SNMP Connection 042 * Handler settings. 043 * <p> 044 * The SNMP Connection Handler can be used to process SNMP requests to 045 * retrieve monitoring information described by the MIB 2605. Supported 046 * protocol are SNMP V1, V2c and V3. 047 */ 048public interface SNMPConnectionHandlerCfgClient extends ConnectionHandlerCfgClient { 049 050 /** 051 * Get the configuration definition associated with this SNMP Connection Handler. 052 * 053 * @return Returns the configuration definition associated with this SNMP Connection Handler. 054 */ 055 ManagedObjectDefinition<? extends SNMPConnectionHandlerCfgClient, ? extends SNMPConnectionHandlerCfg> definition(); 056 057 058 059 /** 060 * Gets the "allowed-manager" property. 061 * <p> 062 * Specifies the hosts of the managers to be granted the access 063 * rights. This property is required for SNMP v1 and v2 security 064 * configuration. An asterisk (*) opens access to all managers. 065 * 066 * @return Returns the values of the "allowed-manager" property. 067 */ 068 SortedSet<String> getAllowedManager(); 069 070 071 072 /** 073 * Sets the "allowed-manager" property. 074 * <p> 075 * Specifies the hosts of the managers to be granted the access 076 * rights. This property is required for SNMP v1 and v2 security 077 * configuration. An asterisk (*) opens access to all managers. 078 * 079 * @param values The values of the "allowed-manager" property. 080 * @throws PropertyException 081 * If one or more of the new values are invalid. 082 */ 083 void setAllowedManager(Collection<String> values) throws PropertyException; 084 085 086 087 /** 088 * Gets the "allowed-user" property. 089 * <p> 090 * Specifies the users to be granted the access rights. This 091 * property is required for SNMP v3 security configuration. An 092 * asterisk (*) opens access to all users. 093 * 094 * @return Returns the values of the "allowed-user" property. 095 */ 096 SortedSet<String> getAllowedUser(); 097 098 099 100 /** 101 * Sets the "allowed-user" property. 102 * <p> 103 * Specifies the users to be granted the access rights. This 104 * property is required for SNMP v3 security configuration. An 105 * asterisk (*) opens access to all users. 106 * 107 * @param values The values of the "allowed-user" property. 108 * @throws PropertyException 109 * If one or more of the new values are invalid. 110 */ 111 void setAllowedUser(Collection<String> values) throws PropertyException; 112 113 114 115 /** 116 * Gets the "community" property. 117 * <p> 118 * Specifies the v1,v2 community or the v3 context name allowed to 119 * access the MIB 2605 monitoring information or the USM MIB. The 120 * mapping between "community" and "context name" is set. 121 * 122 * @return Returns the value of the "community" property. 123 */ 124 String getCommunity(); 125 126 127 128 /** 129 * Sets the "community" property. 130 * <p> 131 * Specifies the v1,v2 community or the v3 context name allowed to 132 * access the MIB 2605 monitoring information or the USM MIB. The 133 * mapping between "community" and "context name" is set. 134 * 135 * @param value The value of the "community" property. 136 * @throws PropertyException 137 * If the new value is invalid. 138 */ 139 void setCommunity(String value) throws PropertyException; 140 141 142 143 /** 144 * Gets the "java-class" property. 145 * <p> 146 * Specifies the fully-qualified name of the Java class that 147 * provides the SNMP Connection Handler implementation. 148 * 149 * @return Returns the value of the "java-class" property. 150 */ 151 String getJavaClass(); 152 153 154 155 /** 156 * Sets the "java-class" property. 157 * <p> 158 * Specifies the fully-qualified name of the Java class that 159 * provides the SNMP Connection Handler implementation. 160 * 161 * @param value The value of the "java-class" property. 162 * @throws PropertyException 163 * If the new value is invalid. 164 */ 165 void setJavaClass(String value) throws PropertyException; 166 167 168 169 /** 170 * Gets the "listen-address" property. 171 * <p> 172 * Specifies the address or set of addresses on which this SNMP 173 * Connection Handler should listen for connections from SNMP 174 * clients. 175 * <p> 176 * Multiple addresses may be provided as separate values for this 177 * attribute. If no values are provided, then the SNMP Connection 178 * Handler listens on all interfaces. 179 * 180 * @return Returns the values of the "listen-address" property. 181 */ 182 SortedSet<InetAddress> getListenAddress(); 183 184 185 186 /** 187 * Sets the "listen-address" property. 188 * <p> 189 * Specifies the address or set of addresses on which this SNMP 190 * Connection Handler should listen for connections from SNMP 191 * clients. 192 * <p> 193 * Multiple addresses may be provided as separate values for this 194 * attribute. If no values are provided, then the SNMP Connection 195 * Handler listens on all interfaces. 196 * <p> 197 * This property is read-only and can only be modified during 198 * creation of a SNMP Connection Handler. 199 * 200 * @param values The values of the "listen-address" property. 201 * @throws PropertyException 202 * If one or more of the new values are invalid. 203 * @throws PropertyException 204 * If this SNMP Connection Handler is not being initialized. 205 */ 206 void setListenAddress(Collection<InetAddress> values) throws PropertyException, PropertyException; 207 208 209 210 /** 211 * Gets the "listen-port" property. 212 * <p> 213 * Specifies the port number on which the SNMP Connection Handler 214 * will listen for connections from clients. 215 * <p> 216 * Only a single port number may be provided. 217 * 218 * @return Returns the value of the "listen-port" property. 219 */ 220 Integer getListenPort(); 221 222 223 224 /** 225 * Sets the "listen-port" property. 226 * <p> 227 * Specifies the port number on which the SNMP Connection Handler 228 * will listen for connections from clients. 229 * <p> 230 * Only a single port number may be provided. 231 * 232 * @param value The value of the "listen-port" property. 233 * @throws PropertyException 234 * If the new value is invalid. 235 */ 236 void setListenPort(int value) throws PropertyException; 237 238 239 240 /** 241 * Gets the "opendmk-jarfile" property. 242 * <p> 243 * Indicates the OpenDMK runtime jar file location 244 * 245 * @return Returns the value of the "opendmk-jarfile" property. 246 */ 247 String getOpendmkJarfile(); 248 249 250 251 /** 252 * Sets the "opendmk-jarfile" property. 253 * <p> 254 * Indicates the OpenDMK runtime jar file location 255 * 256 * @param value The value of the "opendmk-jarfile" property. 257 * @throws PropertyException 258 * If the new value is invalid. 259 */ 260 void setOpendmkJarfile(String value) throws PropertyException; 261 262 263 264 /** 265 * Gets the "registered-mbean" property. 266 * <p> 267 * Indicates whether the SNMP objects have to be registered in the 268 * directory server MBeanServer or not allowing to access SNMP 269 * Objects with RMI connector if enabled. 270 * 271 * @return Returns the value of the "registered-mbean" property. 272 */ 273 boolean isRegisteredMbean(); 274 275 276 277 /** 278 * Sets the "registered-mbean" property. 279 * <p> 280 * Indicates whether the SNMP objects have to be registered in the 281 * directory server MBeanServer or not allowing to access SNMP 282 * Objects with RMI connector if enabled. 283 * 284 * @param value The value of the "registered-mbean" property. 285 * @throws PropertyException 286 * If the new value is invalid. 287 */ 288 void setRegisteredMbean(Boolean value) throws PropertyException; 289 290 291 292 /** 293 * Gets the "security-agent-file" property. 294 * <p> 295 * Specifies the USM security configuration to receive authenticated 296 * only SNMP requests. 297 * 298 * @return Returns the value of the "security-agent-file" property. 299 */ 300 String getSecurityAgentFile(); 301 302 303 304 /** 305 * Sets the "security-agent-file" property. 306 * <p> 307 * Specifies the USM security configuration to receive authenticated 308 * only SNMP requests. 309 * 310 * @param value The value of the "security-agent-file" property. 311 * @throws PropertyException 312 * If the new value is invalid. 313 */ 314 void setSecurityAgentFile(String value) throws PropertyException; 315 316 317 318 /** 319 * Gets the "security-level" property. 320 * <p> 321 * Specifies the type of security level : NoAuthNoPriv : No security 322 * mechanisms activated, AuthNoPriv : Authentication activated with 323 * no privacy, AuthPriv : Authentication with privacy activated. This 324 * property is required for SNMP V3 security configuration. 325 * 326 * @return Returns the value of the "security-level" property. 327 */ 328 SecurityLevel getSecurityLevel(); 329 330 331 332 /** 333 * Sets the "security-level" property. 334 * <p> 335 * Specifies the type of security level : NoAuthNoPriv : No security 336 * mechanisms activated, AuthNoPriv : Authentication activated with 337 * no privacy, AuthPriv : Authentication with privacy activated. This 338 * property is required for SNMP V3 security configuration. 339 * 340 * @param value The value of the "security-level" property. 341 * @throws PropertyException 342 * If the new value is invalid. 343 */ 344 void setSecurityLevel(SecurityLevel value) throws PropertyException; 345 346 347 348 /** 349 * Gets the "trap-port" property. 350 * <p> 351 * Specifies the port to use to send SNMP Traps. 352 * 353 * @return Returns the value of the "trap-port" property. 354 */ 355 Integer getTrapPort(); 356 357 358 359 /** 360 * Sets the "trap-port" property. 361 * <p> 362 * Specifies the port to use to send SNMP Traps. 363 * 364 * @param value The value of the "trap-port" property. 365 * @throws PropertyException 366 * If the new value is invalid. 367 */ 368 void setTrapPort(int value) throws PropertyException; 369 370 371 372 /** 373 * Gets the "traps-community" property. 374 * <p> 375 * Specifies the community string that must be included in the traps 376 * sent to define managers (trap-destinations). This property is used 377 * in the context of SNMP v1, v2 and v3. 378 * 379 * @return Returns the value of the "traps-community" property. 380 */ 381 String getTrapsCommunity(); 382 383 384 385 /** 386 * Sets the "traps-community" property. 387 * <p> 388 * Specifies the community string that must be included in the traps 389 * sent to define managers (trap-destinations). This property is used 390 * in the context of SNMP v1, v2 and v3. 391 * 392 * @param value The value of the "traps-community" property. 393 * @throws PropertyException 394 * If the new value is invalid. 395 */ 396 void setTrapsCommunity(String value) throws PropertyException; 397 398 399 400 /** 401 * Gets the "traps-destination" property. 402 * <p> 403 * Specifies the hosts to which V1 traps will be sent. V1 Traps are 404 * sent to every host listed. 405 * <p> 406 * If this list is empty, V1 traps are sent to "localhost". Each 407 * host in the list must be identifed by its name or complete IP 408 * Addess. 409 * 410 * @return Returns the values of the "traps-destination" property. 411 */ 412 SortedSet<String> getTrapsDestination(); 413 414 415 416 /** 417 * Sets the "traps-destination" property. 418 * <p> 419 * Specifies the hosts to which V1 traps will be sent. V1 Traps are 420 * sent to every host listed. 421 * <p> 422 * If this list is empty, V1 traps are sent to "localhost". Each 423 * host in the list must be identifed by its name or complete IP 424 * Addess. 425 * 426 * @param values The values of the "traps-destination" property. 427 * @throws PropertyException 428 * If one or more of the new values are invalid. 429 */ 430 void setTrapsDestination(Collection<String> values) throws PropertyException; 431 432}