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.util.Collection; 031import java.util.SortedSet; 032import org.opends.server.admin.AdministratorAction; 033import org.opends.server.admin.BooleanPropertyDefinition; 034import org.opends.server.admin.ClassPropertyDefinition; 035import org.opends.server.admin.client.AuthorizationException; 036import org.opends.server.admin.client.CommunicationException; 037import org.opends.server.admin.client.ConcurrentModificationException; 038import org.opends.server.admin.client.ManagedObject; 039import org.opends.server.admin.client.MissingMandatoryPropertiesException; 040import org.opends.server.admin.client.OperationRejectedException; 041import org.opends.server.admin.DefaultBehaviorProvider; 042import org.opends.server.admin.DefinedDefaultBehaviorProvider; 043import org.opends.server.admin.DurationPropertyDefinition; 044import org.opends.server.admin.EnumPropertyDefinition; 045import org.opends.server.admin.ManagedObjectAlreadyExistsException; 046import org.opends.server.admin.ManagedObjectDefinition; 047import org.opends.server.admin.PropertyOption; 048import org.opends.server.admin.PropertyProvider; 049import org.opends.server.admin.server.ConfigurationChangeListener; 050import org.opends.server.admin.server.ServerManagedObject; 051import org.opends.server.admin.std.client.ProfilerPluginCfgClient; 052import org.opends.server.admin.std.meta.PluginCfgDefn.PluginType; 053import org.opends.server.admin.std.server.PluginCfg; 054import org.opends.server.admin.std.server.ProfilerPluginCfg; 055import org.opends.server.admin.StringPropertyDefinition; 056import org.opends.server.admin.Tag; 057import org.opends.server.admin.UndefinedDefaultBehaviorProvider; 058import org.opends.server.types.DN; 059 060 061 062/** 063 * An interface for querying the Profiler Plugin managed object 064 * definition meta information. 065 * <p> 066 * The Profiler plug-in captures profiling information about 067 * operations performed inside the JVM while the OpenDJ directory 068 * server is running. 069 */ 070public final class ProfilerPluginCfgDefn extends ManagedObjectDefinition<ProfilerPluginCfgClient, ProfilerPluginCfg> { 071 072 // The singleton configuration definition instance. 073 private static final ProfilerPluginCfgDefn INSTANCE = new ProfilerPluginCfgDefn(); 074 075 076 077 /** 078 * Defines the set of permissable values for the "profile-action" property. 079 * <p> 080 * Specifies the action that should be taken by the profiler. 081 * <p> 082 * A value of "start" causes the profiler thread to start collecting 083 * data if it is not already active. A value of "stop" causes the 084 * profiler thread to stop collecting data and write it to disk, and 085 * a value of "cancel" causes the profiler thread to stop collecting 086 * data and discard anything that has been captured. These operations 087 * occur immediately. 088 */ 089 public static enum ProfileAction { 090 091 /** 092 * Stop collecting profile data and discard what has been 093 * captured. 094 */ 095 CANCEL("cancel"), 096 097 098 099 /** 100 * Do not take any action. 101 */ 102 NONE("none"), 103 104 105 106 /** 107 * Start collecting profile data. 108 */ 109 START("start"), 110 111 112 113 /** 114 * Stop collecting profile data and write what has been captured 115 * to a file in the profile directory. 116 */ 117 STOP("stop"); 118 119 120 121 // String representation of the value. 122 private final String name; 123 124 125 126 // Private constructor. 127 private ProfileAction(String name) { this.name = name; } 128 129 130 131 /** 132 * {@inheritDoc} 133 */ 134 public String toString() { return name; } 135 136 } 137 138 139 140 // The "enable-profiling-on-startup" property definition. 141 private static final BooleanPropertyDefinition PD_ENABLE_PROFILING_ON_STARTUP; 142 143 144 145 // The "invoke-for-internal-operations" property definition. 146 private static final BooleanPropertyDefinition PD_INVOKE_FOR_INTERNAL_OPERATIONS; 147 148 149 150 // The "java-class" property definition. 151 private static final ClassPropertyDefinition PD_JAVA_CLASS; 152 153 154 155 // The "plugin-type" property definition. 156 private static final EnumPropertyDefinition<PluginType> PD_PLUGIN_TYPE; 157 158 159 160 // The "profile-action" property definition. 161 private static final EnumPropertyDefinition<ProfileAction> PD_PROFILE_ACTION; 162 163 164 165 // The "profile-directory" property definition. 166 private static final StringPropertyDefinition PD_PROFILE_DIRECTORY; 167 168 169 170 // The "profile-sample-interval" property definition. 171 private static final DurationPropertyDefinition PD_PROFILE_SAMPLE_INTERVAL; 172 173 174 175 // Build the "enable-profiling-on-startup" property definition. 176 static { 177 BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE, "enable-profiling-on-startup"); 178 builder.setOption(PropertyOption.MANDATORY); 179 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "enable-profiling-on-startup")); 180 builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<Boolean>()); 181 PD_ENABLE_PROFILING_ON_STARTUP = builder.getInstance(); 182 INSTANCE.registerPropertyDefinition(PD_ENABLE_PROFILING_ON_STARTUP); 183 } 184 185 186 187 // Build the "invoke-for-internal-operations" property definition. 188 static { 189 BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE, "invoke-for-internal-operations"); 190 builder.setOption(PropertyOption.ADVANCED); 191 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "invoke-for-internal-operations")); 192 DefaultBehaviorProvider<Boolean> provider = new DefinedDefaultBehaviorProvider<Boolean>("false"); 193 builder.setDefaultBehaviorProvider(provider); 194 PD_INVOKE_FOR_INTERNAL_OPERATIONS = builder.getInstance(); 195 INSTANCE.registerPropertyDefinition(PD_INVOKE_FOR_INTERNAL_OPERATIONS); 196 } 197 198 199 200 // Build the "java-class" property definition. 201 static { 202 ClassPropertyDefinition.Builder builder = ClassPropertyDefinition.createBuilder(INSTANCE, "java-class"); 203 builder.setOption(PropertyOption.MANDATORY); 204 builder.setOption(PropertyOption.ADVANCED); 205 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "java-class")); 206 DefaultBehaviorProvider<String> provider = new DefinedDefaultBehaviorProvider<String>("org.opends.server.plugins.profiler.ProfilerPlugin"); 207 builder.setDefaultBehaviorProvider(provider); 208 builder.addInstanceOf("org.opends.server.api.plugin.DirectoryServerPlugin"); 209 PD_JAVA_CLASS = builder.getInstance(); 210 INSTANCE.registerPropertyDefinition(PD_JAVA_CLASS); 211 } 212 213 214 215 // Build the "plugin-type" property definition. 216 static { 217 EnumPropertyDefinition.Builder<PluginType> builder = EnumPropertyDefinition.createBuilder(INSTANCE, "plugin-type"); 218 builder.setOption(PropertyOption.MULTI_VALUED); 219 builder.setOption(PropertyOption.MANDATORY); 220 builder.setOption(PropertyOption.ADVANCED); 221 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.COMPONENT_RESTART, INSTANCE, "plugin-type")); 222 DefaultBehaviorProvider<PluginType> provider = new DefinedDefaultBehaviorProvider<PluginType>("startup"); 223 builder.setDefaultBehaviorProvider(provider); 224 builder.setEnumClass(PluginType.class); 225 PD_PLUGIN_TYPE = builder.getInstance(); 226 INSTANCE.registerPropertyDefinition(PD_PLUGIN_TYPE); 227 } 228 229 230 231 // Build the "profile-action" property definition. 232 static { 233 EnumPropertyDefinition.Builder<ProfileAction> builder = EnumPropertyDefinition.createBuilder(INSTANCE, "profile-action"); 234 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "profile-action")); 235 DefaultBehaviorProvider<ProfileAction> provider = new DefinedDefaultBehaviorProvider<ProfileAction>("none"); 236 builder.setDefaultBehaviorProvider(provider); 237 builder.setEnumClass(ProfileAction.class); 238 PD_PROFILE_ACTION = builder.getInstance(); 239 INSTANCE.registerPropertyDefinition(PD_PROFILE_ACTION); 240 } 241 242 243 244 // Build the "profile-directory" property definition. 245 static { 246 StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "profile-directory"); 247 builder.setOption(PropertyOption.MANDATORY); 248 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "profile-directory")); 249 builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<String>()); 250 builder.setPattern(".*", "DIR"); 251 PD_PROFILE_DIRECTORY = builder.getInstance(); 252 INSTANCE.registerPropertyDefinition(PD_PROFILE_DIRECTORY); 253 } 254 255 256 257 // Build the "profile-sample-interval" property definition. 258 static { 259 DurationPropertyDefinition.Builder builder = DurationPropertyDefinition.createBuilder(INSTANCE, "profile-sample-interval"); 260 builder.setOption(PropertyOption.MANDATORY); 261 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "profile-sample-interval")); 262 builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<Long>()); 263 builder.setBaseUnit("ms"); 264 builder.setUpperLimit("2147483647"); 265 builder.setLowerLimit("1"); 266 PD_PROFILE_SAMPLE_INTERVAL = builder.getInstance(); 267 INSTANCE.registerPropertyDefinition(PD_PROFILE_SAMPLE_INTERVAL); 268 } 269 270 271 272 // Register the tags associated with this managed object definition. 273 static { 274 INSTANCE.registerTag(Tag.valueOf("core-server")); 275 } 276 277 278 279 /** 280 * Get the Profiler Plugin configuration definition singleton. 281 * 282 * @return Returns the Profiler Plugin configuration definition 283 * singleton. 284 */ 285 public static ProfilerPluginCfgDefn getInstance() { 286 return INSTANCE; 287 } 288 289 290 291 /** 292 * Private constructor. 293 */ 294 private ProfilerPluginCfgDefn() { 295 super("profiler-plugin", PluginCfgDefn.getInstance()); 296 } 297 298 299 300 /** 301 * {@inheritDoc} 302 */ 303 public ProfilerPluginCfgClient createClientConfiguration( 304 ManagedObject<? extends ProfilerPluginCfgClient> impl) { 305 return new ProfilerPluginCfgClientImpl(impl); 306 } 307 308 309 310 /** 311 * {@inheritDoc} 312 */ 313 public ProfilerPluginCfg createServerConfiguration( 314 ServerManagedObject<? extends ProfilerPluginCfg> impl) { 315 return new ProfilerPluginCfgServerImpl(impl); 316 } 317 318 319 320 /** 321 * {@inheritDoc} 322 */ 323 public Class<ProfilerPluginCfg> getServerConfigurationClass() { 324 return ProfilerPluginCfg.class; 325 } 326 327 328 329 /** 330 * Get the "enabled" property definition. 331 * <p> 332 * Indicates whether the plug-in is enabled for use. 333 * 334 * @return Returns the "enabled" property definition. 335 */ 336 public BooleanPropertyDefinition getEnabledPropertyDefinition() { 337 return PluginCfgDefn.getInstance().getEnabledPropertyDefinition(); 338 } 339 340 341 342 /** 343 * Get the "enable-profiling-on-startup" property definition. 344 * <p> 345 * Indicates whether the profiler plug-in is to start collecting 346 * data automatically when the directory server is started. 347 * <p> 348 * This property is read only when the server is started, and any 349 * changes take effect on the next restart. This property is 350 * typically set to "false" unless startup profiling is required, 351 * because otherwise the volume of data that can be collected can 352 * cause the server to run out of memory if it is not turned off in a 353 * timely manner. 354 * 355 * @return Returns the "enable-profiling-on-startup" property definition. 356 */ 357 public BooleanPropertyDefinition getEnableProfilingOnStartupPropertyDefinition() { 358 return PD_ENABLE_PROFILING_ON_STARTUP; 359 } 360 361 362 363 /** 364 * Get the "invoke-for-internal-operations" property definition. 365 * <p> 366 * Indicates whether the plug-in should be invoked for internal 367 * operations. 368 * <p> 369 * Any plug-in that can be invoked for internal operations must 370 * ensure that it does not create any new internal operatons that can 371 * cause the same plug-in to be re-invoked. 372 * 373 * @return Returns the "invoke-for-internal-operations" property definition. 374 */ 375 public BooleanPropertyDefinition getInvokeForInternalOperationsPropertyDefinition() { 376 return PD_INVOKE_FOR_INTERNAL_OPERATIONS; 377 } 378 379 380 381 /** 382 * Get the "java-class" property definition. 383 * <p> 384 * Specifies the fully-qualified name of the Java class that 385 * provides the plug-in implementation. 386 * 387 * @return Returns the "java-class" property definition. 388 */ 389 public ClassPropertyDefinition getJavaClassPropertyDefinition() { 390 return PD_JAVA_CLASS; 391 } 392 393 394 395 /** 396 * Get the "plugin-type" property definition. 397 * <p> 398 * Specifies the set of plug-in types for the plug-in, which 399 * specifies the times at which the plug-in is invoked. 400 * 401 * @return Returns the "plugin-type" property definition. 402 */ 403 public EnumPropertyDefinition<PluginType> getPluginTypePropertyDefinition() { 404 return PD_PLUGIN_TYPE; 405 } 406 407 408 409 /** 410 * Get the "profile-action" property definition. 411 * <p> 412 * Specifies the action that should be taken by the profiler. 413 * <p> 414 * A value of "start" causes the profiler thread to start collecting 415 * data if it is not already active. A value of "stop" causes the 416 * profiler thread to stop collecting data and write it to disk, and 417 * a value of "cancel" causes the profiler thread to stop collecting 418 * data and discard anything that has been captured. These operations 419 * occur immediately. 420 * 421 * @return Returns the "profile-action" property definition. 422 */ 423 public EnumPropertyDefinition<ProfileAction> getProfileActionPropertyDefinition() { 424 return PD_PROFILE_ACTION; 425 } 426 427 428 429 /** 430 * Get the "profile-directory" property definition. 431 * <p> 432 * Specifies the path to the directory where profile information is 433 * to be written. This path may be either an absolute path or a path 434 * that is relative to the root of the OpenDJ directory server 435 * instance. 436 * <p> 437 * The directory must exist and the directory server must have 438 * permission to create new files in it. 439 * 440 * @return Returns the "profile-directory" property definition. 441 */ 442 public StringPropertyDefinition getProfileDirectoryPropertyDefinition() { 443 return PD_PROFILE_DIRECTORY; 444 } 445 446 447 448 /** 449 * Get the "profile-sample-interval" property definition. 450 * <p> 451 * Specifies the sample interval in milliseconds to be used when 452 * capturing profiling information in the server. 453 * <p> 454 * When capturing data, the profiler thread sleeps for this length 455 * of time between calls to obtain traces for all threads running in 456 * the JVM. 457 * 458 * @return Returns the "profile-sample-interval" property definition. 459 */ 460 public DurationPropertyDefinition getProfileSampleIntervalPropertyDefinition() { 461 return PD_PROFILE_SAMPLE_INTERVAL; 462 } 463 464 465 466 /** 467 * Managed object client implementation. 468 */ 469 private static class ProfilerPluginCfgClientImpl implements 470 ProfilerPluginCfgClient { 471 472 // Private implementation. 473 private ManagedObject<? extends ProfilerPluginCfgClient> impl; 474 475 476 477 // Private constructor. 478 private ProfilerPluginCfgClientImpl( 479 ManagedObject<? extends ProfilerPluginCfgClient> impl) { 480 this.impl = impl; 481 } 482 483 484 485 /** 486 * {@inheritDoc} 487 */ 488 public Boolean isEnabled() { 489 return impl.getPropertyValue(INSTANCE.getEnabledPropertyDefinition()); 490 } 491 492 493 494 /** 495 * {@inheritDoc} 496 */ 497 public void setEnabled(boolean value) { 498 impl.setPropertyValue(INSTANCE.getEnabledPropertyDefinition(), value); 499 } 500 501 502 503 /** 504 * {@inheritDoc} 505 */ 506 public Boolean isEnableProfilingOnStartup() { 507 return impl.getPropertyValue(INSTANCE.getEnableProfilingOnStartupPropertyDefinition()); 508 } 509 510 511 512 /** 513 * {@inheritDoc} 514 */ 515 public void setEnableProfilingOnStartup(boolean value) { 516 impl.setPropertyValue(INSTANCE.getEnableProfilingOnStartupPropertyDefinition(), value); 517 } 518 519 520 521 /** 522 * {@inheritDoc} 523 */ 524 public boolean isInvokeForInternalOperations() { 525 return impl.getPropertyValue(INSTANCE.getInvokeForInternalOperationsPropertyDefinition()); 526 } 527 528 529 530 /** 531 * {@inheritDoc} 532 */ 533 public void setInvokeForInternalOperations(Boolean value) { 534 impl.setPropertyValue(INSTANCE.getInvokeForInternalOperationsPropertyDefinition(), value); 535 } 536 537 538 539 /** 540 * {@inheritDoc} 541 */ 542 public String getJavaClass() { 543 return impl.getPropertyValue(INSTANCE.getJavaClassPropertyDefinition()); 544 } 545 546 547 548 /** 549 * {@inheritDoc} 550 */ 551 public void setJavaClass(String value) { 552 impl.setPropertyValue(INSTANCE.getJavaClassPropertyDefinition(), value); 553 } 554 555 556 557 /** 558 * {@inheritDoc} 559 */ 560 public SortedSet<PluginType> getPluginType() { 561 return impl.getPropertyValues(INSTANCE.getPluginTypePropertyDefinition()); 562 } 563 564 565 566 /** 567 * {@inheritDoc} 568 */ 569 public void setPluginType(Collection<PluginType> values) { 570 impl.setPropertyValues(INSTANCE.getPluginTypePropertyDefinition(), values); 571 } 572 573 574 575 /** 576 * {@inheritDoc} 577 */ 578 public ProfileAction getProfileAction() { 579 return impl.getPropertyValue(INSTANCE.getProfileActionPropertyDefinition()); 580 } 581 582 583 584 /** 585 * {@inheritDoc} 586 */ 587 public void setProfileAction(ProfileAction value) { 588 impl.setPropertyValue(INSTANCE.getProfileActionPropertyDefinition(), value); 589 } 590 591 592 593 /** 594 * {@inheritDoc} 595 */ 596 public String getProfileDirectory() { 597 return impl.getPropertyValue(INSTANCE.getProfileDirectoryPropertyDefinition()); 598 } 599 600 601 602 /** 603 * {@inheritDoc} 604 */ 605 public void setProfileDirectory(String value) { 606 impl.setPropertyValue(INSTANCE.getProfileDirectoryPropertyDefinition(), value); 607 } 608 609 610 611 /** 612 * {@inheritDoc} 613 */ 614 public Long getProfileSampleInterval() { 615 return impl.getPropertyValue(INSTANCE.getProfileSampleIntervalPropertyDefinition()); 616 } 617 618 619 620 /** 621 * {@inheritDoc} 622 */ 623 public void setProfileSampleInterval(long value) { 624 impl.setPropertyValue(INSTANCE.getProfileSampleIntervalPropertyDefinition(), value); 625 } 626 627 628 629 /** 630 * {@inheritDoc} 631 */ 632 public ManagedObjectDefinition<? extends ProfilerPluginCfgClient, ? extends ProfilerPluginCfg> definition() { 633 return INSTANCE; 634 } 635 636 637 638 /** 639 * {@inheritDoc} 640 */ 641 public PropertyProvider properties() { 642 return impl; 643 } 644 645 646 647 /** 648 * {@inheritDoc} 649 */ 650 public void commit() throws ManagedObjectAlreadyExistsException, 651 MissingMandatoryPropertiesException, ConcurrentModificationException, 652 OperationRejectedException, AuthorizationException, 653 CommunicationException { 654 impl.commit(); 655 } 656 657 658 659 /** {@inheritDoc} */ 660 public String toString() { 661 return impl.toString(); 662 } 663 } 664 665 666 667 /** 668 * Managed object server implementation. 669 */ 670 private static class ProfilerPluginCfgServerImpl implements 671 ProfilerPluginCfg { 672 673 // Private implementation. 674 private ServerManagedObject<? extends ProfilerPluginCfg> impl; 675 676 // The value of the "enabled" property. 677 private final boolean pEnabled; 678 679 // The value of the "enable-profiling-on-startup" property. 680 private final boolean pEnableProfilingOnStartup; 681 682 // The value of the "invoke-for-internal-operations" property. 683 private final boolean pInvokeForInternalOperations; 684 685 // The value of the "java-class" property. 686 private final String pJavaClass; 687 688 // The value of the "plugin-type" property. 689 private final SortedSet<PluginType> pPluginType; 690 691 // The value of the "profile-action" property. 692 private final ProfileAction pProfileAction; 693 694 // The value of the "profile-directory" property. 695 private final String pProfileDirectory; 696 697 // The value of the "profile-sample-interval" property. 698 private final long pProfileSampleInterval; 699 700 701 702 // Private constructor. 703 private ProfilerPluginCfgServerImpl(ServerManagedObject<? extends ProfilerPluginCfg> impl) { 704 this.impl = impl; 705 this.pEnabled = impl.getPropertyValue(INSTANCE.getEnabledPropertyDefinition()); 706 this.pEnableProfilingOnStartup = impl.getPropertyValue(INSTANCE.getEnableProfilingOnStartupPropertyDefinition()); 707 this.pInvokeForInternalOperations = impl.getPropertyValue(INSTANCE.getInvokeForInternalOperationsPropertyDefinition()); 708 this.pJavaClass = impl.getPropertyValue(INSTANCE.getJavaClassPropertyDefinition()); 709 this.pPluginType = impl.getPropertyValues(INSTANCE.getPluginTypePropertyDefinition()); 710 this.pProfileAction = impl.getPropertyValue(INSTANCE.getProfileActionPropertyDefinition()); 711 this.pProfileDirectory = impl.getPropertyValue(INSTANCE.getProfileDirectoryPropertyDefinition()); 712 this.pProfileSampleInterval = impl.getPropertyValue(INSTANCE.getProfileSampleIntervalPropertyDefinition()); 713 } 714 715 716 717 /** 718 * {@inheritDoc} 719 */ 720 public void addProfilerChangeListener( 721 ConfigurationChangeListener<ProfilerPluginCfg> listener) { 722 impl.registerChangeListener(listener); 723 } 724 725 726 727 /** 728 * {@inheritDoc} 729 */ 730 public void removeProfilerChangeListener( 731 ConfigurationChangeListener<ProfilerPluginCfg> listener) { 732 impl.deregisterChangeListener(listener); 733 } 734 /** 735 * {@inheritDoc} 736 */ 737 public void addChangeListener( 738 ConfigurationChangeListener<PluginCfg> listener) { 739 impl.registerChangeListener(listener); 740 } 741 742 743 744 /** 745 * {@inheritDoc} 746 */ 747 public void removeChangeListener( 748 ConfigurationChangeListener<PluginCfg> listener) { 749 impl.deregisterChangeListener(listener); 750 } 751 752 753 754 /** 755 * {@inheritDoc} 756 */ 757 public boolean isEnabled() { 758 return pEnabled; 759 } 760 761 762 763 /** 764 * {@inheritDoc} 765 */ 766 public boolean isEnableProfilingOnStartup() { 767 return pEnableProfilingOnStartup; 768 } 769 770 771 772 /** 773 * {@inheritDoc} 774 */ 775 public boolean isInvokeForInternalOperations() { 776 return pInvokeForInternalOperations; 777 } 778 779 780 781 /** 782 * {@inheritDoc} 783 */ 784 public String getJavaClass() { 785 return pJavaClass; 786 } 787 788 789 790 /** 791 * {@inheritDoc} 792 */ 793 public SortedSet<PluginType> getPluginType() { 794 return pPluginType; 795 } 796 797 798 799 /** 800 * {@inheritDoc} 801 */ 802 public ProfileAction getProfileAction() { 803 return pProfileAction; 804 } 805 806 807 808 /** 809 * {@inheritDoc} 810 */ 811 public String getProfileDirectory() { 812 return pProfileDirectory; 813 } 814 815 816 817 /** 818 * {@inheritDoc} 819 */ 820 public long getProfileSampleInterval() { 821 return pProfileSampleInterval; 822 } 823 824 825 826 /** 827 * {@inheritDoc} 828 */ 829 public Class<? extends ProfilerPluginCfg> configurationClass() { 830 return ProfilerPluginCfg.class; 831 } 832 833 834 835 /** 836 * {@inheritDoc} 837 */ 838 public DN dn() { 839 return impl.getDN(); 840 } 841 842 843 844 /** {@inheritDoc} */ 845 public String toString() { 846 return impl.toString(); 847 } 848 } 849}