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.client;
028    
029    
030    
031    import java.util.Collection;
032    import java.util.SortedSet;
033    import org.opends.server.admin.IllegalPropertyValueException;
034    import org.opends.server.admin.ManagedObjectDefinition;
035    import org.opends.server.admin.std.meta.SNMPConnectionHandlerCfgDefn.SecurityLevel;
036    import 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     */
048    public 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 asterik (*) 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 asterik (*) opens access to all managers.
078       *
079       * @param values The values of the "allowed-manager" property.
080       * @throws IllegalPropertyValueException
081       *           If one or more of the new values are invalid.
082       */
083      void setAllowedManager(Collection<String> values) throws IllegalPropertyValueException;
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       * asterik (*) 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       * asterik (*) opens access to all users.
106       *
107       * @param values The values of the "allowed-user" property.
108       * @throws IllegalPropertyValueException
109       *           If one or more of the new values are invalid.
110       */
111      void setAllowedUser(Collection<String> values) throws IllegalPropertyValueException;
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 IllegalPropertyValueException
137       *           If the new value is invalid.
138       */
139      void setCommunity(String value) throws IllegalPropertyValueException;
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 IllegalPropertyValueException
163       *           If the new value is invalid.
164       */
165      void setJavaClass(String value) throws IllegalPropertyValueException;
166    
167    
168    
169      /**
170       * Gets the "listen-port" property.
171       * <p>
172       * Specifies the port number on which the SNMP Connection Handler
173       * will listen for connections from clients.
174       * <p>
175       * Only a single port number may be provided.
176       *
177       * @return Returns the value of the "listen-port" property.
178       */
179      Integer getListenPort();
180    
181    
182    
183      /**
184       * Sets the "listen-port" property.
185       * <p>
186       * Specifies the port number on which the SNMP Connection Handler
187       * will listen for connections from clients.
188       * <p>
189       * Only a single port number may be provided.
190       *
191       * @param value The value of the "listen-port" property.
192       * @throws IllegalPropertyValueException
193       *           If the new value is invalid.
194       */
195      void setListenPort(int value) throws IllegalPropertyValueException;
196    
197    
198    
199      /**
200       * Gets the "opendmk-jarfile" property.
201       * <p>
202       * Indicates the OpenDMK runtime jar file location
203       *
204       * @return Returns the value of the "opendmk-jarfile" property.
205       */
206      String getOpendmkJarfile();
207    
208    
209    
210      /**
211       * Sets the "opendmk-jarfile" property.
212       * <p>
213       * Indicates the OpenDMK runtime jar file location
214       *
215       * @param value The value of the "opendmk-jarfile" property.
216       * @throws IllegalPropertyValueException
217       *           If the new value is invalid.
218       */
219      void setOpendmkJarfile(String value) throws IllegalPropertyValueException;
220    
221    
222    
223      /**
224       * Gets the "registered-mbean" property.
225       * <p>
226       * Indicates whether the SNMP objects have to be registered in the
227       * Directory Server MBeanServer or not allowing to access SNMP
228       * Objects with RMI connector if enabled.
229       *
230       * @return Returns the value of the "registered-mbean" property.
231       */
232      boolean isRegisteredMbean();
233    
234    
235    
236      /**
237       * Sets the "registered-mbean" property.
238       * <p>
239       * Indicates whether the SNMP objects have to be registered in the
240       * Directory Server MBeanServer or not allowing to access SNMP
241       * Objects with RMI connector if enabled.
242       *
243       * @param value The value of the "registered-mbean" property.
244       * @throws IllegalPropertyValueException
245       *           If the new value is invalid.
246       */
247      void setRegisteredMbean(Boolean value) throws IllegalPropertyValueException;
248    
249    
250    
251      /**
252       * Gets the "security-agent-file" property.
253       * <p>
254       * Specifies the USM security configuration to receive authenticated
255       * only SNMP requests.
256       *
257       * @return Returns the value of the "security-agent-file" property.
258       */
259      String getSecurityAgentFile();
260    
261    
262    
263      /**
264       * Sets the "security-agent-file" property.
265       * <p>
266       * Specifies the USM security configuration to receive authenticated
267       * only SNMP requests.
268       *
269       * @param value The value of the "security-agent-file" property.
270       * @throws IllegalPropertyValueException
271       *           If the new value is invalid.
272       */
273      void setSecurityAgentFile(String value) throws IllegalPropertyValueException;
274    
275    
276    
277      /**
278       * Gets the "security-level" property.
279       * <p>
280       * Specifies the type of security level : NoAuthNoPriv : No security
281       * mechanisms activated, AuthNoPriv : Authentication activated with
282       * no privacy, AuthPriv : Authentication with privacy activated. This
283       * property id required for SNMP V3 security configuration.
284       *
285       * @return Returns the value of the "security-level" property.
286       */
287      SecurityLevel getSecurityLevel();
288    
289    
290    
291      /**
292       * Sets the "security-level" property.
293       * <p>
294       * Specifies the type of security level : NoAuthNoPriv : No security
295       * mechanisms activated, AuthNoPriv : Authentication activated with
296       * no privacy, AuthPriv : Authentication with privacy activated. This
297       * property id required for SNMP V3 security configuration.
298       *
299       * @param value The value of the "security-level" property.
300       * @throws IllegalPropertyValueException
301       *           If the new value is invalid.
302       */
303      void setSecurityLevel(SecurityLevel value) throws IllegalPropertyValueException;
304    
305    
306    
307      /**
308       * Gets the "trap-port" property.
309       * <p>
310       * Specifies the port to use to send SNMP Traps.
311       *
312       * @return Returns the value of the "trap-port" property.
313       */
314      Integer getTrapPort();
315    
316    
317    
318      /**
319       * Sets the "trap-port" property.
320       * <p>
321       * Specifies the port to use to send SNMP Traps.
322       *
323       * @param value The value of the "trap-port" property.
324       * @throws IllegalPropertyValueException
325       *           If the new value is invalid.
326       */
327      void setTrapPort(int value) throws IllegalPropertyValueException;
328    
329    
330    
331      /**
332       * Gets the "traps-community" property.
333       * <p>
334       * Specifies the community string that must be include in the traps
335       * sent to define managers (trap-destinations). This property is used
336       * in the context of SNMP v1, v2 and v3.
337       *
338       * @return Returns the value of the "traps-community" property.
339       */
340      String getTrapsCommunity();
341    
342    
343    
344      /**
345       * Sets the "traps-community" property.
346       * <p>
347       * Specifies the community string that must be include in the traps
348       * sent to define managers (trap-destinations). This property is used
349       * in the context of SNMP v1, v2 and v3.
350       *
351       * @param value The value of the "traps-community" property.
352       * @throws IllegalPropertyValueException
353       *           If the new value is invalid.
354       */
355      void setTrapsCommunity(String value) throws IllegalPropertyValueException;
356    
357    
358    
359      /**
360       * Gets the "traps-destination" property.
361       * <p>
362       * Specifies the hosts to which V1 traps will be sent. V1 Traps are
363       * sent to every host listed.
364       * <p>
365       * If this list is empty, V1 traps are sent to "localhost". Each
366       * host in the list must be identifed by its name or complete IP
367       * Addess.
368       *
369       * @return Returns the values of the "traps-destination" property.
370       */
371      SortedSet<String> getTrapsDestination();
372    
373    
374    
375      /**
376       * Sets the "traps-destination" property.
377       * <p>
378       * Specifies the hosts to which V1 traps will be sent. V1 Traps are
379       * sent to every host listed.
380       * <p>
381       * If this list is empty, V1 traps are sent to "localhost". Each
382       * host in the list must be identifed by its name or complete IP
383       * Addess.
384       *
385       * @param values The values of the "traps-destination" property.
386       * @throws IllegalPropertyValueException
387       *           If one or more of the new values are invalid.
388       */
389      void setTrapsDestination(Collection<String> values) throws IllegalPropertyValueException;
390    
391    }