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