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