001    /*
002     * Copyright 2012-2016 UnboundID Corp.
003     * All Rights Reserved.
004     */
005    /*
006     * Copyright (C) 2012-2016 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;
022    
023    
024    
025    import com.unboundid.asn1.ASN1OctetString;
026    
027    
028    
029    /**
030     * This class defines an exception that can be thrown if the server sends a bind
031     * response with a result code of {@code ResultCode#SASL_BIND_IN_PROGRESS},
032     * which indicates that SASL bind processing has not yet completed.  This is not
033     * an error, but neither does it indicate that bind processing has completed.
034     * This exception provides access to the bind result and the server SASL
035     * credentials that it may optionally contain so that this information may be
036     * used to continue bind processing.
037     */
038    public final class SASLBindInProgressException
039           extends LDAPBindException
040    {
041      /**
042       * The serial version UID for this serializable class.
043       */
044      private static final long serialVersionUID = -2483660992461709721L;
045    
046    
047    
048      /**
049       * Creates a new SASL bind in progress exception from the provided bind
050       * result.
051       *
052       * @param  bindResult  The bind result to use to create this exception.
053       */
054      SASLBindInProgressException(final BindResult bindResult)
055      {
056        super(bindResult);
057      }
058    
059    
060    
061      /**
062       * {@inheritDoc}
063       */
064      @Override()
065      public BindResult getBindResult()
066      {
067        return super.getBindResult();
068      }
069    
070    
071    
072      /**
073       * {@inheritDoc}
074       */
075      @Override()
076      public ASN1OctetString getServerSASLCredentials()
077      {
078        return super.getServerSASLCredentials();
079      }
080    }