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 keys or 201 * key pairs that the JMX Connection Handler should use when 202 * performing SSL communication. The property can be used multiple 203 * times (referencing different nicknames) when server certificates 204 * with different public key algorithms are used in parallel (for 205 * example, RSA, DSA, and ECC-based algorithms). When a nickname 206 * refers to an asymmetric (public/private) key pair, the nickname 207 * for the public key certificate and associated private key entry 208 * must match exactly. A single nickname is used to retrieve both the 209 * public key and the private key. 210 * <p> 211 * This is only applicable when the JMX Connection Handler is 212 * configured to use SSL. 213 * 214 * @return Returns the values of the "ssl-cert-nickname" property. 215 */ 216 SortedSet<String> getSSLCertNickname(); 217 218 219 220 /** 221 * Sets the "ssl-cert-nickname" property. 222 * <p> 223 * Specifies the nicknames (also called the aliases) of the keys or 224 * key pairs that the JMX Connection Handler should use when 225 * performing SSL communication. The property can be used multiple 226 * times (referencing different nicknames) when server certificates 227 * with different public key algorithms are used in parallel (for 228 * example, RSA, DSA, and ECC-based algorithms). When a nickname 229 * refers to an asymmetric (public/private) key pair, the nickname 230 * for the public key certificate and associated private key entry 231 * must match exactly. A single nickname is used to retrieve both the 232 * public key and the private key. 233 * <p> 234 * This is only applicable when the JMX Connection Handler is 235 * configured to use SSL. 236 * 237 * @param values The values of the "ssl-cert-nickname" property. 238 * @throws PropertyException 239 * If one or more of the new values are invalid. 240 */ 241 void setSSLCertNickname(Collection<String> values) throws PropertyException; 242 243 244 245 /** 246 * Gets the "use-ssl" property. 247 * <p> 248 * Indicates whether the JMX Connection Handler should use SSL. 249 * <p> 250 * If enabled, the JMX Connection Handler will use SSL to encrypt 251 * communication with the clients. 252 * 253 * @return Returns the value of the "use-ssl" property. 254 */ 255 boolean isUseSSL(); 256 257 258 259 /** 260 * Sets the "use-ssl" property. 261 * <p> 262 * Indicates whether the JMX Connection Handler should use SSL. 263 * <p> 264 * If enabled, the JMX Connection Handler will use SSL to encrypt 265 * communication with the clients. 266 * 267 * @param value The value of the "use-ssl" property. 268 * @throws PropertyException 269 * If the new value is invalid. 270 */ 271 void setUseSSL(Boolean value) throws PropertyException; 272 273}