001/*
002 * Copyright 2009-2018 Ping Identity Corporation
003 * All Rights Reserved.
004 */
005/*
006 * Copyright (C) 2015-2018 Ping Identity Corporation
007 *
008 * This program is free software; you can redistribute it and/or modify
009 * it under the terms of the GNU General Public License (GPLv2 only)
010 * or the terms of the GNU Lesser General Public License (LGPLv2.1 only)
011 * as published by the Free Software Foundation.
012 *
013 * This program is distributed in the hope that it will be useful,
014 * but WITHOUT ANY WARRANTY; without even the implied warranty of
015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
016 * GNU General Public License for more details.
017 *
018 * You should have received a copy of the GNU General Public License
019 * along with this program; if not, see <http://www.gnu.org/licenses>.
020 */
021package com.unboundid.ldap.sdk.unboundidds.logs;
022
023
024
025import com.unboundid.util.NotExtensible;
026import com.unboundid.util.NotMutable;
027import com.unboundid.util.ThreadSafety;
028import com.unboundid.util.ThreadSafetyLevel;
029
030
031
032/**
033 * This class provides a data structure that holds information about a log
034 * message that may appear in the Directory Server access log about an abandon
035 * request received from a client.
036 * <BR>
037 * <BLOCKQUOTE>
038 *   <B>NOTE:</B>  This class, and other classes within the
039 *   {@code com.unboundid.ldap.sdk.unboundidds} package structure, are only
040 *   supported for use against Ping Identity, UnboundID, and
041 *   Nokia/Alcatel-Lucent 8661 server products.  These classes provide support
042 *   for proprietary functionality or for external specifications that are not
043 *   considered stable or mature enough to be guaranteed to work in an
044 *   interoperable way with other types of LDAP servers.
045 * </BLOCKQUOTE>
046 */
047@NotExtensible()
048@NotMutable()
049@ThreadSafety(level=ThreadSafetyLevel.COMPLETELY_THREADSAFE)
050public class AbandonRequestAccessLogMessage
051       extends OperationRequestAccessLogMessage
052{
053  /**
054   * The serial version UID for this serializable class.
055   */
056  private static final long serialVersionUID = 4681707907192987394L;
057
058
059
060  // The message ID of the operation to abandon.
061  private final Integer idToAbandon;
062
063
064
065  /**
066   * Creates a new abandon request access log message from the provided message
067   * string.
068   *
069   * @param  s  The string to be parsed as an abandon request access log
070   *            message.
071   *
072   * @throws  LogException  If the provided string cannot be parsed as a valid
073   *                        log message.
074   */
075  public AbandonRequestAccessLogMessage(final String s)
076         throws LogException
077  {
078    this(new LogMessage(s));
079  }
080
081
082
083  /**
084   * Creates a new abandon request access log message from the provided log
085   * message.
086   *
087   * @param  m  The log message to be parsed as an abandon request access log
088   *            message.
089   */
090  public AbandonRequestAccessLogMessage(final LogMessage m)
091  {
092    super(m);
093
094    idToAbandon = getNamedValueAsInteger("idToAbandon");
095  }
096
097
098
099  /**
100   * Retrieves the message ID of the operation that should be abandoned.
101   *
102   * @return  The message ID of the operation that should be abandoned, or
103   *          {@code null} if it is not included in the log message.
104   */
105  public final Integer getMessageIDToAbandon()
106  {
107    return idToAbandon;
108  }
109
110
111
112  /**
113   * {@inheritDoc}
114   */
115  @Override()
116  public final AccessLogOperationType getOperationType()
117  {
118    return AccessLogOperationType.ABANDON;
119  }
120}