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.util.Collection; 031import org.forgerock.opendj.config.AdministratorAction; 032import org.forgerock.opendj.config.BooleanPropertyDefinition; 033import org.forgerock.opendj.config.ClassPropertyDefinition; 034import org.forgerock.opendj.config.client.ConcurrentModificationException; 035import org.forgerock.opendj.config.client.IllegalManagedObjectNameException; 036import org.forgerock.opendj.config.client.ManagedObject; 037import org.forgerock.opendj.config.client.ManagedObjectDecodingException; 038import org.forgerock.opendj.config.client.MissingMandatoryPropertiesException; 039import org.forgerock.opendj.config.client.OperationRejectedException; 040import org.forgerock.opendj.config.DefaultBehaviorProvider; 041import org.forgerock.opendj.config.DefinedDefaultBehaviorProvider; 042import org.forgerock.opendj.config.DefinitionDecodingException; 043import org.forgerock.opendj.config.InstantiableRelationDefinition; 044import org.forgerock.opendj.config.IntegerPropertyDefinition; 045import org.forgerock.opendj.config.ManagedObjectAlreadyExistsException; 046import org.forgerock.opendj.config.ManagedObjectDefinition; 047import org.forgerock.opendj.config.ManagedObjectNotFoundException; 048import org.forgerock.opendj.config.PropertyException; 049import org.forgerock.opendj.config.PropertyOption; 050import org.forgerock.opendj.config.PropertyProvider; 051import org.forgerock.opendj.config.server.ConfigException; 052import org.forgerock.opendj.config.server.ConfigurationAddListener; 053import org.forgerock.opendj.config.server.ConfigurationChangeListener; 054import org.forgerock.opendj.config.server.ConfigurationDeleteListener; 055import org.forgerock.opendj.config.server.ServerManagedObject; 056import org.forgerock.opendj.config.Tag; 057import org.forgerock.opendj.ldap.DN; 058import org.forgerock.opendj.ldap.LdapException; 059import org.forgerock.opendj.server.config.client.DebugLogPublisherCfgClient; 060import org.forgerock.opendj.server.config.client.DebugTargetCfgClient; 061import org.forgerock.opendj.server.config.server.DebugLogPublisherCfg; 062import org.forgerock.opendj.server.config.server.DebugTargetCfg; 063import org.forgerock.opendj.server.config.server.LogPublisherCfg; 064 065 066 067/** 068 * An interface for querying the Debug Log Publisher managed object 069 * definition meta information. 070 * <p> 071 * Debug Log Publishers are responsible for distributing debug log 072 * messages from the debug logger to a destination. 073 */ 074public final class DebugLogPublisherCfgDefn extends ManagedObjectDefinition<DebugLogPublisherCfgClient, DebugLogPublisherCfg> { 075 076 // The singleton configuration definition instance. 077 private static final DebugLogPublisherCfgDefn INSTANCE = new DebugLogPublisherCfgDefn(); 078 079 080 081 // The "default-debug-exceptions-only" property definition. 082 private static final BooleanPropertyDefinition PD_DEFAULT_DEBUG_EXCEPTIONS_ONLY; 083 084 085 086 // The "default-include-throwable-cause" property definition. 087 private static final BooleanPropertyDefinition PD_DEFAULT_INCLUDE_THROWABLE_CAUSE; 088 089 090 091 // The "default-omit-method-entry-arguments" property definition. 092 private static final BooleanPropertyDefinition PD_DEFAULT_OMIT_METHOD_ENTRY_ARGUMENTS; 093 094 095 096 // The "default-omit-method-return-value" property definition. 097 private static final BooleanPropertyDefinition PD_DEFAULT_OMIT_METHOD_RETURN_VALUE; 098 099 100 101 // The "default-throwable-stack-frames" property definition. 102 private static final IntegerPropertyDefinition PD_DEFAULT_THROWABLE_STACK_FRAMES; 103 104 105 106 // The "java-class" property definition. 107 private static final ClassPropertyDefinition PD_JAVA_CLASS; 108 109 110 111 // The "debug-targets" relation definition. 112 private static final InstantiableRelationDefinition<DebugTargetCfgClient, DebugTargetCfg> RD_DEBUG_TARGETS; 113 114 115 116 // Build the "default-debug-exceptions-only" property definition. 117 static { 118 BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE, "default-debug-exceptions-only"); 119 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "default-debug-exceptions-only")); 120 DefaultBehaviorProvider<Boolean> provider = new DefinedDefaultBehaviorProvider<Boolean>("false"); 121 builder.setDefaultBehaviorProvider(provider); 122 PD_DEFAULT_DEBUG_EXCEPTIONS_ONLY = builder.getInstance(); 123 INSTANCE.registerPropertyDefinition(PD_DEFAULT_DEBUG_EXCEPTIONS_ONLY); 124 } 125 126 127 128 // Build the "default-include-throwable-cause" property definition. 129 static { 130 BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE, "default-include-throwable-cause"); 131 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "default-include-throwable-cause")); 132 DefaultBehaviorProvider<Boolean> provider = new DefinedDefaultBehaviorProvider<Boolean>("true"); 133 builder.setDefaultBehaviorProvider(provider); 134 PD_DEFAULT_INCLUDE_THROWABLE_CAUSE = builder.getInstance(); 135 INSTANCE.registerPropertyDefinition(PD_DEFAULT_INCLUDE_THROWABLE_CAUSE); 136 } 137 138 139 140 // Build the "default-omit-method-entry-arguments" property definition. 141 static { 142 BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE, "default-omit-method-entry-arguments"); 143 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "default-omit-method-entry-arguments")); 144 DefaultBehaviorProvider<Boolean> provider = new DefinedDefaultBehaviorProvider<Boolean>("false"); 145 builder.setDefaultBehaviorProvider(provider); 146 PD_DEFAULT_OMIT_METHOD_ENTRY_ARGUMENTS = builder.getInstance(); 147 INSTANCE.registerPropertyDefinition(PD_DEFAULT_OMIT_METHOD_ENTRY_ARGUMENTS); 148 } 149 150 151 152 // Build the "default-omit-method-return-value" property definition. 153 static { 154 BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE, "default-omit-method-return-value"); 155 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "default-omit-method-return-value")); 156 DefaultBehaviorProvider<Boolean> provider = new DefinedDefaultBehaviorProvider<Boolean>("false"); 157 builder.setDefaultBehaviorProvider(provider); 158 PD_DEFAULT_OMIT_METHOD_RETURN_VALUE = builder.getInstance(); 159 INSTANCE.registerPropertyDefinition(PD_DEFAULT_OMIT_METHOD_RETURN_VALUE); 160 } 161 162 163 164 // Build the "default-throwable-stack-frames" property definition. 165 static { 166 IntegerPropertyDefinition.Builder builder = IntegerPropertyDefinition.createBuilder(INSTANCE, "default-throwable-stack-frames"); 167 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "default-throwable-stack-frames")); 168 DefaultBehaviorProvider<Integer> provider = new DefinedDefaultBehaviorProvider<Integer>("2147483647"); 169 builder.setDefaultBehaviorProvider(provider); 170 builder.setUpperLimit(2147483647); 171 builder.setLowerLimit(0); 172 PD_DEFAULT_THROWABLE_STACK_FRAMES = builder.getInstance(); 173 INSTANCE.registerPropertyDefinition(PD_DEFAULT_THROWABLE_STACK_FRAMES); 174 } 175 176 177 178 // Build the "java-class" property definition. 179 static { 180 ClassPropertyDefinition.Builder builder = ClassPropertyDefinition.createBuilder(INSTANCE, "java-class"); 181 builder.setOption(PropertyOption.MANDATORY); 182 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "java-class")); 183 DefaultBehaviorProvider<String> provider = new DefinedDefaultBehaviorProvider<String>("org.opends.server.loggers.DebugLogPublisher"); 184 builder.setDefaultBehaviorProvider(provider); 185 builder.addInstanceOf("org.opends.server.loggers.LogPublisher"); 186 PD_JAVA_CLASS = builder.getInstance(); 187 INSTANCE.registerPropertyDefinition(PD_JAVA_CLASS); 188 } 189 190 191 192 // Build the "debug-targets" relation definition. 193 static { 194 InstantiableRelationDefinition.Builder<DebugTargetCfgClient, DebugTargetCfg> builder = 195 new InstantiableRelationDefinition.Builder<DebugTargetCfgClient, DebugTargetCfg>(INSTANCE, "debug-target", "debug-targets", DebugTargetCfgDefn.getInstance()); 196 builder.setNamingProperty(DebugTargetCfgDefn.getInstance().getDebugScopePropertyDefinition()); 197 RD_DEBUG_TARGETS = builder.getInstance(); 198 INSTANCE.registerRelationDefinition(RD_DEBUG_TARGETS); 199 } 200 201 202 203 // Register the tags associated with this managed object definition. 204 static { 205 INSTANCE.registerTag(Tag.valueOf("logging")); 206 } 207 208 209 210 /** 211 * Get the Debug Log Publisher configuration definition singleton. 212 * 213 * @return Returns the Debug Log Publisher configuration definition 214 * singleton. 215 */ 216 public static DebugLogPublisherCfgDefn getInstance() { 217 return INSTANCE; 218 } 219 220 221 222 /** 223 * Private constructor. 224 */ 225 private DebugLogPublisherCfgDefn() { 226 super("debug-log-publisher", LogPublisherCfgDefn.getInstance()); 227 } 228 229 230 231 /** 232 * {@inheritDoc} 233 */ 234 public DebugLogPublisherCfgClient createClientConfiguration( 235 ManagedObject<? extends DebugLogPublisherCfgClient> impl) { 236 return new DebugLogPublisherCfgClientImpl(impl); 237 } 238 239 240 241 /** 242 * {@inheritDoc} 243 */ 244 public DebugLogPublisherCfg createServerConfiguration( 245 ServerManagedObject<? extends DebugLogPublisherCfg> impl) { 246 return new DebugLogPublisherCfgServerImpl(impl); 247 } 248 249 250 251 /** 252 * {@inheritDoc} 253 */ 254 public Class<DebugLogPublisherCfg> getServerConfigurationClass() { 255 return DebugLogPublisherCfg.class; 256 } 257 258 259 260 /** 261 * Get the "default-debug-exceptions-only" property definition. 262 * <p> 263 * Indicates whether only logs with exception should be logged. 264 * 265 * @return Returns the "default-debug-exceptions-only" property definition. 266 */ 267 public BooleanPropertyDefinition getDefaultDebugExceptionsOnlyPropertyDefinition() { 268 return PD_DEFAULT_DEBUG_EXCEPTIONS_ONLY; 269 } 270 271 272 273 /** 274 * Get the "default-include-throwable-cause" property definition. 275 * <p> 276 * Indicates whether to include the cause of exceptions in exception 277 * thrown and caught messages logged by default. 278 * 279 * @return Returns the "default-include-throwable-cause" property definition. 280 */ 281 public BooleanPropertyDefinition getDefaultIncludeThrowableCausePropertyDefinition() { 282 return PD_DEFAULT_INCLUDE_THROWABLE_CAUSE; 283 } 284 285 286 287 /** 288 * Get the "default-omit-method-entry-arguments" property definition. 289 * <p> 290 * Indicates whether to include method arguments in debug messages 291 * logged by default. 292 * 293 * @return Returns the "default-omit-method-entry-arguments" property definition. 294 */ 295 public BooleanPropertyDefinition getDefaultOmitMethodEntryArgumentsPropertyDefinition() { 296 return PD_DEFAULT_OMIT_METHOD_ENTRY_ARGUMENTS; 297 } 298 299 300 301 /** 302 * Get the "default-omit-method-return-value" property definition. 303 * <p> 304 * Indicates whether to include the return value in debug messages 305 * logged by default. 306 * 307 * @return Returns the "default-omit-method-return-value" property definition. 308 */ 309 public BooleanPropertyDefinition getDefaultOmitMethodReturnValuePropertyDefinition() { 310 return PD_DEFAULT_OMIT_METHOD_RETURN_VALUE; 311 } 312 313 314 315 /** 316 * Get the "default-throwable-stack-frames" property definition. 317 * <p> 318 * Indicates the number of stack frames to include in the stack 319 * trace for method entry and exception thrown messages. 320 * 321 * @return Returns the "default-throwable-stack-frames" property definition. 322 */ 323 public IntegerPropertyDefinition getDefaultThrowableStackFramesPropertyDefinition() { 324 return PD_DEFAULT_THROWABLE_STACK_FRAMES; 325 } 326 327 328 329 /** 330 * Get the "enabled" property definition. 331 * <p> 332 * Indicates whether the Debug Log Publisher is enabled for use. 333 * 334 * @return Returns the "enabled" property definition. 335 */ 336 public BooleanPropertyDefinition getEnabledPropertyDefinition() { 337 return LogPublisherCfgDefn.getInstance().getEnabledPropertyDefinition(); 338 } 339 340 341 342 /** 343 * Get the "java-class" property definition. 344 * <p> 345 * The fully-qualified name of the Java class that provides the 346 * Debug Log Publisher implementation. 347 * 348 * @return Returns the "java-class" property definition. 349 */ 350 public ClassPropertyDefinition getJavaClassPropertyDefinition() { 351 return PD_JAVA_CLASS; 352 } 353 354 355 356 /** 357 * Get the "debug-targets" relation definition. 358 * 359 * @return Returns the "debug-targets" relation definition. 360 */ 361 public InstantiableRelationDefinition<DebugTargetCfgClient,DebugTargetCfg> getDebugTargetsRelationDefinition() { 362 return RD_DEBUG_TARGETS; 363 } 364 365 366 367 /** 368 * Managed object client implementation. 369 */ 370 private static class DebugLogPublisherCfgClientImpl implements 371 DebugLogPublisherCfgClient { 372 373 // Private implementation. 374 private ManagedObject<? extends DebugLogPublisherCfgClient> impl; 375 376 377 378 // Private constructor. 379 private DebugLogPublisherCfgClientImpl( 380 ManagedObject<? extends DebugLogPublisherCfgClient> impl) { 381 this.impl = impl; 382 } 383 384 385 386 /** 387 * {@inheritDoc} 388 */ 389 public boolean isDefaultDebugExceptionsOnly() { 390 return impl.getPropertyValue(INSTANCE.getDefaultDebugExceptionsOnlyPropertyDefinition()); 391 } 392 393 394 395 /** 396 * {@inheritDoc} 397 */ 398 public void setDefaultDebugExceptionsOnly(Boolean value) { 399 impl.setPropertyValue(INSTANCE.getDefaultDebugExceptionsOnlyPropertyDefinition(), value); 400 } 401 402 403 404 /** 405 * {@inheritDoc} 406 */ 407 public boolean isDefaultIncludeThrowableCause() { 408 return impl.getPropertyValue(INSTANCE.getDefaultIncludeThrowableCausePropertyDefinition()); 409 } 410 411 412 413 /** 414 * {@inheritDoc} 415 */ 416 public void setDefaultIncludeThrowableCause(Boolean value) { 417 impl.setPropertyValue(INSTANCE.getDefaultIncludeThrowableCausePropertyDefinition(), value); 418 } 419 420 421 422 /** 423 * {@inheritDoc} 424 */ 425 public boolean isDefaultOmitMethodEntryArguments() { 426 return impl.getPropertyValue(INSTANCE.getDefaultOmitMethodEntryArgumentsPropertyDefinition()); 427 } 428 429 430 431 /** 432 * {@inheritDoc} 433 */ 434 public void setDefaultOmitMethodEntryArguments(Boolean value) { 435 impl.setPropertyValue(INSTANCE.getDefaultOmitMethodEntryArgumentsPropertyDefinition(), value); 436 } 437 438 439 440 /** 441 * {@inheritDoc} 442 */ 443 public boolean isDefaultOmitMethodReturnValue() { 444 return impl.getPropertyValue(INSTANCE.getDefaultOmitMethodReturnValuePropertyDefinition()); 445 } 446 447 448 449 /** 450 * {@inheritDoc} 451 */ 452 public void setDefaultOmitMethodReturnValue(Boolean value) { 453 impl.setPropertyValue(INSTANCE.getDefaultOmitMethodReturnValuePropertyDefinition(), value); 454 } 455 456 457 458 /** 459 * {@inheritDoc} 460 */ 461 public int getDefaultThrowableStackFrames() { 462 return impl.getPropertyValue(INSTANCE.getDefaultThrowableStackFramesPropertyDefinition()); 463 } 464 465 466 467 /** 468 * {@inheritDoc} 469 */ 470 public void setDefaultThrowableStackFrames(Integer value) { 471 impl.setPropertyValue(INSTANCE.getDefaultThrowableStackFramesPropertyDefinition(), value); 472 } 473 474 475 476 /** 477 * {@inheritDoc} 478 */ 479 public Boolean isEnabled() { 480 return impl.getPropertyValue(INSTANCE.getEnabledPropertyDefinition()); 481 } 482 483 484 485 /** 486 * {@inheritDoc} 487 */ 488 public void setEnabled(boolean value) { 489 impl.setPropertyValue(INSTANCE.getEnabledPropertyDefinition(), value); 490 } 491 492 493 494 /** 495 * {@inheritDoc} 496 */ 497 public String getJavaClass() { 498 return impl.getPropertyValue(INSTANCE.getJavaClassPropertyDefinition()); 499 } 500 501 502 503 /** 504 * {@inheritDoc} 505 */ 506 public void setJavaClass(String value) { 507 impl.setPropertyValue(INSTANCE.getJavaClassPropertyDefinition(), value); 508 } 509 510 511 512 /** 513 * {@inheritDoc} 514 */ 515 public String[] listDebugTargets() throws ConcurrentModificationException, 516 LdapException { 517 return impl.listChildren(INSTANCE.getDebugTargetsRelationDefinition()); 518 } 519 520 521 522 /** 523 * {@inheritDoc} 524 */ 525 public DebugTargetCfgClient getDebugTarget(String name) 526 throws DefinitionDecodingException, ManagedObjectDecodingException, 527 ManagedObjectNotFoundException, ConcurrentModificationException, 528 LdapException { 529 return impl.getChild(INSTANCE.getDebugTargetsRelationDefinition(), name).getConfiguration(); 530 } 531 532 533 534 /** 535 * {@inheritDoc} 536 */ 537 public <M extends DebugTargetCfgClient> M createDebugTarget( 538 ManagedObjectDefinition<M, ? extends DebugTargetCfg> d, String name, Collection<PropertyException> exceptions) throws IllegalManagedObjectNameException { 539 return impl.createChild(INSTANCE.getDebugTargetsRelationDefinition(), d, name, exceptions).getConfiguration(); 540 } 541 542 543 544 /** 545 * {@inheritDoc} 546 */ 547 public void removeDebugTarget(String name) 548 throws ManagedObjectNotFoundException, ConcurrentModificationException, 549 OperationRejectedException, LdapException { 550 impl.removeChild(INSTANCE.getDebugTargetsRelationDefinition(), name); 551 } 552 553 554 555 /** 556 * {@inheritDoc} 557 */ 558 public ManagedObjectDefinition<? extends DebugLogPublisherCfgClient, ? extends DebugLogPublisherCfg> definition() { 559 return INSTANCE; 560 } 561 562 563 564 /** 565 * {@inheritDoc} 566 */ 567 public PropertyProvider properties() { 568 return impl; 569 } 570 571 572 573 /** 574 * {@inheritDoc} 575 */ 576 public void commit() throws ManagedObjectAlreadyExistsException, 577 MissingMandatoryPropertiesException, ConcurrentModificationException, 578 OperationRejectedException, LdapException { 579 impl.commit(); 580 } 581 582 } 583 584 585 586 /** 587 * Managed object server implementation. 588 */ 589 private static class DebugLogPublisherCfgServerImpl implements 590 DebugLogPublisherCfg { 591 592 // Private implementation. 593 private ServerManagedObject<? extends DebugLogPublisherCfg> impl; 594 595 // The value of the "default-debug-exceptions-only" property. 596 private final boolean pDefaultDebugExceptionsOnly; 597 598 // The value of the "default-include-throwable-cause" property. 599 private final boolean pDefaultIncludeThrowableCause; 600 601 // The value of the "default-omit-method-entry-arguments" property. 602 private final boolean pDefaultOmitMethodEntryArguments; 603 604 // The value of the "default-omit-method-return-value" property. 605 private final boolean pDefaultOmitMethodReturnValue; 606 607 // The value of the "default-throwable-stack-frames" property. 608 private final int pDefaultThrowableStackFrames; 609 610 // The value of the "enabled" property. 611 private final boolean pEnabled; 612 613 // The value of the "java-class" property. 614 private final String pJavaClass; 615 616 617 618 // Private constructor. 619 private DebugLogPublisherCfgServerImpl(ServerManagedObject<? extends DebugLogPublisherCfg> impl) { 620 this.impl = impl; 621 this.pDefaultDebugExceptionsOnly = impl.getPropertyValue(INSTANCE.getDefaultDebugExceptionsOnlyPropertyDefinition()); 622 this.pDefaultIncludeThrowableCause = impl.getPropertyValue(INSTANCE.getDefaultIncludeThrowableCausePropertyDefinition()); 623 this.pDefaultOmitMethodEntryArguments = impl.getPropertyValue(INSTANCE.getDefaultOmitMethodEntryArgumentsPropertyDefinition()); 624 this.pDefaultOmitMethodReturnValue = impl.getPropertyValue(INSTANCE.getDefaultOmitMethodReturnValuePropertyDefinition()); 625 this.pDefaultThrowableStackFrames = impl.getPropertyValue(INSTANCE.getDefaultThrowableStackFramesPropertyDefinition()); 626 this.pEnabled = impl.getPropertyValue(INSTANCE.getEnabledPropertyDefinition()); 627 this.pJavaClass = impl.getPropertyValue(INSTANCE.getJavaClassPropertyDefinition()); 628 } 629 630 631 632 /** 633 * {@inheritDoc} 634 */ 635 public void addDebugChangeListener( 636 ConfigurationChangeListener<DebugLogPublisherCfg> listener) { 637 impl.registerChangeListener(listener); 638 } 639 640 641 642 /** 643 * {@inheritDoc} 644 */ 645 public void removeDebugChangeListener( 646 ConfigurationChangeListener<DebugLogPublisherCfg> listener) { 647 impl.deregisterChangeListener(listener); 648 } 649 /** 650 * {@inheritDoc} 651 */ 652 public void addChangeListener( 653 ConfigurationChangeListener<LogPublisherCfg> listener) { 654 impl.registerChangeListener(listener); 655 } 656 657 658 659 /** 660 * {@inheritDoc} 661 */ 662 public void removeChangeListener( 663 ConfigurationChangeListener<LogPublisherCfg> listener) { 664 impl.deregisterChangeListener(listener); 665 } 666 667 668 669 /** 670 * {@inheritDoc} 671 */ 672 public boolean isDefaultDebugExceptionsOnly() { 673 return pDefaultDebugExceptionsOnly; 674 } 675 676 677 678 /** 679 * {@inheritDoc} 680 */ 681 public boolean isDefaultIncludeThrowableCause() { 682 return pDefaultIncludeThrowableCause; 683 } 684 685 686 687 /** 688 * {@inheritDoc} 689 */ 690 public boolean isDefaultOmitMethodEntryArguments() { 691 return pDefaultOmitMethodEntryArguments; 692 } 693 694 695 696 /** 697 * {@inheritDoc} 698 */ 699 public boolean isDefaultOmitMethodReturnValue() { 700 return pDefaultOmitMethodReturnValue; 701 } 702 703 704 705 /** 706 * {@inheritDoc} 707 */ 708 public int getDefaultThrowableStackFrames() { 709 return pDefaultThrowableStackFrames; 710 } 711 712 713 714 /** 715 * {@inheritDoc} 716 */ 717 public boolean isEnabled() { 718 return pEnabled; 719 } 720 721 722 723 /** 724 * {@inheritDoc} 725 */ 726 public String getJavaClass() { 727 return pJavaClass; 728 } 729 730 731 732 /** 733 * {@inheritDoc} 734 */ 735 public String[] listDebugTargets() { 736 return impl.listChildren(INSTANCE.getDebugTargetsRelationDefinition()); 737 } 738 739 740 741 /** 742 * {@inheritDoc} 743 */ 744 public DebugTargetCfg getDebugTarget(String name) throws ConfigException { 745 return impl.getChild(INSTANCE.getDebugTargetsRelationDefinition(), name).getConfiguration(); 746 } 747 748 749 750 /** 751 * {@inheritDoc} 752 */ 753 public void addDebugTargetAddListener( 754 ConfigurationAddListener<DebugTargetCfg> listener) throws ConfigException { 755 impl.registerAddListener(INSTANCE.getDebugTargetsRelationDefinition(), listener); 756 } 757 758 759 760 /** 761 * {@inheritDoc} 762 */ 763 public void removeDebugTargetAddListener( 764 ConfigurationAddListener<DebugTargetCfg> listener) { 765 impl.deregisterAddListener(INSTANCE.getDebugTargetsRelationDefinition(), listener); 766 } 767 768 769 770 /** 771 * {@inheritDoc} 772 */ 773 public void addDebugTargetDeleteListener( 774 ConfigurationDeleteListener<DebugTargetCfg> listener) throws ConfigException { 775 impl.registerDeleteListener(INSTANCE.getDebugTargetsRelationDefinition(), listener); 776 } 777 778 779 780 /** 781 * {@inheritDoc} 782 */ 783 public void removeDebugTargetDeleteListener( 784 ConfigurationDeleteListener<DebugTargetCfg> listener) { 785 impl.deregisterDeleteListener(INSTANCE.getDebugTargetsRelationDefinition(), listener); 786 } 787 788 789 790 /** 791 * {@inheritDoc} 792 */ 793 public Class<? extends DebugLogPublisherCfg> configurationClass() { 794 return DebugLogPublisherCfg.class; 795 } 796 797 798 799 /** 800 * {@inheritDoc} 801 */ 802 public DN dn() { 803 return impl.getDN(); 804 } 805 806 } 807}