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