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 010 * docs/licenses/cddl.txt 011 * or http://www.opensource.org/licenses/cddl1.php. 012 * See the License for the specific language governing permissions 013 * and limitations under the License. 014 * 015 * When distributing Covered Code, include this CDDL HEADER in each 016 * file and include the License file at 017 * docs/licenses/cddl.txt. If applicable, 018 * add the following below this CDDL HEADER, with the fields enclosed 019 * by brackets "[]" replaced with your own identifying information: 020 * Portions Copyright [yyyy] [name of copyright owner] 021 * 022 * CDDL HEADER END 023 * 024 * 025 * Copyright 2010-2013 UnboundID Corp. 026 */ 027 package com.unboundid.directory.sdk.common.api; 028 029 030 031 import java.security.cert.Certificate; 032 import java.util.Collections; 033 import java.util.List; 034 import java.util.Map; 035 036 import com.unboundid.directory.sdk.common.config.AccessLoggerConfig; 037 import com.unboundid.directory.sdk.common.internal.ExampleUsageProvider; 038 import com.unboundid.directory.sdk.common.internal.Reconfigurable; 039 import com.unboundid.directory.sdk.common.internal.UnboundIDExtension; 040 import com.unboundid.directory.sdk.common.operation.AbandonRequest; 041 import com.unboundid.directory.sdk.common.operation.AddRequest; 042 import com.unboundid.directory.sdk.common.operation.AddResult; 043 import com.unboundid.directory.sdk.common.operation.BindResult; 044 import com.unboundid.directory.sdk.common.operation.CompareRequest; 045 import com.unboundid.directory.sdk.common.operation.CompareResult; 046 import com.unboundid.directory.sdk.common.operation.DeleteRequest; 047 import com.unboundid.directory.sdk.common.operation.DeleteResult; 048 import com.unboundid.directory.sdk.common.operation.ExtendedRequest; 049 import com.unboundid.directory.sdk.common.operation.ExtendedResult; 050 import com.unboundid.directory.sdk.common.operation.GenericResult; 051 import com.unboundid.directory.sdk.common.operation.ModifyRequest; 052 import com.unboundid.directory.sdk.common.operation.ModifyResult; 053 import com.unboundid.directory.sdk.common.operation.ModifyDNRequest; 054 import com.unboundid.directory.sdk.common.operation.ModifyDNResult; 055 import com.unboundid.directory.sdk.common.operation.SASLBindRequest; 056 import com.unboundid.directory.sdk.common.operation.SearchRequest; 057 import com.unboundid.directory.sdk.common.operation.SearchResult; 058 import com.unboundid.directory.sdk.common.operation.SimpleBindRequest; 059 import com.unboundid.directory.sdk.common.operation.UnbindRequest; 060 import com.unboundid.directory.sdk.common.types.ClientContext; 061 import com.unboundid.directory.sdk.common.types.CompletedOperationContext; 062 import com.unboundid.directory.sdk.common.types.CompletedSearchOperationContext; 063 import com.unboundid.directory.sdk.common.types.DisconnectReason; 064 import com.unboundid.directory.sdk.common.types.Entry; 065 import com.unboundid.directory.sdk.common.types.ForwardTarget; 066 import com.unboundid.directory.sdk.common.types.OperationContext; 067 import com.unboundid.directory.sdk.common.types.ServerContext; 068 import com.unboundid.directory.sdk.ds.internal.DirectoryServerExtension; 069 import com.unboundid.directory.sdk.metrics.internal.MetricsEngineExtension; 070 import com.unboundid.directory.sdk.proxy.internal.DirectoryProxyServerExtension; 071 import com.unboundid.directory.sdk.sync.internal.SynchronizationServerExtension; 072 import com.unboundid.ldap.sdk.Control; 073 import com.unboundid.ldap.sdk.IntermediateResponse; 074 import com.unboundid.ldap.sdk.LDAPException; 075 import com.unboundid.ldap.sdk.ResultCode; 076 import com.unboundid.util.Extensible; 077 import com.unboundid.util.ThreadSafety; 078 import com.unboundid.util.ThreadSafetyLevel; 079 import com.unboundid.util.args.ArgumentException; 080 import com.unboundid.util.args.ArgumentParser; 081 082 083 084 /** 085 * This class defines an API that must be implemented by extensions which 086 * record information about interaction with clients, including connections 087 * established and received and operations requested and completed. Access 088 * loggers may write information to files, but they may also write to other 089 * locations, including databases, message, queues, e-mail messages, or other 090 * targets. 091 * <BR><BR> 092 * Access loggers will be invoked for the following events: 093 * <UL> 094 * <LI>Whenever a new connection is established.</LI> 095 * <LI>Whenever an existing connection is closed or terminated.</LI> 096 * <LI>Whenever an abandon, add, bind, compare, delete, extended, modify, 097 * modify DN, search, or unbind request is received.</LI> 098 * <LI>Whenever an abandon, add, bind, compare, delete, extended, modify, 099 * modify DN, or search request is forwarded to another server for 100 * processing.</LI> 101 * <LI>If a forwarded add, bind, compare, delete, extended, modify, modify DN, 102 * or search operation fails.</LI> 103 * <LI>After sending the result for an add, bind, compare, delete, extended, 104 * modify, modify DN, or search operation.</LI> 105 * <LI>After completing processing for an abandon operation.</LI> 106 * <LI>After sending a search result entry, search result reference, or 107 * intermediate response message to the client.</LI> 108 * </UL> 109 * <BR><BR> 110 * Each access logger may configured to indicate whether to include or exclude 111 * internal and/or replicated operations, and criteria may be used to provide 112 * filtered logging. This is handled automatically by the server, so individual 113 * access logger implementations do not need to attempt to perform that 114 * filtering on their own. However, they may perform additional processing if 115 * desired to further narrow the set of messages that should be logged. 116 * <BR> 117 * <H2>Configuring Access Loggers</H2> 118 * In order to configure an access logger created using this API, use a command 119 * like: 120 * <PRE> 121 * dsconfig create-log-publisher \ 122 * --publisher-name "<I>{logger-name}</I>" \ 123 * --type third-party-access \ 124 * --set enabled:true \ 125 * --set "extension-class:<I>{class-name}</I>" \ 126 * --set "extension-argument:<I>{name=value}</I>" 127 * </PRE> 128 * where "<I>{logger-name}</I>" is the name to use for the access logger 129 * instance, "<I>{class-name}</I>" is the fully-qualified name of the Java class 130 * that extends {@code com.unboundid.directory.sdk.common.api.AccessLogger}, 131 * and "<I>{name=value}</I>" represents name-value pairs for any arguments to 132 * provide to the logger. If multiple arguments should be provided to the 133 * logger, then the "<CODE>--set extension-argument:<I>{name=value}</I></CODE>" 134 * option should be provided multiple times. 135 * 136 * @see FileBasedAccessLogger 137 * @see com.unboundid.directory.sdk.common.scripting.ScriptedAccessLogger 138 * @see 139 * com.unboundid.directory.sdk.common.scripting.ScriptedFileBasedAccessLogger 140 */ 141 @Extensible() 142 @DirectoryServerExtension() 143 @DirectoryProxyServerExtension(appliesToLocalContent=true, 144 appliesToRemoteContent=true) 145 @SynchronizationServerExtension(appliesToLocalContent=true, 146 appliesToSynchronizedContent=false) 147 @MetricsEngineExtension() 148 @ThreadSafety(level=ThreadSafetyLevel.INTERFACE_THREADSAFE) 149 public abstract class AccessLogger 150 implements UnboundIDExtension, Reconfigurable<AccessLoggerConfig>, 151 ExampleUsageProvider 152 { 153 /** 154 * Creates a new instance of this access logger. All access logger 155 * implementations must include a default constructor, but any initialization 156 * should generally be done in the {@code initializeAccessLogger} method. 157 */ 158 public AccessLogger() 159 { 160 // No implementation is required. 161 } 162 163 164 165 /** 166 * {@inheritDoc} 167 */ 168 public abstract String getExtensionName(); 169 170 171 172 /** 173 * {@inheritDoc} 174 */ 175 public abstract String[] getExtensionDescription(); 176 177 178 179 /** 180 * {@inheritDoc} 181 */ 182 public void defineConfigArguments(final ArgumentParser parser) 183 throws ArgumentException 184 { 185 // No arguments will be allowed by default. 186 } 187 188 189 190 /** 191 * Initializes this access logger. 192 * 193 * @param serverContext A handle to the server context for the server in 194 * which this extension is running. 195 * @param config The general configuration for this access logger. 196 * @param parser The argument parser which has been initialized from 197 * the configuration for this access logger. 198 * 199 * @throws LDAPException If a problem occurs while initializing this access 200 * logger. 201 */ 202 public void initializeAccessLogger(final ServerContext serverContext, 203 final AccessLoggerConfig config, 204 final ArgumentParser parser) 205 throws LDAPException 206 { 207 // No initialization will be performed by default. 208 } 209 210 211 212 /** 213 * {@inheritDoc} 214 */ 215 public boolean isConfigurationAcceptable(final AccessLoggerConfig config, 216 final ArgumentParser parser, 217 final List<String> unacceptableReasons) 218 { 219 // No extended validation will be performed by default. 220 return true; 221 } 222 223 224 225 /** 226 * {@inheritDoc} 227 */ 228 public ResultCode applyConfiguration(final AccessLoggerConfig config, 229 final ArgumentParser parser, 230 final List<String> adminActionsRequired, 231 final List<String> messages) 232 { 233 // By default, no configuration changes will be applied. If there are any 234 // arguments, then add an admin action message indicating that the extension 235 // needs to be restarted for any changes to take effect. 236 if (! parser.getNamedArguments().isEmpty()) 237 { 238 adminActionsRequired.add( 239 "No configuration change has actually been applied. The new " + 240 "configuration will not take effect until this access logger " + 241 "is disabled and re-enabled or until the server is restarted."); 242 } 243 244 return ResultCode.SUCCESS; 245 } 246 247 248 249 /** 250 * Performs any cleanup which may be necessary when this access logger is to 251 * be taken out of service. 252 */ 253 public void finalizeAccessLogger() 254 { 255 // No implementation is required. 256 } 257 258 259 260 /** 261 * Logs a message indicating that a new connection has been established. 262 * 263 * @param clientContext Information about the client connection that has 264 * been accepted. 265 */ 266 public void logConnect(final ClientContext clientContext) 267 { 268 // No action will be taken by default. 269 } 270 271 272 273 /** 274 * Logs a message indicating that a connection has been closed. 275 * 276 * @param clientContext Information about the client connection that has 277 * been closed. 278 * @param disconnectReason A general reason that the connection has been 279 * closed. 280 * @param message A message with additional information about the 281 * closure. It may be {@code null} if none is 282 * available. 283 */ 284 public void logDisconnect(final ClientContext clientContext, 285 final DisconnectReason disconnectReason, 286 final String message) 287 { 288 // No action will be taken by default. 289 } 290 291 292 293 /** 294 * Logs a message about a certificate chain presented by a client. 295 * 296 * @param clientContext Information about the client that presented the 297 * certificate chain. 298 * @param certChain The certificate chain presented by the client. 299 * @param authDN The DN of the user as whom the client was 300 * automatically authenticated, or {@code null} if the 301 * client was not automatically authenticated. 302 */ 303 public void logClientCertificateChain(final ClientContext clientContext, 304 final Certificate[] certChain, 305 final String authDN) 306 { 307 // No action will be taken by default. 308 } 309 310 311 312 /** 313 * Logs a message about an abandon request received from a client. 314 * 315 * @param opContext The operation context for the abandon operation. 316 * @param request The abandon request that was received. 317 */ 318 public void logAbandonRequest(final OperationContext opContext, 319 final AbandonRequest request) 320 { 321 // No action will be taken by default. 322 } 323 324 325 326 /** 327 * Logs a message about an abandon request that will be forwarded to another 328 * server. 329 * 330 * @param opContext The operation context for the abandon operation. 331 * @param request The abandon request that was received. 332 * @param target Information about the server to which the request will 333 * be forwarded. 334 */ 335 public void logAbandonForward(final OperationContext opContext, 336 final AbandonRequest request, 337 final ForwardTarget target) 338 { 339 // No action will be taken by default. 340 } 341 342 343 344 /** 345 * Logs a message about the result of processing an abandon request. 346 * 347 * @param opContext The operation context for the abandon operation. 348 * @param request The abandon request that was received. 349 * @param result The result of processing the abandon request. 350 */ 351 public void logAbandonResult(final CompletedOperationContext opContext, 352 final AbandonRequest request, 353 final GenericResult result) 354 { 355 // No action will be taken by default. 356 } 357 358 359 360 /** 361 * Logs a message about an add request received from a client. 362 * 363 * @param opContext The operation context for the add operation. 364 * @param request The add request that was received. 365 */ 366 public void logAddRequest(final OperationContext opContext, 367 final AddRequest request) 368 { 369 // No action will be taken by default. 370 } 371 372 373 374 /** 375 * Logs a message about an add request that will be forwarded to another 376 * server. 377 * 378 * @param opContext The operation context for the add operation. 379 * @param request The add request that was received. 380 * @param target Information about the server to which the request will 381 * be forwarded. 382 */ 383 public void logAddForward(final OperationContext opContext, 384 final AddRequest request, 385 final ForwardTarget target) 386 { 387 // No action will be taken by default. 388 } 389 390 391 392 /** 393 * Logs a message about a failure encountered while attempting to forward an 394 * add request to another server. 395 * 396 * @param opContext The operation context for the add operation. 397 * @param request The add request that was received. 398 * @param target Information about the server to which the request was 399 * forwarded. 400 * @param failure The exception that was received when attempting to 401 * forward the request. 402 */ 403 public void logAddForwardFailure(final OperationContext opContext, 404 final AddRequest request, 405 final ForwardTarget target, 406 final LDAPException failure) 407 { 408 // No action will be taken by default. 409 } 410 411 412 413 /** 414 * Logs a message about the result of processing an add request. 415 * 416 * @param opContext The operation context for the add operation. 417 * @param request The add request that was received. 418 * @param result The result of processing the add request. 419 */ 420 public void logAddResponse(final CompletedOperationContext opContext, 421 final AddRequest request, 422 final AddResult result) 423 { 424 // No action will be taken by default. 425 } 426 427 428 429 /** 430 * Logs a message about a simple bind request received from a client. 431 * 432 * @param opContext The operation context for the bind operation. 433 * @param request The bind request that was received. 434 */ 435 public void logBindRequest(final OperationContext opContext, 436 final SimpleBindRequest request) 437 { 438 // No action will be taken by default. 439 } 440 441 442 443 /** 444 * Logs a message about a simple bind request that will be forwarded to 445 * another server. 446 * 447 * @param opContext The operation context for the bind operation. 448 * @param request The bind request that was received. 449 * @param target Information about the server to which the request will 450 * be forwarded. 451 */ 452 public void logBindForward(final OperationContext opContext, 453 final SimpleBindRequest request, 454 final ForwardTarget target) 455 { 456 // No action will be taken by default. 457 } 458 459 460 461 /** 462 * Logs a message about a failure encountered while attempting to forward a 463 * simple bind request to another server. 464 * 465 * @param opContext The operation context for the bind operation. 466 * @param request The bind request that was received. 467 * @param target Information about the server to which the request was 468 * forwarded. 469 * @param failure The exception that was received when attempting to 470 * forward the request. 471 */ 472 public void logBindForwardFailure(final OperationContext opContext, 473 final SimpleBindRequest request, 474 final ForwardTarget target, 475 final LDAPException failure) 476 { 477 // No action will be taken by default. 478 } 479 480 481 482 /** 483 * Logs a message about the result of processing a simple bind request. 484 * 485 * @param opContext The operation context for the bind operation. 486 * @param request The bind request that was received. 487 * @param result The result of processing the bind request. 488 */ 489 public void logBindResponse(final CompletedOperationContext opContext, 490 final SimpleBindRequest request, 491 final BindResult result) 492 { 493 // No action will be taken by default. 494 } 495 496 497 498 /** 499 * Logs a message about a SASL bind request received from a client. 500 * 501 * @param opContext The operation context for the bind operation. 502 * @param request The bind request that was received. 503 */ 504 public void logBindRequest(final OperationContext opContext, 505 final SASLBindRequest request) 506 { 507 // No action will be taken by default. 508 } 509 510 511 512 /** 513 * Logs a message about a SASL bind request that will be forwarded to 514 * another server. 515 * 516 * @param opContext The operation context for the bind operation. 517 * @param request The bind request that was received. 518 * @param target Information about the server to which the request will 519 * be forwarded. 520 */ 521 public void logBindForward(final OperationContext opContext, 522 final SASLBindRequest request, 523 final ForwardTarget target) 524 { 525 // No action will be taken by default. 526 } 527 528 529 530 /** 531 * Logs a message about a failure encountered while attempting to forward a 532 * SASL bind request to another server. 533 * 534 * @param opContext The operation context for the bind operation. 535 * @param request The bind request that was received. 536 * @param target Information about the server to which the request was 537 * forwarded. 538 * @param failure The exception that was received when attempting to 539 * forward the request. 540 */ 541 public void logBindForwardFailure(final OperationContext opContext, 542 final SASLBindRequest request, 543 final ForwardTarget target, 544 final LDAPException failure) 545 { 546 // No action will be taken by default. 547 } 548 549 550 551 /** 552 * Logs a message about the result of processing a SASL bind request. 553 * 554 * @param opContext The operation context for the bind operation. 555 * @param request The bind request that was received. 556 * @param result The result of processing the bind request. 557 */ 558 public void logBindResponse(final CompletedOperationContext opContext, 559 final SASLBindRequest request, 560 final BindResult result) 561 { 562 // No action will be taken by default. 563 } 564 565 566 567 /** 568 * Logs a message about a compare request received from a client. 569 * 570 * @param opContext The operation context for the compare operation. 571 * @param request The compare request that was received. 572 */ 573 public void logCompareRequest(final OperationContext opContext, 574 final CompareRequest request) 575 { 576 // No action will be taken by default. 577 } 578 579 580 581 /** 582 * Logs a message about a compare request that will be forwarded to another 583 * server. 584 * 585 * @param opContext The operation context for the compare operation. 586 * @param request The compare request that was received. 587 * @param target Information about the server to which the request will 588 * be forwarded. 589 */ 590 public void logCompareForward(final OperationContext opContext, 591 final CompareRequest request, 592 final ForwardTarget target) 593 { 594 // No action will be taken by default. 595 } 596 597 598 599 /** 600 * Logs a message about a failure encountered while attempting to forward a 601 * compare request to another server. 602 * 603 * @param opContext The operation context for the compare operation. 604 * @param request The compare request that was received. 605 * @param target Information about the server to which the request was 606 * forwarded. 607 * @param failure The exception that was received when attempting to 608 * forward the request. 609 */ 610 public void logCompareForwardFailure(final OperationContext opContext, 611 final CompareRequest request, 612 final ForwardTarget target, 613 final LDAPException failure) 614 { 615 // No action will be taken by default. 616 } 617 618 619 620 /** 621 * Logs a message about the result of processing a compare request. 622 * 623 * @param opContext The operation context for the compare operation. 624 * @param request The compare request that was received. 625 * @param result The result of processing the compare request. 626 */ 627 public void logCompareResponse(final CompletedOperationContext opContext, 628 final CompareRequest request, 629 final CompareResult result) 630 { 631 // No action will be taken by default. 632 } 633 634 635 636 /** 637 * Logs a message about a delete request received from a client. 638 * 639 * @param opContext The operation context for the delete operation. 640 * @param request The delete request that was received. 641 */ 642 public void logDeleteRequest(final OperationContext opContext, 643 final DeleteRequest request) 644 { 645 // No action will be taken by default. 646 } 647 648 649 650 /** 651 * Logs a message about a delete request that will be forwarded to another 652 * server. 653 * 654 * @param opContext The operation context for the delete operation. 655 * @param request The delete request that was received. 656 * @param target Information about the server to which the request will 657 * be forwarded. 658 */ 659 public void logDeleteForward(final OperationContext opContext, 660 final DeleteRequest request, 661 final ForwardTarget target) 662 { 663 // No action will be taken by default. 664 } 665 666 667 668 /** 669 * Logs a message about a failure encountered while attempting to forward a 670 * delete request to another server. 671 * 672 * @param opContext The operation context for the delete operation. 673 * @param request The delete request that was received. 674 * @param target Information about the server to which the request was 675 * forwarded. 676 * @param failure The exception that was received when attempting to 677 * forward the request. 678 */ 679 public void logDeleteForwardFailure(final OperationContext opContext, 680 final DeleteRequest request, 681 final ForwardTarget target, 682 final LDAPException failure) 683 { 684 // No action will be taken by default. 685 } 686 687 688 689 /** 690 * Logs a message about the result of processing a delete request. 691 * 692 * @param opContext The operation context for the delete operation. 693 * @param request The delete request that was received. 694 * @param result The result of processing the delete request. 695 */ 696 public void logDeleteResponse(final CompletedOperationContext opContext, 697 final DeleteRequest request, 698 final DeleteResult result) 699 { 700 // No action will be taken by default. 701 } 702 703 704 705 /** 706 * Logs a message about an extended request received from a client. 707 * 708 * @param opContext The operation context for the extended operation. 709 * @param request The extended request that was received. 710 */ 711 public void logExtendedRequest(final OperationContext opContext, 712 final ExtendedRequest request) 713 { 714 // No action will be taken by default. 715 } 716 717 718 719 /** 720 * Logs a message about an extended request that will be forwarded to another 721 * server. 722 * 723 * @param opContext The operation context for the extended operation. 724 * @param request The extended request that was received. 725 * @param target Information about the server to which the request will 726 * be forwarded. 727 */ 728 public void logExtendedForward(final OperationContext opContext, 729 final ExtendedRequest request, 730 final ForwardTarget target) 731 { 732 // No action will be taken by default. 733 } 734 735 736 737 /** 738 * Logs a message about a failure encountered while attempting to forward an 739 * extended request to another server. 740 * 741 * @param opContext The operation context for the extended operation. 742 * @param request The extended request that was received. 743 * @param target Information about the server to which the request was 744 * forwarded. 745 * @param failure The exception that was received when attempting to 746 * forward the request. 747 */ 748 public void logExtendedForwardFailure(final OperationContext opContext, 749 final ExtendedRequest request, 750 final ForwardTarget target, 751 final LDAPException failure) 752 { 753 // No action will be taken by default. 754 } 755 756 757 758 /** 759 * Logs a message about the result of processing an extended request. 760 * 761 * @param opContext The operation context for the extended operation. 762 * @param request The extended request that was received. 763 * @param result The result of processing the extended request. 764 */ 765 public void logExtendedResponse(final CompletedOperationContext opContext, 766 final ExtendedRequest request, 767 final ExtendedResult result) 768 { 769 // No action will be taken by default. 770 } 771 772 773 774 /** 775 * Logs a message about a modify request received from a client. 776 * 777 * @param opContext The operation context for the modify operation. 778 * @param request The modify request that was received. 779 */ 780 public void logModifyRequest(final OperationContext opContext, 781 final ModifyRequest request) 782 { 783 // No action will be taken by default. 784 } 785 786 787 788 /** 789 * Logs a message about a modify request that will be forwarded to another 790 * server. 791 * 792 * @param opContext The operation context for the modify operation. 793 * @param request The modify request that was received. 794 * @param target Information about the server to which the request will 795 * be forwarded. 796 */ 797 public void logModifyForward(final OperationContext opContext, 798 final ModifyRequest request, 799 final ForwardTarget target) 800 { 801 // No action will be taken by default. 802 } 803 804 805 806 /** 807 * Logs a message about a failure encountered while attempting to forward a 808 * modify request to another server. 809 * 810 * @param opContext The operation context for the modify operation. 811 * @param request The modify request that was received. 812 * @param target Information about the server to which the request was 813 * forwarded. 814 * @param failure The exception that was received when attempting to 815 * forward the request. 816 */ 817 public void logModifyForwardFailure(final OperationContext opContext, 818 final ModifyRequest request, 819 final ForwardTarget target, 820 final LDAPException failure) 821 { 822 // No action will be taken by default. 823 } 824 825 826 827 /** 828 * Logs a message about the result of processing a modify request. 829 * 830 * @param opContext The operation context for the modify operation. 831 * @param request The modify request that was received. 832 * @param result The result of processing the modify request. 833 */ 834 public void logModifyResponse(final CompletedOperationContext opContext, 835 final ModifyRequest request, 836 final ModifyResult result) 837 { 838 // No action will be taken by default. 839 } 840 841 842 843 /** 844 * Logs a message about a modify DN request received from a client. 845 * 846 * @param opContext The operation context for the modify DN operation. 847 * @param request The modify DN request that was received. 848 */ 849 public void logModifyDNRequest(final OperationContext opContext, 850 final ModifyDNRequest request) 851 { 852 // No action will be taken by default. 853 } 854 855 856 857 /** 858 * Logs a message about a modify DN request that will be forwarded to another 859 * server. 860 * 861 * @param opContext The operation context for the modify DN operation. 862 * @param request The modify DN request that was received. 863 * @param target Information about the server to which the request will 864 * be forwarded. 865 */ 866 public void logModifyDNForward(final OperationContext opContext, 867 final ModifyDNRequest request, 868 final ForwardTarget target) 869 { 870 // No action will be taken by default. 871 } 872 873 874 875 /** 876 * Logs a message about a failure encountered while attempting to forward a 877 * modify DN request to another server. 878 * 879 * @param opContext The operation context for the modify DN operation. 880 * @param request The modify DN request that was received. 881 * @param target Information about the server to which the request was 882 * forwarded. 883 * @param failure The exception that was received when attempting to 884 * forward the request. 885 */ 886 public void logModifyDNForwardFailure(final OperationContext opContext, 887 final ModifyDNRequest request, 888 final ForwardTarget target, 889 final LDAPException failure) 890 { 891 // No action will be taken by default. 892 } 893 894 895 896 /** 897 * Logs a message about the result of processing a modify DN request. 898 * 899 * @param opContext The operation context for the modify DN operation. 900 * @param request The modify DN request that was received. 901 * @param result The result of processing the modify DN request. 902 */ 903 public void logModifyDNResponse(final CompletedOperationContext opContext, 904 final ModifyDNRequest request, 905 final ModifyDNResult result) 906 { 907 // No action will be taken by default. 908 } 909 910 911 912 /** 913 * Logs a message about a search request received from a client. 914 * 915 * @param opContext The operation context for the search operation. 916 * @param request The search request that was received. 917 */ 918 public void logSearchRequest(final OperationContext opContext, 919 final SearchRequest request) 920 { 921 // No action will be taken by default. 922 } 923 924 925 926 /** 927 * Logs a message about a search request that will be forwarded to another 928 * server. 929 * 930 * @param opContext The operation context for the search operation. 931 * @param request The search request that was received. 932 * @param target Information about the server to which the request will 933 * be forwarded. 934 */ 935 public void logSearchForward(final OperationContext opContext, 936 final SearchRequest request, 937 final ForwardTarget target) 938 { 939 // No action will be taken by default. 940 } 941 942 943 944 /** 945 * Logs a message about a failure encountered while attempting to forward a 946 * search request to another server. 947 * 948 * @param opContext The operation context for the search operation. 949 * @param request The search request that was received. 950 * @param target Information about the server to which the request was 951 * forwarded. 952 * @param failure The exception that was received when attempting to 953 * forward the request. 954 */ 955 public void logSearchForwardFailure(final OperationContext opContext, 956 final SearchRequest request, 957 final ForwardTarget target, 958 final LDAPException failure) 959 { 960 // No action will be taken by default. 961 } 962 963 964 965 /** 966 * Logs a message about a search result entry that was returned to the client. 967 * 968 * @param opContext The operation context for the search operation. 969 * @param request The search request that was received. 970 * @param entry The entry that was returned. 971 * @param controls The set of controls included with the entry, or an empty 972 * list if there were none. 973 */ 974 public void logSearchResultEntry(final OperationContext opContext, 975 final SearchRequest request, 976 final Entry entry, 977 final List<Control> controls) 978 { 979 // No action will be taken by default. 980 } 981 982 983 984 /** 985 * Logs a message about a search result reference that was returned to the 986 * client. 987 * 988 * @param opContext The operation context for the search operation. 989 * @param request The search request that was received. 990 * @param referralURLs The referral URLs for the reference that was 991 * returned. 992 * @param controls The set of controls included with the reference, or 993 * an empty list if there were none. 994 */ 995 public void logSearchResultReference(final OperationContext opContext, 996 final SearchRequest request, 997 final List<String> referralURLs, 998 final List<Control> controls) 999 { 1000 // No action will be taken by default. 1001 } 1002 1003 1004 1005 /** 1006 * Logs a message about the result of processing a search request. 1007 * 1008 * @param opContext The operation context for the search operation. 1009 * @param request The search request that was received. 1010 * @param result The result of processing the search request. 1011 */ 1012 public void logSearchResultDone( 1013 final CompletedSearchOperationContext opContext, 1014 final SearchRequest request, final SearchResult result) 1015 { 1016 // No action will be taken by default. 1017 } 1018 1019 1020 1021 /** 1022 * Logs a message about an unbind request received from a client. 1023 * 1024 * @param opContext The operation context for the unbind operation. 1025 * @param request The unbind request that was received. 1026 */ 1027 public void logUnbindRequest(final OperationContext opContext, 1028 final UnbindRequest request) 1029 { 1030 // No action will be taken by default. 1031 } 1032 1033 1034 1035 /** 1036 * Logs a message about an intermediate response that was returned to the 1037 * client. 1038 * 1039 * @param opContext The operation context for the associated 1040 * operation. 1041 * @param intermediateResponse The intermediate response that was returned. 1042 */ 1043 public void logIntermediateResponse(final OperationContext opContext, 1044 final IntermediateResponse intermediateResponse) 1045 { 1046 // No action will be taken by default. 1047 } 1048 1049 1050 1051 /** 1052 * {@inheritDoc} 1053 */ 1054 public Map<List<String>,String> getExamplesArgumentSets() 1055 { 1056 return Collections.emptyMap(); 1057 } 1058 }