001 /*
002 * Copyright 2009-2015 UnboundID Corp.
003 * All Rights Reserved.
004 */
005 /*
006 * Copyright (C) 2015 UnboundID Corp.
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 */
021 package com.unboundid.ldap.sdk.unboundidds.logs;
022
023
024
025 import com.unboundid.util.NotExtensible;
026 import com.unboundid.util.NotMutable;
027 import com.unboundid.util.ThreadSafety;
028 import com.unboundid.util.ThreadSafetyLevel;
029
030
031
032 /**
033 * <BLOCKQUOTE>
034 * <B>NOTE:</B> This class is part of the Commercial Edition of the UnboundID
035 * LDAP SDK for Java. It is not available for use in applications that
036 * include only the Standard Edition of the LDAP SDK, and is not supported for
037 * use in conjunction with non-UnboundID products.
038 * </BLOCKQUOTE>
039 * This class provides a data structure that holds information about a log
040 * message that may appear in the Directory Server access log about an abandon
041 * request received from a client.
042 */
043 @NotExtensible()
044 @NotMutable()
045 @ThreadSafety(level=ThreadSafetyLevel.COMPLETELY_THREADSAFE)
046 public class AbandonRequestAccessLogMessage
047 extends OperationRequestAccessLogMessage
048 {
049 /**
050 * The serial version UID for this serializable class.
051 */
052 private static final long serialVersionUID = 4681707907192987394L;
053
054
055
056 // The message ID of the operation to abandon.
057 private final Integer idToAbandon;
058
059
060
061 /**
062 * Creates a new abandon request access log message from the provided message
063 * string.
064 *
065 * @param s The string to be parsed as an abandon request access log
066 * message.
067 *
068 * @throws LogException If the provided string cannot be parsed as a valid
069 * log message.
070 */
071 public AbandonRequestAccessLogMessage(final String s)
072 throws LogException
073 {
074 this(new LogMessage(s));
075 }
076
077
078
079 /**
080 * Creates a new abandon request access log message from the provided log
081 * message.
082 *
083 * @param m The log message to be parsed as an abandon request access log
084 * message.
085 */
086 public AbandonRequestAccessLogMessage(final LogMessage m)
087 {
088 super(m);
089
090 idToAbandon = getNamedValueAsInteger("idToAbandon");
091 }
092
093
094
095 /**
096 * Retrieves the message ID of the operation that should be abandoned.
097 *
098 * @return The message ID of the operation that should be abandoned, or
099 * {@code null} if it is not included in the log message.
100 */
101 public final Integer getMessageIDToAbandon()
102 {
103 return idToAbandon;
104 }
105
106
107
108 /**
109 * {@inheritDoc}
110 */
111 @Override()
112 public final AccessLogOperationType getOperationType()
113 {
114 return AccessLogOperationType.ABANDON;
115 }
116 }