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.meta; 027 028 029 030import java.net.InetAddress; 031import java.util.Collection; 032import java.util.SortedSet; 033import org.forgerock.opendj.ldap.AddressMask; 034import org.opends.server.admin.AdministratorAction; 035import org.opends.server.admin.AggregationPropertyDefinition; 036import org.opends.server.admin.AliasDefaultBehaviorProvider; 037import org.opends.server.admin.BooleanPropertyDefinition; 038import org.opends.server.admin.ClassPropertyDefinition; 039import org.opends.server.admin.client.AuthorizationException; 040import org.opends.server.admin.client.CommunicationException; 041import org.opends.server.admin.client.ConcurrentModificationException; 042import org.opends.server.admin.client.ManagedObject; 043import org.opends.server.admin.client.MissingMandatoryPropertiesException; 044import org.opends.server.admin.client.OperationRejectedException; 045import org.opends.server.admin.condition.Conditions; 046import org.opends.server.admin.DefaultBehaviorProvider; 047import org.opends.server.admin.DefinedDefaultBehaviorProvider; 048import org.opends.server.admin.GenericConstraint; 049import org.opends.server.admin.IntegerPropertyDefinition; 050import org.opends.server.admin.IPAddressMaskPropertyDefinition; 051import org.opends.server.admin.IPAddressPropertyDefinition; 052import org.opends.server.admin.ManagedObjectAlreadyExistsException; 053import org.opends.server.admin.ManagedObjectDefinition; 054import org.opends.server.admin.PropertyOption; 055import org.opends.server.admin.PropertyProvider; 056import org.opends.server.admin.server.ConfigurationChangeListener; 057import org.opends.server.admin.server.ServerManagedObject; 058import org.opends.server.admin.std.client.JMXConnectionHandlerCfgClient; 059import org.opends.server.admin.std.client.KeyManagerProviderCfgClient; 060import org.opends.server.admin.std.server.ConnectionHandlerCfg; 061import org.opends.server.admin.std.server.JMXConnectionHandlerCfg; 062import org.opends.server.admin.std.server.KeyManagerProviderCfg; 063import org.opends.server.admin.StringPropertyDefinition; 064import org.opends.server.admin.Tag; 065import org.opends.server.admin.UndefinedDefaultBehaviorProvider; 066import org.opends.server.types.DN; 067 068 069 070/** 071 * An interface for querying the JMX Connection Handler managed object 072 * definition meta information. 073 * <p> 074 * The JMX Connection Handler is used to interact with clients using 075 * the Java Management Extensions (JMX) protocol. 076 */ 077public final class JMXConnectionHandlerCfgDefn extends ManagedObjectDefinition<JMXConnectionHandlerCfgClient, JMXConnectionHandlerCfg> { 078 079 // The singleton configuration definition instance. 080 private static final JMXConnectionHandlerCfgDefn INSTANCE = new JMXConnectionHandlerCfgDefn(); 081 082 083 084 // The "java-class" property definition. 085 private static final ClassPropertyDefinition PD_JAVA_CLASS; 086 087 088 089 // The "key-manager-provider" property definition. 090 private static final AggregationPropertyDefinition<KeyManagerProviderCfgClient, KeyManagerProviderCfg> PD_KEY_MANAGER_PROVIDER; 091 092 093 094 // The "listen-address" property definition. 095 private static final IPAddressPropertyDefinition PD_LISTEN_ADDRESS; 096 097 098 099 // The "listen-port" property definition. 100 private static final IntegerPropertyDefinition PD_LISTEN_PORT; 101 102 103 104 // The "rmi-port" property definition. 105 private static final IntegerPropertyDefinition PD_RMI_PORT; 106 107 108 109 // The "ssl-cert-nickname" property definition. 110 private static final StringPropertyDefinition PD_SSL_CERT_NICKNAME; 111 112 113 114 // The "use-ssl" property definition. 115 private static final BooleanPropertyDefinition PD_USE_SSL; 116 117 118 119 // Build the "java-class" property definition. 120 static { 121 ClassPropertyDefinition.Builder builder = ClassPropertyDefinition.createBuilder(INSTANCE, "java-class"); 122 builder.setOption(PropertyOption.MANDATORY); 123 builder.setOption(PropertyOption.ADVANCED); 124 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.COMPONENT_RESTART, INSTANCE, "java-class")); 125 DefaultBehaviorProvider<String> provider = new DefinedDefaultBehaviorProvider<String>("org.opends.server.protocols.jmx.JmxConnectionHandler"); 126 builder.setDefaultBehaviorProvider(provider); 127 builder.addInstanceOf("org.opends.server.api.ConnectionHandler"); 128 PD_JAVA_CLASS = builder.getInstance(); 129 INSTANCE.registerPropertyDefinition(PD_JAVA_CLASS); 130 } 131 132 133 134 // Build the "key-manager-provider" property definition. 135 static { 136 AggregationPropertyDefinition.Builder<KeyManagerProviderCfgClient, KeyManagerProviderCfg> builder = AggregationPropertyDefinition.createBuilder(INSTANCE, "key-manager-provider"); 137 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "key-manager-provider")); 138 builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<String>()); 139 builder.setParentPath("/"); 140 builder.setRelationDefinition("key-manager-provider"); 141 builder.setTargetNeedsEnablingCondition(Conditions.and(Conditions.contains("enabled", "true"), Conditions.contains("use-ssl", "true"))); 142 builder.setTargetIsEnabledCondition(Conditions.contains("enabled", "true")); 143 PD_KEY_MANAGER_PROVIDER = builder.getInstance(); 144 INSTANCE.registerPropertyDefinition(PD_KEY_MANAGER_PROVIDER); 145 INSTANCE.registerConstraint(PD_KEY_MANAGER_PROVIDER.getSourceConstraint()); 146 } 147 148 149 150 // Build the "listen-address" property definition. 151 static { 152 IPAddressPropertyDefinition.Builder builder = IPAddressPropertyDefinition.createBuilder(INSTANCE, "listen-address"); 153 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.SERVER_RESTART, INSTANCE, "listen-address")); 154 DefaultBehaviorProvider<InetAddress> provider = new DefinedDefaultBehaviorProvider<InetAddress>("0.0.0.0"); 155 builder.setDefaultBehaviorProvider(provider); 156 PD_LISTEN_ADDRESS = builder.getInstance(); 157 INSTANCE.registerPropertyDefinition(PD_LISTEN_ADDRESS); 158 } 159 160 161 162 // Build the "listen-port" property definition. 163 static { 164 IntegerPropertyDefinition.Builder builder = IntegerPropertyDefinition.createBuilder(INSTANCE, "listen-port"); 165 builder.setOption(PropertyOption.MANDATORY); 166 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.COMPONENT_RESTART, INSTANCE, "listen-port")); 167 builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<Integer>()); 168 builder.setUpperLimit(65535); 169 builder.setLowerLimit(1); 170 PD_LISTEN_PORT = builder.getInstance(); 171 INSTANCE.registerPropertyDefinition(PD_LISTEN_PORT); 172 } 173 174 175 176 // Build the "rmi-port" property definition. 177 static { 178 IntegerPropertyDefinition.Builder builder = IntegerPropertyDefinition.createBuilder(INSTANCE, "rmi-port"); 179 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.COMPONENT_RESTART, INSTANCE, "rmi-port")); 180 DefaultBehaviorProvider<Integer> provider = new DefinedDefaultBehaviorProvider<Integer>("0"); 181 builder.setDefaultBehaviorProvider(provider); 182 builder.setUpperLimit(65535); 183 builder.setLowerLimit(0); 184 PD_RMI_PORT = builder.getInstance(); 185 INSTANCE.registerPropertyDefinition(PD_RMI_PORT); 186 } 187 188 189 190 // Build the "ssl-cert-nickname" property definition. 191 static { 192 StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "ssl-cert-nickname"); 193 builder.setOption(PropertyOption.MULTI_VALUED); 194 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.COMPONENT_RESTART, INSTANCE, "ssl-cert-nickname")); 195 builder.setDefaultBehaviorProvider(new AliasDefaultBehaviorProvider<String>(INSTANCE, "ssl-cert-nickname")); 196 PD_SSL_CERT_NICKNAME = builder.getInstance(); 197 INSTANCE.registerPropertyDefinition(PD_SSL_CERT_NICKNAME); 198 } 199 200 201 202 // Build the "use-ssl" property definition. 203 static { 204 BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE, "use-ssl"); 205 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.COMPONENT_RESTART, INSTANCE, "use-ssl")); 206 DefaultBehaviorProvider<Boolean> provider = new DefinedDefaultBehaviorProvider<Boolean>("false"); 207 builder.setDefaultBehaviorProvider(provider); 208 PD_USE_SSL = builder.getInstance(); 209 INSTANCE.registerPropertyDefinition(PD_USE_SSL); 210 } 211 212 213 214 // Register the tags associated with this managed object definition. 215 static { 216 INSTANCE.registerTag(Tag.valueOf("core-server")); 217 } 218 219 220 221 // Register the constraints associated with this managed object definition. 222 static { 223 INSTANCE.registerConstraint(new GenericConstraint(INSTANCE, 1, Conditions.implies(Conditions.contains("enabled", "true"), Conditions.implies(Conditions.contains("use-ssl", "true"), Conditions.isPresent("key-manager-provider"))))); 224 } 225 226 227 228 /** 229 * Get the JMX Connection Handler configuration definition 230 * singleton. 231 * 232 * @return Returns the JMX Connection Handler configuration 233 * definition singleton. 234 */ 235 public static JMXConnectionHandlerCfgDefn getInstance() { 236 return INSTANCE; 237 } 238 239 240 241 /** 242 * Private constructor. 243 */ 244 private JMXConnectionHandlerCfgDefn() { 245 super("jmx-connection-handler", ConnectionHandlerCfgDefn.getInstance()); 246 } 247 248 249 250 /** 251 * {@inheritDoc} 252 */ 253 public JMXConnectionHandlerCfgClient createClientConfiguration( 254 ManagedObject<? extends JMXConnectionHandlerCfgClient> impl) { 255 return new JMXConnectionHandlerCfgClientImpl(impl); 256 } 257 258 259 260 /** 261 * {@inheritDoc} 262 */ 263 public JMXConnectionHandlerCfg createServerConfiguration( 264 ServerManagedObject<? extends JMXConnectionHandlerCfg> impl) { 265 return new JMXConnectionHandlerCfgServerImpl(impl); 266 } 267 268 269 270 /** 271 * {@inheritDoc} 272 */ 273 public Class<JMXConnectionHandlerCfg> getServerConfigurationClass() { 274 return JMXConnectionHandlerCfg.class; 275 } 276 277 278 279 /** 280 * Get the "allowed-client" property definition. 281 * <p> 282 * Specifies a set of host names or address masks that determine the 283 * clients that are allowed to establish connections to this JMX 284 * Connection Handler. 285 * <p> 286 * Valid values include a host name, a fully qualified domain name, 287 * a domain name, an IP address, or a subnetwork with subnetwork 288 * mask. 289 * 290 * @return Returns the "allowed-client" property definition. 291 */ 292 public IPAddressMaskPropertyDefinition getAllowedClientPropertyDefinition() { 293 return ConnectionHandlerCfgDefn.getInstance().getAllowedClientPropertyDefinition(); 294 } 295 296 297 298 /** 299 * Get the "denied-client" property definition. 300 * <p> 301 * Specifies a set of host names or address masks that determine the 302 * clients that are not allowed to establish connections to this JMX 303 * Connection Handler. 304 * <p> 305 * Valid values include a host name, a fully qualified domain name, 306 * a domain name, an IP address, or a subnetwork with subnetwork 307 * mask. If both allowed and denied client masks are defined and a 308 * client connection matches one or more masks in both lists, then 309 * the connection is denied. If only a denied list is specified, then 310 * any client not matching a mask in that list is allowed. 311 * 312 * @return Returns the "denied-client" property definition. 313 */ 314 public IPAddressMaskPropertyDefinition getDeniedClientPropertyDefinition() { 315 return ConnectionHandlerCfgDefn.getInstance().getDeniedClientPropertyDefinition(); 316 } 317 318 319 320 /** 321 * Get the "enabled" property definition. 322 * <p> 323 * Indicates whether the JMX Connection Handler is enabled. 324 * 325 * @return Returns the "enabled" property definition. 326 */ 327 public BooleanPropertyDefinition getEnabledPropertyDefinition() { 328 return ConnectionHandlerCfgDefn.getInstance().getEnabledPropertyDefinition(); 329 } 330 331 332 333 /** 334 * Get the "java-class" property definition. 335 * <p> 336 * Specifies the fully-qualified name of the Java class that 337 * provides the JMX Connection Handler implementation. 338 * 339 * @return Returns the "java-class" property definition. 340 */ 341 public ClassPropertyDefinition getJavaClassPropertyDefinition() { 342 return PD_JAVA_CLASS; 343 } 344 345 346 347 /** 348 * Get the "key-manager-provider" property definition. 349 * <p> 350 * Specifies the name of the key manager that should be used with 351 * this JMX Connection Handler . 352 * 353 * @return Returns the "key-manager-provider" property definition. 354 */ 355 public AggregationPropertyDefinition<KeyManagerProviderCfgClient, KeyManagerProviderCfg> getKeyManagerProviderPropertyDefinition() { 356 return PD_KEY_MANAGER_PROVIDER; 357 } 358 359 360 361 /** 362 * Get the "listen-address" property definition. 363 * <p> 364 * Specifies the address on which this JMX Connection Handler should 365 * listen for connections from JMX clients. 366 * <p> 367 * If no value is provided, then the JMX Connection Handler listens 368 * on all interfaces. 369 * 370 * @return Returns the "listen-address" property definition. 371 */ 372 public IPAddressPropertyDefinition getListenAddressPropertyDefinition() { 373 return PD_LISTEN_ADDRESS; 374 } 375 376 377 378 /** 379 * Get the "listen-port" property definition. 380 * <p> 381 * Specifies the port number on which the JMX Connection Handler 382 * will listen for connections from clients. 383 * <p> 384 * Only a single port number may be provided. 385 * 386 * @return Returns the "listen-port" property definition. 387 */ 388 public IntegerPropertyDefinition getListenPortPropertyDefinition() { 389 return PD_LISTEN_PORT; 390 } 391 392 393 394 /** 395 * Get the "rmi-port" property definition. 396 * <p> 397 * Specifies the port number on which the JMX RMI service will 398 * listen for connections from clients. A value of 0 indicates the 399 * service to choose a port of its own. 400 * <p> 401 * If the value provided is different than 0, the value will be used 402 * as the RMI port. Otherwise, the RMI service will choose a port of 403 * its own. 404 * 405 * @return Returns the "rmi-port" property definition. 406 */ 407 public IntegerPropertyDefinition getRmiPortPropertyDefinition() { 408 return PD_RMI_PORT; 409 } 410 411 412 413 /** 414 * Get the "ssl-cert-nickname" property definition. 415 * <p> 416 * Specifies the nicknames (also called the aliases) of the 417 * certificates that the JMX Connection Handler should use when 418 * performing SSL communication. The property can be used multiple 419 * times (referencing different nicknames) when an RSA, a DSA, and an 420 * ECC based server certificate is used in parallel. 421 * <p> 422 * This is only applicable when the JMX Connection Handler is 423 * configured to use SSL. 424 * 425 * @return Returns the "ssl-cert-nickname" property definition. 426 */ 427 public StringPropertyDefinition getSSLCertNicknamePropertyDefinition() { 428 return PD_SSL_CERT_NICKNAME; 429 } 430 431 432 433 /** 434 * Get the "use-ssl" property definition. 435 * <p> 436 * Indicates whether the JMX Connection Handler should use SSL. 437 * <p> 438 * If enabled, the JMX Connection Handler will use SSL to encrypt 439 * communication with the clients. 440 * 441 * @return Returns the "use-ssl" property definition. 442 */ 443 public BooleanPropertyDefinition getUseSSLPropertyDefinition() { 444 return PD_USE_SSL; 445 } 446 447 448 449 /** 450 * Managed object client implementation. 451 */ 452 private static class JMXConnectionHandlerCfgClientImpl implements 453 JMXConnectionHandlerCfgClient { 454 455 // Private implementation. 456 private ManagedObject<? extends JMXConnectionHandlerCfgClient> impl; 457 458 459 460 // Private constructor. 461 private JMXConnectionHandlerCfgClientImpl( 462 ManagedObject<? extends JMXConnectionHandlerCfgClient> impl) { 463 this.impl = impl; 464 } 465 466 467 468 /** 469 * {@inheritDoc} 470 */ 471 public SortedSet<AddressMask> getAllowedClient() { 472 return impl.getPropertyValues(INSTANCE.getAllowedClientPropertyDefinition()); 473 } 474 475 476 477 /** 478 * {@inheritDoc} 479 */ 480 public void setAllowedClient(Collection<AddressMask> values) { 481 impl.setPropertyValues(INSTANCE.getAllowedClientPropertyDefinition(), values); 482 } 483 484 485 486 /** 487 * {@inheritDoc} 488 */ 489 public SortedSet<AddressMask> getDeniedClient() { 490 return impl.getPropertyValues(INSTANCE.getDeniedClientPropertyDefinition()); 491 } 492 493 494 495 /** 496 * {@inheritDoc} 497 */ 498 public void setDeniedClient(Collection<AddressMask> values) { 499 impl.setPropertyValues(INSTANCE.getDeniedClientPropertyDefinition(), values); 500 } 501 502 503 504 /** 505 * {@inheritDoc} 506 */ 507 public Boolean isEnabled() { 508 return impl.getPropertyValue(INSTANCE.getEnabledPropertyDefinition()); 509 } 510 511 512 513 /** 514 * {@inheritDoc} 515 */ 516 public void setEnabled(boolean value) { 517 impl.setPropertyValue(INSTANCE.getEnabledPropertyDefinition(), value); 518 } 519 520 521 522 /** 523 * {@inheritDoc} 524 */ 525 public String getJavaClass() { 526 return impl.getPropertyValue(INSTANCE.getJavaClassPropertyDefinition()); 527 } 528 529 530 531 /** 532 * {@inheritDoc} 533 */ 534 public void setJavaClass(String value) { 535 impl.setPropertyValue(INSTANCE.getJavaClassPropertyDefinition(), value); 536 } 537 538 539 540 /** 541 * {@inheritDoc} 542 */ 543 public String getKeyManagerProvider() { 544 return impl.getPropertyValue(INSTANCE.getKeyManagerProviderPropertyDefinition()); 545 } 546 547 548 549 /** 550 * {@inheritDoc} 551 */ 552 public void setKeyManagerProvider(String value) { 553 impl.setPropertyValue(INSTANCE.getKeyManagerProviderPropertyDefinition(), value); 554 } 555 556 557 558 /** 559 * {@inheritDoc} 560 */ 561 public InetAddress getListenAddress() { 562 return impl.getPropertyValue(INSTANCE.getListenAddressPropertyDefinition()); 563 } 564 565 566 567 /** 568 * {@inheritDoc} 569 */ 570 public void setListenAddress(InetAddress value) { 571 impl.setPropertyValue(INSTANCE.getListenAddressPropertyDefinition(), value); 572 } 573 574 575 576 /** 577 * {@inheritDoc} 578 */ 579 public Integer getListenPort() { 580 return impl.getPropertyValue(INSTANCE.getListenPortPropertyDefinition()); 581 } 582 583 584 585 /** 586 * {@inheritDoc} 587 */ 588 public void setListenPort(int value) { 589 impl.setPropertyValue(INSTANCE.getListenPortPropertyDefinition(), value); 590 } 591 592 593 594 /** 595 * {@inheritDoc} 596 */ 597 public int getRmiPort() { 598 return impl.getPropertyValue(INSTANCE.getRmiPortPropertyDefinition()); 599 } 600 601 602 603 /** 604 * {@inheritDoc} 605 */ 606 public void setRmiPort(Integer value) { 607 impl.setPropertyValue(INSTANCE.getRmiPortPropertyDefinition(), value); 608 } 609 610 611 612 /** 613 * {@inheritDoc} 614 */ 615 public SortedSet<String> getSSLCertNickname() { 616 return impl.getPropertyValues(INSTANCE.getSSLCertNicknamePropertyDefinition()); 617 } 618 619 620 621 /** 622 * {@inheritDoc} 623 */ 624 public void setSSLCertNickname(Collection<String> values) { 625 impl.setPropertyValues(INSTANCE.getSSLCertNicknamePropertyDefinition(), values); 626 } 627 628 629 630 /** 631 * {@inheritDoc} 632 */ 633 public boolean isUseSSL() { 634 return impl.getPropertyValue(INSTANCE.getUseSSLPropertyDefinition()); 635 } 636 637 638 639 /** 640 * {@inheritDoc} 641 */ 642 public void setUseSSL(Boolean value) { 643 impl.setPropertyValue(INSTANCE.getUseSSLPropertyDefinition(), value); 644 } 645 646 647 648 /** 649 * {@inheritDoc} 650 */ 651 public ManagedObjectDefinition<? extends JMXConnectionHandlerCfgClient, ? extends JMXConnectionHandlerCfg> definition() { 652 return INSTANCE; 653 } 654 655 656 657 /** 658 * {@inheritDoc} 659 */ 660 public PropertyProvider properties() { 661 return impl; 662 } 663 664 665 666 /** 667 * {@inheritDoc} 668 */ 669 public void commit() throws ManagedObjectAlreadyExistsException, 670 MissingMandatoryPropertiesException, ConcurrentModificationException, 671 OperationRejectedException, AuthorizationException, 672 CommunicationException { 673 impl.commit(); 674 } 675 676 677 678 /** {@inheritDoc} */ 679 public String toString() { 680 return impl.toString(); 681 } 682 } 683 684 685 686 /** 687 * Managed object server implementation. 688 */ 689 private static class JMXConnectionHandlerCfgServerImpl implements 690 JMXConnectionHandlerCfg { 691 692 // Private implementation. 693 private ServerManagedObject<? extends JMXConnectionHandlerCfg> impl; 694 695 // The value of the "allowed-client" property. 696 private final SortedSet<AddressMask> pAllowedClient; 697 698 // The value of the "denied-client" property. 699 private final SortedSet<AddressMask> pDeniedClient; 700 701 // The value of the "enabled" property. 702 private final boolean pEnabled; 703 704 // The value of the "java-class" property. 705 private final String pJavaClass; 706 707 // The value of the "key-manager-provider" property. 708 private final String pKeyManagerProvider; 709 710 // The value of the "listen-address" property. 711 private final InetAddress pListenAddress; 712 713 // The value of the "listen-port" property. 714 private final int pListenPort; 715 716 // The value of the "rmi-port" property. 717 private final int pRmiPort; 718 719 // The value of the "ssl-cert-nickname" property. 720 private final SortedSet<String> pSSLCertNickname; 721 722 // The value of the "use-ssl" property. 723 private final boolean pUseSSL; 724 725 726 727 // Private constructor. 728 private JMXConnectionHandlerCfgServerImpl(ServerManagedObject<? extends JMXConnectionHandlerCfg> impl) { 729 this.impl = impl; 730 this.pAllowedClient = impl.getPropertyValues(INSTANCE.getAllowedClientPropertyDefinition()); 731 this.pDeniedClient = impl.getPropertyValues(INSTANCE.getDeniedClientPropertyDefinition()); 732 this.pEnabled = impl.getPropertyValue(INSTANCE.getEnabledPropertyDefinition()); 733 this.pJavaClass = impl.getPropertyValue(INSTANCE.getJavaClassPropertyDefinition()); 734 this.pKeyManagerProvider = impl.getPropertyValue(INSTANCE.getKeyManagerProviderPropertyDefinition()); 735 this.pListenAddress = impl.getPropertyValue(INSTANCE.getListenAddressPropertyDefinition()); 736 this.pListenPort = impl.getPropertyValue(INSTANCE.getListenPortPropertyDefinition()); 737 this.pRmiPort = impl.getPropertyValue(INSTANCE.getRmiPortPropertyDefinition()); 738 this.pSSLCertNickname = impl.getPropertyValues(INSTANCE.getSSLCertNicknamePropertyDefinition()); 739 this.pUseSSL = impl.getPropertyValue(INSTANCE.getUseSSLPropertyDefinition()); 740 } 741 742 743 744 /** 745 * {@inheritDoc} 746 */ 747 public void addJMXChangeListener( 748 ConfigurationChangeListener<JMXConnectionHandlerCfg> listener) { 749 impl.registerChangeListener(listener); 750 } 751 752 753 754 /** 755 * {@inheritDoc} 756 */ 757 public void removeJMXChangeListener( 758 ConfigurationChangeListener<JMXConnectionHandlerCfg> listener) { 759 impl.deregisterChangeListener(listener); 760 } 761 /** 762 * {@inheritDoc} 763 */ 764 public void addChangeListener( 765 ConfigurationChangeListener<ConnectionHandlerCfg> listener) { 766 impl.registerChangeListener(listener); 767 } 768 769 770 771 /** 772 * {@inheritDoc} 773 */ 774 public void removeChangeListener( 775 ConfigurationChangeListener<ConnectionHandlerCfg> listener) { 776 impl.deregisterChangeListener(listener); 777 } 778 779 780 781 /** 782 * {@inheritDoc} 783 */ 784 public SortedSet<AddressMask> getAllowedClient() { 785 return pAllowedClient; 786 } 787 788 789 790 /** 791 * {@inheritDoc} 792 */ 793 public SortedSet<AddressMask> getDeniedClient() { 794 return pDeniedClient; 795 } 796 797 798 799 /** 800 * {@inheritDoc} 801 */ 802 public boolean isEnabled() { 803 return pEnabled; 804 } 805 806 807 808 /** 809 * {@inheritDoc} 810 */ 811 public String getJavaClass() { 812 return pJavaClass; 813 } 814 815 816 817 /** 818 * {@inheritDoc} 819 */ 820 public String getKeyManagerProvider() { 821 return pKeyManagerProvider; 822 } 823 824 825 826 /** 827 * {@inheritDoc} 828 */ 829 public DN getKeyManagerProviderDN() { 830 String value = getKeyManagerProvider(); 831 if (value == null) return null; 832 return INSTANCE.getKeyManagerProviderPropertyDefinition().getChildDN(value); 833 } 834 835 836 837 /** 838 * {@inheritDoc} 839 */ 840 public InetAddress getListenAddress() { 841 return pListenAddress; 842 } 843 844 845 846 /** 847 * {@inheritDoc} 848 */ 849 public int getListenPort() { 850 return pListenPort; 851 } 852 853 854 855 /** 856 * {@inheritDoc} 857 */ 858 public int getRmiPort() { 859 return pRmiPort; 860 } 861 862 863 864 /** 865 * {@inheritDoc} 866 */ 867 public SortedSet<String> getSSLCertNickname() { 868 return pSSLCertNickname; 869 } 870 871 872 873 /** 874 * {@inheritDoc} 875 */ 876 public boolean isUseSSL() { 877 return pUseSSL; 878 } 879 880 881 882 /** 883 * {@inheritDoc} 884 */ 885 public Class<? extends JMXConnectionHandlerCfg> configurationClass() { 886 return JMXConnectionHandlerCfg.class; 887 } 888 889 890 891 /** 892 * {@inheritDoc} 893 */ 894 public DN dn() { 895 return impl.getDN(); 896 } 897 898 899 900 /** {@inheritDoc} */ 901 public String toString() { 902 return impl.toString(); 903 } 904 } 905}