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