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