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