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