com.sun.mail.iap

## Class ProtocolException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - com.sun.mail.iap.ProtocolException

- All Implemented Interfaces:
    Serializable
  Direct Known Subclasses:
    BadCommandException, CommandFailedException, ConnectionException, IMAPReferralException, LiteralException, ParsingException

      public class ProtocolException
      extends Exception

  Author:
    John Mani
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Response` | `response`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ProtocolException()` Constructs a ProtocolException with no detail message.
    `ProtocolException(Response r)` Constructs a ProtocolException with the specified Response object.
    `ProtocolException(String message)` Constructs a ProtocolException with the specified detail message.
    `ProtocolException(String message, Throwable cause)` Constructs a ProtocolException with the specified detail message and cause.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Response` | `getResponse()` Return the offending Response object.

    - ### Methods inherited from class java.lang.Throwable

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### response

          protected transient Response response

  - ### Constructor Detail

    - #### ProtocolException

          public ProtocolException()

      Constructs a ProtocolException with no detail message.

    - #### ProtocolException

          public ProtocolException(String message)

      Constructs a ProtocolException with the specified detail message.
      Parameters:
        `message` - the detail message

    - #### ProtocolException

          public ProtocolException(String message,
                           Throwable cause)

      Constructs a ProtocolException with the specified detail message and cause.
      Parameters:
        `message` - the detail message
        `cause` - the cause

    - #### ProtocolException

          public ProtocolException(Response r)

      Constructs a ProtocolException with the specified Response object.
      Parameters:
        `r` - the Response

  - ### Method Detail

    - #### getResponse

          public Response getResponse()

      Return the offending Response object.
      Returns:
        the Response object

Copyright © 2016 Oracle. All rights reserved.