Class DataSourceStatusProvider.ErrorInfo

    • Constructor Detail

      • ErrorInfo

        public ErrorInfo​(DataSourceStatusProvider.ErrorKind kind,
                         int statusCode,
                         java.lang.String message,
                         java.time.Instant time)
        Constructs an instance.
        Parameters:
        kind - the general category of the error
        statusCode - an HTTP status or zero
        message - an error message if applicable, or null
        time - the error timestamp
    • Method Detail

      • fromHttpError

        public static DataSourceStatusProvider.ErrorInfo fromHttpError​(int statusCode)
        Constructs an instance based on an HTTP error status.
        Parameters:
        statusCode - the status code
        Returns:
        an ErrorInfo
      • getKind

        public DataSourceStatusProvider.ErrorKind getKind()
        Returns an enumerated value representing the general category of the error.
        Returns:
        the general category of the error
      • getMessage

        public java.lang.String getMessage()
        Returns any additional human-readable information relevant to the error. The format of this message is subject to change and should not be relied on programmatically.
        Returns:
        an error message if applicable, or null
      • getTime

        public java.time.Instant getTime()
        Returns the date/time that the error occurred.
        Returns:
        the error timestamp
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object