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