Class EncodeException

java.lang.Object
java.lang.Throwable
java.lang.Exception
jakarta.websocket.EncodeException
All Implemented Interfaces:
Serializable

public class EncodeException extends Exception
Exception thrown when an encoder fails to encode an object as a WebSocket message.
See Also:
  • Constructor Details

    • EncodeException

      public EncodeException(Object object, String message)
      Creates an EncodeException with the specified object and detail message.
      Parameters:
      object - The object that could not be encoded
      message - The detail message
    • EncodeException

      public EncodeException(Object object, String message, Throwable cause)
      Creates an EncodeException with the specified object, detail message, and cause.
      Parameters:
      object - The object that could not be encoded
      message - The detail message
      cause - The underlying cause of the exception
  • Method Details

    • getObject

      public Object getObject()
      Returns the object that could not be encoded.
      Returns:
      The object that could not be encoded