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.server;
027
028
029
030import java.net.InetAddress;
031import java.util.SortedSet;
032import org.opends.server.admin.server.ConfigurationChangeListener;
033import 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 */
045public 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 asterisk (*) 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   * asterisk (*) 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-address" property.
129   * <p>
130   * Specifies the address or set of addresses on which this SNMP
131   * Connection Handler should listen for connections from SNMP
132   * clients.
133   * <p>
134   * Multiple addresses may be provided as separate values for this
135   * attribute. If no values are provided, then the SNMP Connection
136   * Handler listens on all interfaces.
137   *
138   * @return Returns an unmodifiable set containing the values of the "listen-address" property.
139   */
140  SortedSet<InetAddress> getListenAddress();
141
142
143
144  /**
145   * Gets the "listen-port" property.
146   * <p>
147   * Specifies the port number on which the SNMP Connection Handler
148   * will listen for connections from clients.
149   * <p>
150   * Only a single port number may be provided.
151   *
152   * @return Returns the value of the "listen-port" property.
153   */
154  int getListenPort();
155
156
157
158  /**
159   * Gets the "opendmk-jarfile" property.
160   * <p>
161   * Indicates the OpenDMK runtime jar file location
162   *
163   * @return Returns the value of the "opendmk-jarfile" property.
164   */
165  String getOpendmkJarfile();
166
167
168
169  /**
170   * Gets the "registered-mbean" property.
171   * <p>
172   * Indicates whether the SNMP objects have to be registered in the
173   * directory server MBeanServer or not allowing to access SNMP
174   * Objects with RMI connector if enabled.
175   *
176   * @return Returns the value of the "registered-mbean" property.
177   */
178  boolean isRegisteredMbean();
179
180
181
182  /**
183   * Gets the "security-agent-file" property.
184   * <p>
185   * Specifies the USM security configuration to receive authenticated
186   * only SNMP requests.
187   *
188   * @return Returns the value of the "security-agent-file" property.
189   */
190  String getSecurityAgentFile();
191
192
193
194  /**
195   * Gets the "security-level" property.
196   * <p>
197   * Specifies the type of security level : NoAuthNoPriv : No security
198   * mechanisms activated, AuthNoPriv : Authentication activated with
199   * no privacy, AuthPriv : Authentication with privacy activated. This
200   * property is required for SNMP V3 security configuration.
201   *
202   * @return Returns the value of the "security-level" property.
203   */
204  SecurityLevel getSecurityLevel();
205
206
207
208  /**
209   * Gets the "trap-port" property.
210   * <p>
211   * Specifies the port to use to send SNMP Traps.
212   *
213   * @return Returns the value of the "trap-port" property.
214   */
215  int getTrapPort();
216
217
218
219  /**
220   * Gets the "traps-community" property.
221   * <p>
222   * Specifies the community string that must be included in the traps
223   * sent to define managers (trap-destinations). This property is used
224   * in the context of SNMP v1, v2 and v3.
225   *
226   * @return Returns the value of the "traps-community" property.
227   */
228  String getTrapsCommunity();
229
230
231
232  /**
233   * Gets the "traps-destination" property.
234   * <p>
235   * Specifies the hosts to which V1 traps will be sent. V1 Traps are
236   * sent to every host listed.
237   * <p>
238   * If this list is empty, V1 traps are sent to "localhost". Each
239   * host in the list must be identifed by its name or complete IP
240   * Addess.
241   *
242   * @return Returns an unmodifiable set containing the values of the "traps-destination" property.
243   */
244  SortedSet<String> getTrapsDestination();
245
246}