001/*
002 * The contents of this file are subject to the terms of the Common Development and
003 * Distribution License (the License). You may not use this file except in compliance with the
004 * License.
005 *
006 * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
007 * specific language governing permission and limitations under the License.
008 *
009 * When distributing Covered Software, include this CDDL Header Notice in each file and include
010 * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
011 * Header, with the fields enclosed by brackets [] replaced by your own identifying
012 * information: "Portions Copyright [year] [name of copyright owner]".
013 *
014 * Copyright 2008 Sun Microsystems, Inc.
015 */
016package org.forgerock.opendj.server.config.client;
017
018
019
020import java.net.InetAddress;
021import java.util.Collection;
022import java.util.SortedSet;
023import org.forgerock.opendj.config.ManagedObjectDefinition;
024import org.forgerock.opendj.config.PropertyException;
025import org.forgerock.opendj.server.config.server.JMXConnectionHandlerCfg;
026
027
028
029/**
030 * A client-side interface for reading and modifying JMX Connection
031 * Handler settings.
032 * <p>
033 * The JMX Connection Handler is used to interact with clients using
034 * the Java Management Extensions (JMX) protocol.
035 */
036public interface JMXConnectionHandlerCfgClient extends ConnectionHandlerCfgClient {
037
038  /**
039   * Get the configuration definition associated with this JMX Connection Handler.
040   *
041   * @return Returns the configuration definition associated with this JMX Connection Handler.
042   */
043  ManagedObjectDefinition<? extends JMXConnectionHandlerCfgClient, ? extends JMXConnectionHandlerCfg> definition();
044
045
046
047  /**
048   * Gets the "java-class" property.
049   * <p>
050   * Specifies the fully-qualified name of the Java class that
051   * provides the JMX Connection Handler implementation.
052   *
053   * @return Returns the value of the "java-class" property.
054   */
055  String getJavaClass();
056
057
058
059  /**
060   * Sets the "java-class" property.
061   * <p>
062   * Specifies the fully-qualified name of the Java class that
063   * provides the JMX Connection Handler implementation.
064   *
065   * @param value The value of the "java-class" property.
066   * @throws PropertyException
067   *           If the new value is invalid.
068   */
069  void setJavaClass(String value) throws PropertyException;
070
071
072
073  /**
074   * Gets the "key-manager-provider" property.
075   * <p>
076   * Specifies the name of the key manager that should be used with
077   * this JMX Connection Handler .
078   *
079   * @return Returns the value of the "key-manager-provider" property.
080   */
081  String getKeyManagerProvider();
082
083
084
085  /**
086   * Sets the "key-manager-provider" property.
087   * <p>
088   * Specifies the name of the key manager that should be used with
089   * this JMX Connection Handler .
090   *
091   * @param value The value of the "key-manager-provider" property.
092   * @throws PropertyException
093   *           If the new value is invalid.
094   */
095  void setKeyManagerProvider(String value) throws PropertyException;
096
097
098
099  /**
100   * Gets the "listen-address" property.
101   * <p>
102   * Specifies the address on which this JMX Connection Handler should
103   * listen for connections from JMX clients.
104   * <p>
105   * If no value is provided, then the JMX Connection Handler listens
106   * on all interfaces.
107   *
108   * @return Returns the value of the "listen-address" property.
109   */
110  InetAddress getListenAddress();
111
112
113
114  /**
115   * Sets the "listen-address" property.
116   * <p>
117   * Specifies the address on which this JMX Connection Handler should
118   * listen for connections from JMX clients.
119   * <p>
120   * If no value is provided, then the JMX Connection Handler listens
121   * on all interfaces.
122   *
123   * @param value The value of the "listen-address" property.
124   * @throws PropertyException
125   *           If the new value is invalid.
126   */
127  void setListenAddress(InetAddress value) throws PropertyException;
128
129
130
131  /**
132   * Gets the "listen-port" property.
133   * <p>
134   * Specifies the port number on which the JMX Connection Handler
135   * will listen for connections from clients.
136   * <p>
137   * Only a single port number may be provided.
138   *
139   * @return Returns the value of the "listen-port" property.
140   */
141  Integer getListenPort();
142
143
144
145  /**
146   * Sets the "listen-port" property.
147   * <p>
148   * Specifies the port number on which the JMX Connection Handler
149   * will listen for connections from clients.
150   * <p>
151   * Only a single port number may be provided.
152   *
153   * @param value The value of the "listen-port" property.
154   * @throws PropertyException
155   *           If the new value is invalid.
156   */
157  void setListenPort(int value) throws PropertyException;
158
159
160
161  /**
162   * Gets the "rmi-port" property.
163   * <p>
164   * Specifies the port number on which the JMX RMI service will
165   * listen for connections from clients. A value of 0 indicates the
166   * service to choose a port of its own.
167   * <p>
168   * If the value provided is different than 0, the value will be used
169   * as the RMI port. Otherwise, the RMI service will choose a port of
170   * its own.
171   *
172   * @return Returns the value of the "rmi-port" property.
173   */
174  int getRmiPort();
175
176
177
178  /**
179   * Sets the "rmi-port" property.
180   * <p>
181   * Specifies the port number on which the JMX RMI service will
182   * listen for connections from clients. A value of 0 indicates the
183   * service to choose a port of its own.
184   * <p>
185   * If the value provided is different than 0, the value will be used
186   * as the RMI port. Otherwise, the RMI service will choose a port of
187   * its own.
188   *
189   * @param value The value of the "rmi-port" property.
190   * @throws PropertyException
191   *           If the new value is invalid.
192   */
193  void setRmiPort(Integer value) throws PropertyException;
194
195
196
197  /**
198   * Gets the "ssl-cert-nickname" property.
199   * <p>
200   * Specifies the nicknames (also called the aliases) of the
201   * certificates that the JMX Connection Handler should use when
202   * performing SSL communication. The property can be used multiple
203   * times (referencing different nicknames) when an RSA, a DSA, and an
204   * ECC based server certificate is used in parallel.
205   * <p>
206   * This is only applicable when the JMX Connection Handler is
207   * configured to use SSL.
208   *
209   * @return Returns the values of the "ssl-cert-nickname" property.
210   */
211  SortedSet<String> getSSLCertNickname();
212
213
214
215  /**
216   * Sets the "ssl-cert-nickname" property.
217   * <p>
218   * Specifies the nicknames (also called the aliases) of the
219   * certificates that the JMX Connection Handler should use when
220   * performing SSL communication. The property can be used multiple
221   * times (referencing different nicknames) when an RSA, a DSA, and an
222   * ECC based server certificate is used in parallel.
223   * <p>
224   * This is only applicable when the JMX Connection Handler is
225   * configured to use SSL.
226   *
227   * @param values The values of the "ssl-cert-nickname" property.
228   * @throws PropertyException
229   *           If one or more of the new values are invalid.
230   */
231  void setSSLCertNickname(Collection<String> values) throws PropertyException;
232
233
234
235  /**
236   * Gets the "use-ssl" property.
237   * <p>
238   * Indicates whether the JMX Connection Handler should use SSL.
239   * <p>
240   * If enabled, the JMX Connection Handler will use SSL to encrypt
241   * communication with the clients.
242   *
243   * @return Returns the value of the "use-ssl" property.
244   */
245  boolean isUseSSL();
246
247
248
249  /**
250   * Sets the "use-ssl" property.
251   * <p>
252   * Indicates whether the JMX Connection Handler should use SSL.
253   * <p>
254   * If enabled, the JMX Connection Handler will use SSL to encrypt
255   * communication with the clients.
256   *
257   * @param value The value of the "use-ssl" property.
258   * @throws PropertyException
259   *           If the new value is invalid.
260   */
261  void setUseSSL(Boolean value) throws PropertyException;
262
263}