com.verisign.epp.util

## Class InvalidateSessionException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - com.verisign.epp.util.InvalidateSessionException

- All Implemented Interfaces:
    java.io.Serializable

      public class InvalidateSessionException
      extends java.lang.Exception

  Simple `Exception` that is thrown by the utility `TestUtil.handleException(EPPSession, Exception)` method to indicate that the session should be invalidated by the calling method and further use of the session should be terminated.
  See Also:
    `TestUtil.handleException(EPPSession, Exception)`, Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `InvalidateSessionException()` Default constructor
    `InvalidateSessionException(EPPSession aSession)` Constructor that takes the session that should be invalidated.
    `InvalidateSessionException(EPPSession aSession, java.lang.String aMessage)` Create with text message describing the exception along with the session that should be invalidated.
    `InvalidateSessionException(EPPSession aSession, java.lang.String aMessage, java.lang.Throwable aCause)` Create with text message describing the exception and an associated cause `Throwable` and the session that should be invalidated.
    `InvalidateSessionException(EPPSession aSession, java.lang.Throwable cause)` Create with an associated cause `Throwable` and the session that should be invalidated.
    `InvalidateSessionException(java.lang.String aMessage)` Create with text message describing the exception.
    `InvalidateSessionException(java.lang.String aMessage, java.lang.Throwable aCause)` Create with text message describing the exception and an associated cause `Throwable`.
    `InvalidateSessionException(java.lang.Throwable aCause)` Create with an associated cause `Throwable`.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `EPPSession` | `getSession()` Gets the session that should be invalidated.
    `boolean` | `hasSession()` Has the session to be invalidated been set?
    `void` | `setSession(EPPSession aSession)` Sets the session that should be invalidated.

    - ### 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`

- - ### Constructor Detail

    - #### InvalidateSessionException

          public InvalidateSessionException()

      Default constructor

    - #### InvalidateSessionException

          public InvalidateSessionException(java.lang.String aMessage)

      Create with text message describing the exception.
      Parameters:
        `aMessage` - description message

    - #### InvalidateSessionException

          public InvalidateSessionException(java.lang.String aMessage,
                                            java.lang.Throwable aCause)

      Create with text message describing the exception and an associated cause `Throwable`.
      Parameters:
        `aMessage` - description message
        `aCause` - `Throwable` that caused the exception

    - #### InvalidateSessionException

          public InvalidateSessionException(java.lang.Throwable aCause)

      Create with an associated cause `Throwable`.
      Parameters:
        `aCause` - `Throwable` that caused the exception

    - #### InvalidateSessionException

          public InvalidateSessionException(EPPSession aSession)

      Constructor that takes the session that should be invalidated.
      Parameters:
        `aSession` - Session that should be invalidated

    - #### InvalidateSessionException

          public InvalidateSessionException(EPPSession aSession,
                                            java.lang.String aMessage)

      Create with text message describing the exception along with the session that should be invalidated.
      Parameters:
        `aSession` - Session that should be invalidated
        `aMessage` - description message

    - #### InvalidateSessionException

          public InvalidateSessionException(EPPSession aSession,
                                            java.lang.String aMessage,
                                            java.lang.Throwable aCause)

      Create with text message describing the exception and an associated cause `Throwable` and the session that should be invalidated.
      Parameters:
        `aSession` - Session that should be invalidated
        `aMessage` - description message
        `aCause` - `Throwable` that caused the exception

    - #### InvalidateSessionException

          public InvalidateSessionException(EPPSession aSession,
                                            java.lang.Throwable cause)

      Create with an associated cause `Throwable` and the session that should be invalidated.
      Parameters:
        `aSession` - Session that should be invalidated
        `cause` - `Throwable` that caused the exception

  - ### Method Detail

    - #### hasSession

          public boolean hasSession()

      Has the session to be invalidated been set?
      Returns:
        `true` of the session has been set; `false` otherwise.

    - #### getSession

          public EPPSession getSession()

      Gets the session that should be invalidated.
      Returns:
        Session that should be invalidated if set; `null` otherwise.

    - #### setSession

          public void setSession(EPPSession aSession)

      Sets the session that should be invalidated.
      Parameters:
        `aSession` - Session that should be invalidated