Class ServerFailure


  • public class ServerFailure
    extends java.lang.Object
    Describes a request failure on the server.

    This error reporting mechanism is adequate at best. When RequestFactory is extended to handle polymorphic types, this class will likely be replaced with something more expressive.

    • Constructor Summary

      Constructors 
      Constructor Description
      ServerFailure()
      Constructs a ServerFailure with null properties.
      ServerFailure​(java.lang.String message)
      Constructs a fatal ServerFailure with null type and null stack trace.
      ServerFailure​(java.lang.String message, java.lang.String exceptionType, java.lang.String stackTraceString, boolean fatal)
      Constructs a ServerFailure object.
    • Constructor Detail

      • ServerFailure

        public ServerFailure()
        Constructs a ServerFailure with null properties.
      • ServerFailure

        public ServerFailure​(java.lang.String message)
        Constructs a fatal ServerFailure with null type and null stack trace.
      • ServerFailure

        public ServerFailure​(java.lang.String message,
                             java.lang.String exceptionType,
                             java.lang.String stackTraceString,
                             boolean fatal)
        Constructs a ServerFailure object.
        Parameters:
        message - a String containing the failure message
        exceptionType - a String containing the exception type
        stackTraceString - a String containing the stack trace
    • Method Detail

      • getExceptionType

        public java.lang.String getExceptionType()
        Return the exception type.
        Returns:
        the exception type as a String
      • getMessage

        public java.lang.String getMessage()
        Return the failure message.
        Returns:
        the message as a String
      • getRequestContext

        public RequestContext getRequestContext()
        Returns the RequestContext that triggered the ServerFailure.
      • getStackTraceString

        public java.lang.String getStackTraceString()
        Return the failure stack trace.
        Returns:
        the stack trace as a String