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.json;
037
038
039
040import java.util.List;
041import java.util.Set;
042
043import com.unboundid.ldap.sdk.ResultCode;
044import com.unboundid.ldap.sdk.unboundidds.logs.AccessLogMessageType;
045import com.unboundid.ldap.sdk.unboundidds.logs.LogException;
046import com.unboundid.ldap.sdk.unboundidds.logs.v2.AbandonResultAccessLogMessage;
047import com.unboundid.util.NotMutable;
048import com.unboundid.util.NotNull;
049import com.unboundid.util.Nullable;
050import com.unboundid.util.ThreadSafety;
051import com.unboundid.util.ThreadSafetyLevel;
052import com.unboundid.util.json.JSONObject;
053
054
055
056/**
057 * This class provides a data structure that holds information about a
058 * JSON-formatted abandon result access log message.
059 * <BR>
060 * <BLOCKQUOTE>
061 *   <B>NOTE:</B>  This class, and other classes within the
062 *   {@code com.unboundid.ldap.sdk.unboundidds} package structure, are only
063 *   supported for use against Ping Identity, UnboundID, and
064 *   Nokia/Alcatel-Lucent 8661 server products.  These classes provide support
065 *   for proprietary functionality or for external specifications that are not
066 *   considered stable or mature enough to be guaranteed to work in an
067 *   interoperable way with other types of LDAP servers.
068 * </BLOCKQUOTE>
069 */
070@NotMutable()
071@ThreadSafety(level=ThreadSafetyLevel.COMPLETELY_THREADSAFE)
072public final class JSONAbandonResultAccessLogMessage
073       extends JSONAbandonRequestAccessLogMessage
074       implements AbandonResultAccessLogMessage
075{
076  /**
077   * The serial version UID for this serializable class.
078   */
079  private static final long serialVersionUID = -4910020668959291456L;
080
081
082
083  // The forward helper for this access log message.
084  @NotNull private final JSONForwardAccessLogMessageHelper forwardHelper;
085
086  // The result helper for this access log message.
087  @NotNull private final JSONResultAccessLogMessageHelper resultHelper;
088
089
090
091  /**
092   * Creates a new JSON abandon result access log message from the provided JSON
093   * object.
094   *
095   * @param  jsonObject  The JSON object that contains an encoded representation
096   *                     of this log message.  It must not be {@code null}.
097   *
098   * @throws  LogException  If the provided JSON object cannot be parsed as a
099   *                        valid log message.
100   */
101  public JSONAbandonResultAccessLogMessage(@NotNull final JSONObject jsonObject)
102         throws LogException
103  {
104    super(jsonObject);
105
106    resultHelper = new JSONResultAccessLogMessageHelper(this);
107    forwardHelper = new JSONForwardAccessLogMessageHelper(this);
108  }
109
110
111
112  /**
113   * {@inheritDoc}
114   */
115  @Override()
116  @NotNull()
117  public AccessLogMessageType getMessageType()
118  {
119    return AccessLogMessageType.RESULT;
120  }
121
122
123
124  /**
125   * {@inheritDoc}
126   */
127  @Override()
128  @Nullable()
129  public ResultCode getResultCode()
130  {
131    return resultHelper.getResultCode();
132  }
133
134
135
136  /**
137   * {@inheritDoc}
138   */
139  @Override()
140  @Nullable()
141  public String getDiagnosticMessage()
142  {
143    return resultHelper.getDiagnosticMessage();
144  }
145
146
147
148  /**
149   * {@inheritDoc}
150   */
151  @Override()
152  @Nullable()
153  public String getAdditionalInformation()
154  {
155    return resultHelper.getAdditionalInformation();
156  }
157
158
159
160  /**
161   * {@inheritDoc}
162   */
163  @Override()
164  @Nullable()
165  public String getMatchedDN()
166  {
167    return resultHelper.getMatchedDN();
168  }
169
170
171
172  /**
173   * {@inheritDoc}
174   */
175  @Override()
176  @NotNull()
177  public List<String> getReferralURLs()
178  {
179    return resultHelper.getReferralURLs();
180  }
181
182
183
184  /**
185   * {@inheritDoc}
186   */
187  @Override()
188  @Nullable()
189  public Double getProcessingTimeMillis()
190  {
191    return resultHelper.getProcessingTimeMillis();
192  }
193
194
195
196  /**
197   * {@inheritDoc}
198   */
199  @Override()
200  @Nullable()
201  public Double getWorkQueueWaitTimeMillis()
202  {
203    return resultHelper.getWorkQueueWaitTimeMillis();
204  }
205
206
207
208  /**
209   * {@inheritDoc}
210   */
211  @Override()
212  @NotNull()
213  public Set<String> getResponseControlOIDs()
214  {
215    return resultHelper.getResponseControlOIDs();
216  }
217
218
219
220  /**
221   * {@inheritDoc}
222   */
223  @Override()
224  @Nullable()
225  public Long getIntermediateResponsesReturned()
226  {
227    return resultHelper.getIntermediateResponsesReturned();
228  }
229
230
231
232  /**
233   * {@inheritDoc}
234   */
235  @Override()
236  @NotNull()
237  public List<String> getServersAccessed()
238  {
239    return resultHelper.getServersAccessed();
240  }
241
242
243
244  /**
245   * {@inheritDoc}
246   */
247  @Override()
248  @Nullable()
249  public Boolean getUncachedDataAccessed()
250  {
251    return resultHelper.getUncachedDataAccessed();
252  }
253
254
255
256  /**
257   * {@inheritDoc}
258   */
259  @Override()
260  @NotNull()
261  public Set<String> getUsedPrivileges()
262  {
263    return resultHelper.getUsedPrivileges();
264  }
265
266
267
268  /**
269   * {@inheritDoc}
270   */
271  @Override()
272  @NotNull()
273  public Set<String> getPreAuthorizationUsedPrivileges()
274  {
275    return resultHelper.getPreAuthorizationUsedPrivileges();
276  }
277
278
279
280  /**
281   * {@inheritDoc}
282   */
283  @Override()
284  @NotNull()
285  public Set<String> getMissingPrivileges()
286  {
287    return resultHelper.getMissingPrivileges();
288  }
289
290
291
292  /**
293   * {@inheritDoc}
294   */
295  @Override()
296  @Nullable()
297  public String getTargetHost()
298  {
299    return forwardHelper.getTargetHost();
300  }
301
302
303
304  /**
305   * {@inheritDoc}
306   */
307  @Override()
308  @Nullable()
309  public Integer getTargetPort()
310  {
311    return forwardHelper.getTargetPort();
312  }
313
314
315
316  /**
317   * {@inheritDoc}
318   */
319  @Override()
320  @Nullable()
321  public String getTargetProtocol()
322  {
323    return forwardHelper.getTargetProtocol();
324  }
325}