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.forgerock.opendj.server.config.server;
027
028
029
030import java.net.InetAddress;
031import java.util.SortedSet;
032import org.forgerock.opendj.config.server.ConfigurationChangeListener;
033import org.forgerock.opendj.ldap.DN;
034
035
036
037/**
038 * A server-side interface for querying JMX Connection Handler
039 * 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 JMXConnectionHandlerCfg extends ConnectionHandlerCfg {
045
046  /**
047   * Gets the configuration class associated with this JMX Connection Handler.
048   *
049   * @return Returns the configuration class associated with this JMX Connection Handler.
050   */
051  Class<? extends JMXConnectionHandlerCfg> configurationClass();
052
053
054
055  /**
056   * Register to be notified when this JMX Connection Handler is changed.
057   *
058   * @param listener
059   *          The JMX Connection Handler configuration change listener.
060   */
061  void addJMXChangeListener(ConfigurationChangeListener<JMXConnectionHandlerCfg> listener);
062
063
064
065  /**
066   * Deregister an existing JMX Connection Handler configuration change listener.
067   *
068   * @param listener
069   *          The JMX Connection Handler configuration change listener.
070   */
071  void removeJMXChangeListener(ConfigurationChangeListener<JMXConnectionHandlerCfg> listener);
072
073
074
075  /**
076   * Gets the "java-class" property.
077   * <p>
078   * Specifies the fully-qualified name of the Java class that
079   * provides the JMX Connection Handler implementation.
080   *
081   * @return Returns the value of the "java-class" property.
082   */
083  String getJavaClass();
084
085
086
087  /**
088   * Gets the "key-manager-provider" property.
089   * <p>
090   * Specifies the name of the key manager that should be used with
091   * this JMX Connection Handler .
092   *
093   * @return Returns the value of the "key-manager-provider" property.
094   */
095  String getKeyManagerProvider();
096
097
098
099  /**
100   * Gets the "key-manager-provider" property as a DN.
101   * <p>
102   * Specifies the name of the key manager that should be used with
103   * this JMX Connection Handler .
104   *
105   * @return Returns the DN value of the "key-manager-provider"
106   *         property.
107   */
108  DN getKeyManagerProviderDN();
109
110
111
112  /**
113   * Gets the "listen-address" property.
114   * <p>
115   * Specifies the address on which this JMX Connection Handler should
116   * listen for connections from JMX clients.
117   * <p>
118   * If no value is provided, then the JMX Connection Handler listens
119   * on all interfaces.
120   *
121   * @return Returns the value of the "listen-address" property.
122   */
123  InetAddress getListenAddress();
124
125
126
127  /**
128   * Gets the "listen-port" property.
129   * <p>
130   * Specifies the port number on which the JMX Connection Handler
131   * will listen for connections from clients.
132   * <p>
133   * Only a single port number may be provided.
134   *
135   * @return Returns the value of the "listen-port" property.
136   */
137  int getListenPort();
138
139
140
141  /**
142   * Gets the "rmi-port" property.
143   * <p>
144   * Specifies the port number on which the JMX RMI service will
145   * listen for connections from clients. A value of 0 indicates the
146   * service to choose a port of its own.
147   * <p>
148   * If the value provided is different than 0, the value will be used
149   * as the RMI port. Otherwise, the RMI service will choose a port of
150   * its own.
151   *
152   * @return Returns the value of the "rmi-port" property.
153   */
154  int getRmiPort();
155
156
157
158  /**
159   * Gets the "ssl-cert-nickname" property.
160   * <p>
161   * Specifies the nicknames (also called the aliases) of the
162   * certificates that the JMX Connection Handler should use when
163   * performing SSL communication. The property can be used multiple
164   * times (referencing different nicknames) when an RSA, a DSA, and an
165   * ECC based server certificate is used in parallel.
166   * <p>
167   * This is only applicable when the JMX Connection Handler is
168   * configured to use SSL.
169   *
170   * @return Returns an unmodifiable set containing the values of the "ssl-cert-nickname" property.
171   */
172  SortedSet<String> getSSLCertNickname();
173
174
175
176  /**
177   * Gets the "use-ssl" property.
178   * <p>
179   * Indicates whether the JMX Connection Handler should use SSL.
180   * <p>
181   * If enabled, the JMX Connection Handler will use SSL to encrypt
182   * communication with the clients.
183   *
184   * @return Returns the value of the "use-ssl" property.
185   */
186  boolean isUseSSL();
187
188}