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 extended 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 Alcatel-Lucent 8661 041 * server products. These classes provide support for proprietary 042 * functionality or for external specifications that are not considered stable 043 * or mature enough to be guaranteed to work in an interoperable way with 044 * other types of LDAP servers. 045 * </BLOCKQUOTE> 046 */ 047@NotExtensible() 048@NotMutable() 049@ThreadSafety(level=ThreadSafetyLevel.COMPLETELY_THREADSAFE) 050public class ExtendedRequestAccessLogMessage 051 extends OperationRequestAccessLogMessage 052{ 053 /** 054 * The serial version UID for this serializable class. 055 */ 056 private static final long serialVersionUID = -4278715896574532061L; 057 058 059 060 // The OID for the extended request. 061 private final String requestOID; 062 063 064 065 /** 066 * Creates a new extended request access log message from the provided message 067 * string. 068 * 069 * @param s The string to be parsed as an extended 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 ExtendedRequestAccessLogMessage(final String s) 076 throws LogException 077 { 078 this(new LogMessage(s)); 079 } 080 081 082 083 /** 084 * Creates a new extended request access log message from the provided log 085 * message. 086 * 087 * @param m The log message to be parsed as an extended request access log 088 * message. 089 */ 090 public ExtendedRequestAccessLogMessage(final LogMessage m) 091 { 092 super(m); 093 094 requestOID = getNamedValue("requestOID"); 095 } 096 097 098 099 /** 100 * Retrieves the OID of the extended request. 101 * 102 * @return The OID of the extended request, or {@code null} if it is not 103 * included in the log message. 104 */ 105 public final String getRequestOID() 106 { 107 return requestOID; 108 } 109 110 111 112 /** 113 * {@inheritDoc} 114 */ 115 @Override() 116 public final AccessLogOperationType getOperationType() 117 { 118 return AccessLogOperationType.EXTENDED; 119 } 120}