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