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 org.opends.server.admin.ManagedObjectDefinition;
032import org.opends.server.admin.PropertyException;
033import org.opends.server.admin.std.server.JMXConnectionHandlerCfg;
034
035
036
037/**
038 * A client-side interface for reading and modifying JMX Connection
039 * Handler settings.
040 * <p>
041 * The JMX Connection Handler is used to interact with clients using
042 * the Java Management Extensions (JMX) protocol.
043 */
044public interface JMXConnectionHandlerCfgClient extends ConnectionHandlerCfgClient {
045
046  /**
047   * Get the configuration definition associated with this JMX Connection Handler.
048   *
049   * @return Returns the configuration definition associated with this JMX Connection Handler.
050   */
051  ManagedObjectDefinition<? extends JMXConnectionHandlerCfgClient, ? extends JMXConnectionHandlerCfg> definition();
052
053
054
055  /**
056   * Gets the "java-class" property.
057   * <p>
058   * Specifies the fully-qualified name of the Java class that
059   * provides the JMX Connection Handler implementation.
060   *
061   * @return Returns the value of the "java-class" property.
062   */
063  String getJavaClass();
064
065
066
067  /**
068   * Sets the "java-class" property.
069   * <p>
070   * Specifies the fully-qualified name of the Java class that
071   * provides the JMX Connection Handler implementation.
072   *
073   * @param value The value of the "java-class" property.
074   * @throws PropertyException
075   *           If the new value is invalid.
076   */
077  void setJavaClass(String value) throws PropertyException;
078
079
080
081  /**
082   * Gets the "key-manager-provider" property.
083   * <p>
084   * Specifies the name of the key manager that should be used with
085   * this JMX Connection Handler .
086   *
087   * @return Returns the value of the "key-manager-provider" property.
088   */
089  String getKeyManagerProvider();
090
091
092
093  /**
094   * Sets the "key-manager-provider" property.
095   * <p>
096   * Specifies the name of the key manager that should be used with
097   * this JMX Connection Handler .
098   *
099   * @param value The value of the "key-manager-provider" property.
100   * @throws PropertyException
101   *           If the new value is invalid.
102   */
103  void setKeyManagerProvider(String value) throws PropertyException;
104
105
106
107  /**
108   * Gets the "listen-address" property.
109   * <p>
110   * Specifies the address on which this JMX Connection Handler should
111   * listen for connections from JMX clients.
112   * <p>
113   * If no value is provided, then the JMX Connection Handler listens
114   * on all interfaces.
115   *
116   * @return Returns the value of the "listen-address" property.
117   */
118  InetAddress getListenAddress();
119
120
121
122  /**
123   * Sets the "listen-address" property.
124   * <p>
125   * Specifies the address on which this JMX Connection Handler should
126   * listen for connections from JMX clients.
127   * <p>
128   * If no value is provided, then the JMX Connection Handler listens
129   * on all interfaces.
130   *
131   * @param value The value of the "listen-address" property.
132   * @throws PropertyException
133   *           If the new value is invalid.
134   */
135  void setListenAddress(InetAddress value) throws PropertyException;
136
137
138
139  /**
140   * Gets the "listen-port" property.
141   * <p>
142   * Specifies the port number on which the JMX Connection Handler
143   * will listen for connections from clients.
144   * <p>
145   * Only a single port number may be provided.
146   *
147   * @return Returns the value of the "listen-port" property.
148   */
149  Integer getListenPort();
150
151
152
153  /**
154   * Sets the "listen-port" property.
155   * <p>
156   * Specifies the port number on which the JMX Connection Handler
157   * will listen for connections from clients.
158   * <p>
159   * Only a single port number may be provided.
160   *
161   * @param value The value of the "listen-port" property.
162   * @throws PropertyException
163   *           If the new value is invalid.
164   */
165  void setListenPort(int value) throws PropertyException;
166
167
168
169  /**
170   * Gets the "rmi-port" property.
171   * <p>
172   * Specifies the port number on which the JMX RMI service will
173   * listen for connections from clients. A value of 0 indicates the
174   * service to choose a port of its own.
175   * <p>
176   * If the value provided is different than 0, the value will be used
177   * as the RMI port. Otherwise, the RMI service will choose a port of
178   * its own.
179   *
180   * @return Returns the value of the "rmi-port" property.
181   */
182  int getRmiPort();
183
184
185
186  /**
187   * Sets the "rmi-port" property.
188   * <p>
189   * Specifies the port number on which the JMX RMI service will
190   * listen for connections from clients. A value of 0 indicates the
191   * service to choose a port of its own.
192   * <p>
193   * If the value provided is different than 0, the value will be used
194   * as the RMI port. Otherwise, the RMI service will choose a port of
195   * its own.
196   *
197   * @param value The value of the "rmi-port" property.
198   * @throws PropertyException
199   *           If the new value is invalid.
200   */
201  void setRmiPort(Integer value) throws PropertyException;
202
203
204
205  /**
206   * Gets the "ssl-cert-nickname" property.
207   * <p>
208   * Specifies the nickname (also called the alias) of the certificate
209   * that the JMX Connection Handler should use when performing SSL
210   * communication.
211   * <p>
212   * This is only applicable when the JMX Connection Handler is
213   * configured to use SSL.
214   *
215   * @return Returns the value of the "ssl-cert-nickname" property.
216   */
217  String getSSLCertNickname();
218
219
220
221  /**
222   * Sets the "ssl-cert-nickname" property.
223   * <p>
224   * Specifies the nickname (also called the alias) of the certificate
225   * that the JMX Connection Handler should use when performing SSL
226   * communication.
227   * <p>
228   * This is only applicable when the JMX Connection Handler is
229   * configured to use SSL.
230   *
231   * @param value The value of the "ssl-cert-nickname" property.
232   * @throws PropertyException
233   *           If the new value is invalid.
234   */
235  void setSSLCertNickname(String value) throws PropertyException;
236
237
238
239  /**
240   * Gets the "use-ssl" property.
241   * <p>
242   * Indicates whether the JMX Connection Handler should use SSL.
243   * <p>
244   * If enabled, the JMX Connection Handler will use SSL to encrypt
245   * communication with the clients.
246   *
247   * @return Returns the value of the "use-ssl" property.
248   */
249  boolean isUseSSL();
250
251
252
253  /**
254   * Sets the "use-ssl" property.
255   * <p>
256   * Indicates whether the JMX Connection Handler should use SSL.
257   * <p>
258   * If enabled, the JMX Connection Handler will use SSL to encrypt
259   * communication with the clients.
260   *
261   * @param value The value of the "use-ssl" property.
262   * @throws PropertyException
263   *           If the new value is invalid.
264   */
265  void setUseSSL(Boolean value) throws PropertyException;
266
267}