Class RemoteExceptionDescription

java.lang.Object
org.axonframework.messaging.core.RemoteExceptionDescription

public class RemoteExceptionDescription extends Object
Description of an Exception received from a remote source. Allows for correct conversion of the cause of Exceptions without requiring any knowledge on the Exception classes.
Since:
4.0
Author:
Steven van Beelen
  • Constructor Details

    • RemoteExceptionDescription

      public RemoteExceptionDescription(List<String> descriptions)
      Initialize a RemoteExceptionDescription with given descriptions describing the exception chain on the remote end of communication
      Parameters:
      descriptions - a List of Strings, each describing a single "cause" on the remote end
    • RemoteExceptionDescription

      @ConstructorProperties("descriptions, persistent") public RemoteExceptionDescription(List<String> descriptions, boolean persistent)
      Initialize a RemoteExceptionDescription with given descriptions describing the exception chain on the remote end of communication. The persistent indicator defines whether the exception is considered persistent or transient.
      Parameters:
      descriptions - a List of Strings, each describing a single "cause" on the remote end
      persistent - an indicator whether the exception is considered persistent or transient
  • Method Details

    • describing

      public static RemoteExceptionDescription describing(Throwable exception)
      Provide a description as a List of Strings of all the causes in the given exception.
      Parameters:
      exception - a Throwable to create a description of
      Returns:
      a List of String describing the given Exception
    • isPersistent

      public boolean isPersistent()
      Returns whether the exception is considered persistent or not.
      Returns:
      the persistency indicator
    • getDescriptions

      public List<String> getDescriptions()
      Returns the List of Strings describing the causes of the exception on the remote end.
      Returns:
      the descriptions of the causes as a List of Strings
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object