Class IndicationException

All Implemented Interfaces:
SWIG_DSAPIConstants, Serializable
Direct Known Subclasses:
IncompleteReadException, NoSuchEntryException, ReferralException, UnavailableCriticalExtensionException

public class IndicationException extends DSAPIException
Represents an error that is derived from a DS_Indication in the underlying DSAPI code. In addition to the nativeErrorCode common to all DSAPIExceptions, an IndicationExeception contains two other fields which describe the error in more detail: errorType and errorValue. These fields are maintained as numeric values, which will be set to values defined in the SWIG_DSAPI class, but convenience methods are available to return String representations of them.
Author:
nh
See Also:
  • Field Details

  • Constructor Details

    • IndicationException

      protected IndicationException(Indication ind, int nativeErrorCode)
      This constructor is used by JNI and subclasses to create a new object that refers to an Indication object.
      Parameters:
      ind - the Indication which provoked the exception
      nativeErrorCode - the error status returned by the DSAPI layer (which may be zero)
    • IndicationException

      protected IndicationException(String message)
      Constructor provided to let subclasses instantiate themselves without needing a native Indication object
      Parameters:
      message - information about the reason for the exception
  • Method Details

    • getErrorType

      public int getErrorType()
      Determine the error type associated with this IndicationException.
      Returns:
      Returns the errorType.
    • getErrorValue

      public int getErrorValue()
      Determine the error value associated with this IndicationException.
      Returns:
      Returns the errorValue.
    • getIndication

      public Indication getIndication()
      Returns the Indication object that is associated with this exception, if one exists. There will only be an Indication object associated with an IndicationException if the exception was thrown by native code.
      Returns:
      an Indication object associated with this exception, or null if none exists.
    • getOperation

      public String getOperation()
      Returns a String containing information about the operation which resulted in the exception being thrown.
      Returns:
      a String such as "Search", "Modify" etc.
    • getDN

      public DN getDN()
      Return the DN which was involved in the failing operation (if known)
      Returns:
      a DN - which may be null if none is known.
    • toString

      public String toString()
      Returns a String representation of this exception, containing information about the failing operation, and DN if available.
      Overrides:
      toString in class Throwable
      Returns:
      a user-friendly String representation of this exception.
    • getMessage

      public String getMessage()
      Returns a String containing information about the operation which caused the exception, the DN if available, and details of the indication error type and value.
      Overrides:
      getMessage in class Throwable
      Returns:
      a String containing details about the exception
    • getErrorTypeString

      public static String getErrorTypeString(int errorType)
      Return a user-friendly String representation of the errorType for this exception.
      Parameters:
      errorType - a numeric error type
      Returns:
      a String representation of errorType
      See Also:
    • getErrorValueString

      public static String getErrorValueString(int errorValue)
      Return a user-friendly String representation of the errorValue for this exception.
      Parameters:
      errorValue - a numeric error value
      Returns:
      a String representation of errorValue
      See Also: