001    /*
002     * Copyright 2009-2012 UnboundID Corp.
003     * All Rights Reserved.
004     */
005    /*
006     * Copyright (C) 2009-2012 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.protocol;
022    
023    
024    
025    import java.util.List;
026    
027    import com.unboundid.asn1.ASN1StreamReader;
028    import com.unboundid.ldap.sdk.LDAPException;
029    import com.unboundid.util.NotMutable;
030    import com.unboundid.util.InternalUseOnly;
031    import com.unboundid.util.ThreadSafety;
032    import com.unboundid.util.ThreadSafetyLevel;
033    
034    
035    
036    /**
037     * This class provides an implementation of a compare response protocol op.
038     */
039    @InternalUseOnly()
040    @NotMutable()
041    @ThreadSafety(level=ThreadSafetyLevel.COMPLETELY_THREADSAFE)
042    public final class CompareResponseProtocolOp
043           extends GenericResponseProtocolOp
044    {
045      /**
046       * The serial version UID for this serializable class.
047       */
048      private static final long serialVersionUID = 3237778285010810669L;
049    
050    
051    
052      /**
053       * Creates a new instance of this compare response protocol op with the
054       * provided information.
055       *
056       * @param  resultCode         The result code for this response.
057       * @param  matchedDN          The matched DN for this response, if available.
058       * @param  diagnosticMessage  The diagnostic message for this response, if
059       *                            any.
060       * @param  referralURLs       The list of referral URLs for this response, if
061       *                            any.
062       */
063      public CompareResponseProtocolOp(final int resultCode, final String matchedDN,
064                                     final String diagnosticMessage,
065                                     final List<String> referralURLs)
066      {
067        super(LDAPMessage.PROTOCOL_OP_TYPE_COMPARE_RESPONSE, resultCode, matchedDN,
068              diagnosticMessage, referralURLs);
069      }
070    
071    
072    
073      /**
074       * Creates a new compare response protocol op read from the provided ASN.1
075       * stream reader.
076       *
077       * @param  reader  The ASN.1 stream reader from which to read the compare
078       *                 response protocol op.
079       *
080       * @throws  LDAPException  If a problem occurs while reading or parsing the
081       *                         compare response.
082       */
083      CompareResponseProtocolOp(final ASN1StreamReader reader)
084           throws LDAPException
085      {
086        super(reader);
087      }
088    }