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