public class ServerSideException extends java.lang.RuntimeException implements java.io.Serializable, java.io.Externalizable, SecureExternalizable
This class addresses the issue of potential class loading or serialization problems when transmitting exceptions across network boundaries. Instead of directly referencing classes or exceptions in the cause chain, it decomposes the causes into individual strings and reconstructs them on the receiving end using a dedicated wrapper class. This ensures that the exception information can be safely transmitted and reconstructed without encountering class definition conflicts or inconsistencies.
| Modifier and Type | Class and Description | 
|---|---|
| static class  | ServerSideException.CauseA wrapper for the cause chain of a ServerSideException, allowing reconstruction of the stack
 trace on the remote end. | 
| Constructor and Description | 
|---|
| ServerSideException() | 
| ServerSideException(java.lang.String s) | 
| ServerSideException(java.lang.String s,
                   java.lang.Throwable _cause) | 
| Modifier and Type | Method and Description | 
|---|---|
| java.lang.String | getMessage() | 
| java.lang.String | getMessageWithoutBackendPrefix() | 
| ServerSideException.Cause | getRootCauseIfOfType(java.lang.Class clazz)Retrieves the root cause of this exception if it is a ServerSideException and the original
 exception on the server was of the specified type. | 
| static ServerSideException.Cause | getRootCauseIfOfType(java.lang.Object obj,
                    java.lang.Class clazz)Retrieves the root cause of the given object if it is a ServerSideException and the root cause
 is of the specified type. | 
| void | readExternal(java.io.ObjectInput s) | 
| void | readInstance(SecureObjectInputI s)Reads an instance of this class from the given SecureObjectInputI without using readObject. | 
| static java.lang.String | stripBackendPrefix(java.lang.String s) | 
| void | writeExternal(java.io.ObjectOutput s) | 
| void | writeInstance(SecureObjectOutputI s)Writes an instance of this class to the given SecureObjectOutputI without using writeObject. | 
public ServerSideException()
public ServerSideException(java.lang.String s)
public ServerSideException(java.lang.String s,
                           java.lang.Throwable _cause)
public static ServerSideException.Cause getRootCauseIfOfType(java.lang.Object obj, java.lang.Class clazz)
obj - The object to check for a root cause.clazz - The expected type of the root cause.null otherwise.public static final java.lang.String stripBackendPrefix(java.lang.String s)
public java.lang.String getMessage()
getMessage in class java.lang.Throwablepublic java.lang.String getMessageWithoutBackendPrefix()
public void readInstance(SecureObjectInputI s) throws java.io.IOException
SecureExternalizablereadInstance in interface SecureExternalizablejava.io.IOExceptionpublic void writeInstance(SecureObjectOutputI s) throws java.io.IOException
SecureExternalizablewriteInstance in interface SecureExternalizablejava.io.IOExceptionpublic void readExternal(java.io.ObjectInput s)
                  throws java.io.IOException
readExternal in interface java.io.Externalizablejava.io.IOExceptionpublic void writeExternal(java.io.ObjectOutput s)
                   throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOExceptionpublic ServerSideException.Cause getRootCauseIfOfType(java.lang.Class clazz)
clazz - The expected type of the original exception on the server.null otherwise.Copyright © 2000-2025 OAshi S.à r.l. All Rights Reserved.