org.springframework.web.socket.sockjs

## Class SockJsException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.lang.RuntimeException
      - - org.springframework.core.NestedRuntimeException
        - - org.springframework.web.socket.sockjs.SockJsException

- All Implemented Interfaces:
    Serializable
  Direct Known Subclasses:
    SockJsMessageDeliveryException, SockJsTransportFailureException

      public class SockJsException
      extends NestedRuntimeException

  Base class for exceptions raised while processing SockJS HTTP requests.
  Since:
    4.0
  Author:
    Rossen Stoyanchev
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SockJsException(String message, String sessionId, Throwable cause)` Constructor for SockJsException.
    `SockJsException(String message, Throwable cause)` Constructor for SockJsException.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getSockJsSessionId()` Return the SockJS session id.

    - ### Methods inherited from class org.springframework.core.NestedRuntimeException

      `contains, getMessage, getMostSpecificCause, getRootCause`

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

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, 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

    - #### SockJsException

          public SockJsException(String message,
                                 @Nullable
                                 Throwable cause)

      Constructor for SockJsException.
      Parameters:
        `message` - the exception message
        `cause` - the root cause

    - #### SockJsException

          public SockJsException(String message,
                                 @Nullable
                                 String sessionId,
                                 @Nullable
                                 Throwable cause)

      Constructor for SockJsException.
      Parameters:
        `message` - the exception message
        `sessionId` - the SockJS session id
        `cause` - the root cause

  - ### Method Detail

    - #### getSockJsSessionId

          @Nullable
          public String getSockJsSessionId()

      Return the SockJS session id.