001/*
002 * Copyright 2022-2024 Ping Identity Corporation
003 * All Rights Reserved.
004 */
005/*
006 * Copyright 2022-2024 Ping Identity Corporation
007 *
008 * Licensed under the Apache License, Version 2.0 (the "License");
009 * you may not use this file except in compliance with the License.
010 * You may obtain a copy of the License at
011 *
012 *    http://www.apache.org/licenses/LICENSE-2.0
013 *
014 * Unless required by applicable law or agreed to in writing, software
015 * distributed under the License is distributed on an "AS IS" BASIS,
016 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
017 * See the License for the specific language governing permissions and
018 * limitations under the License.
019 */
020/*
021 * Copyright (C) 2022-2024 Ping Identity Corporation
022 *
023 * This program is free software; you can redistribute it and/or modify
024 * it under the terms of the GNU General Public License (GPLv2 only)
025 * or the terms of the GNU Lesser General Public License (LGPLv2.1 only)
026 * as published by the Free Software Foundation.
027 *
028 * This program is distributed in the hope that it will be useful,
029 * but WITHOUT ANY WARRANTY; without even the implied warranty of
030 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
031 * GNU General Public License for more details.
032 *
033 * You should have received a copy of the GNU General Public License
034 * along with this program; if not, see <http://www.gnu.org/licenses>.
035 */
036package com.unboundid.ldap.sdk.unboundidds.logs.v2;
037
038
039
040import java.util.Set;
041
042import com.unboundid.ldap.sdk.unboundidds.logs.AccessLogOperationType;
043import com.unboundid.util.NotExtensible;
044import com.unboundid.util.NotNull;
045import com.unboundid.util.Nullable;
046import com.unboundid.util.ThreadSafety;
047import com.unboundid.util.ThreadSafetyLevel;
048
049
050
051/**
052 * This class provides a data structure that holds information about an
053 * operation request access log message.
054 * <BR>
055 * <BLOCKQUOTE>
056 *   <B>NOTE:</B>  This class, and other classes within the
057 *   {@code com.unboundid.ldap.sdk.unboundidds} package structure, are only
058 *   supported for use against Ping Identity, UnboundID, and
059 *   Nokia/Alcatel-Lucent 8661 server products.  These classes provide support
060 *   for proprietary functionality or for external specifications that are not
061 *   considered stable or mature enough to be guaranteed to work in an
062 *   interoperable way with other types of LDAP servers.
063 * </BLOCKQUOTE>
064 */
065@NotExtensible()
066@ThreadSafety(level=ThreadSafetyLevel.INTERFACE_THREADSAFE)
067public interface OperationRequestAccessLogMessage
068       extends AccessLogMessage
069{
070  /**
071   * Retrieves the operation type for the associated operation.
072   *
073   * @return  The operation type for this access log message.
074   */
075  @NotNull()
076  AccessLogOperationType getOperationType();
077
078
079
080  /**
081   * Retrieves the operation ID for the associated operation.
082   *
083   * @return  The operation ID for the associated operation, or {@code null} if
084   *          it is not included in the log message.
085   */
086  @Nullable()
087  Long getOperationID();
088
089
090
091  /**
092   * Retrieves the message ID for the associated operation.
093   *
094   * @return  The message ID for the associated operation, or {@code null} if
095   *          it is not included in the log message.
096   */
097  @Nullable()
098  Integer getMessageID();
099
100
101
102  /**
103   * Retrieves the origin of the associated operation.  If present, it may be
104   * "synchronization" if the operation is replicated, or "internal" if it is an
105   * internal operation.
106   *
107   * @return  The origin for the associated operation, or {@code null} if it is
108   *          not included in the log message.
109   */
110  @Nullable()
111  String getOrigin();
112
113
114
115  /**
116   * Retrieves the connection ID for the connection that triggered the
117   * associated operation.  This is generally used for internal operations that
118   * are processed as a direct result of an externally-requested operation.
119   *
120   * @return  The connection ID for the connection that triggered the associated
121   *          operation, or {@code null} if it is not included in the log
122   *          message.
123   */
124  @Nullable()
125  Long getTriggeredByConnectionID();
126
127
128
129  /**
130   * Retrieves the operation ID for the operation that triggered the associated
131   * operation.  This is generally used for internal operations that are
132   * processed as a direct result of an externally-requested operation.
133   *
134   * @return  The operation ID for the operation that triggered the associated
135   *          operation, or {@code null} if it is not included in the log
136   *          message.
137   */
138  @Nullable()
139  Long getTriggeredByOperationID();
140
141
142
143  /**
144   * Retrieves the DN of the user that requested the operation.
145   *
146   * @return  The DN of the user that requested the operation, or {@code null}
147   *          if it is not included in the log message.
148   */
149  @Nullable()
150  String getRequesterDN();
151
152
153
154  /**
155   * Retrieves the IP address of the client that requested the operation.
156   *
157   * @return  The IP address of the client that requested the operation, or
158   *          {@code null} if it is not included in the log message.
159   */
160  @Nullable()
161  String getRequesterIPAddress();
162
163
164
165  /**
166   * Retrieves the OIDs of any request controls contained in the log message.
167   *
168   * @return  The OIDs of any request controls contained in the log message, or
169   *          an empty list if it is not included in the log message.
170   */
171  @NotNull()
172  Set<String> getRequestControlOIDs();
173
174
175
176  /**
177   * Indicates whether the operation was processed using a worker thread from
178   * the dedicated administrative session thread pool.
179   *
180   * @return  {@code true} if the operation was processed using a worker thread
181   *          from the dedicated administrative session thread pool,
182   *          {@code false} if it was not, or {@code null} if that information
183   *          was not included in the log message.
184   */
185  @Nullable()
186  Boolean getUsingAdminSessionWorkerThread();
187
188
189
190  /**
191   * Retrieves a message from an associated administrative operation request
192   * control.
193   *
194   * @return  A message from an associated administrative operation request
195   *          control, or {@code null} if it is not included in teh log message.
196   */
197  @Nullable()
198  String getAdministrativeOperationMessage();
199}