Klasse HttpError<NONE>

java.lang.Object
de.srsoftware.tools.container.Error<NONE>
de.srsoftware.tools.HttpError<NONE>
Typparameter:
NONE - the type of the result that was expected when the error occured
Alle implementierten Schnittstellen:
de.srsoftware.tools.container.Container<NONE>

public class HttpError<NONE> extends de.srsoftware.tools.container.Error<NONE>
A special Error type that additionally carries an error code
  • Feldübersicht

    Von Klasse geerbte Felder de.srsoftware.tools.container.Error

    DATA, EXCEPTIONS, MESSAGE
  • Konstruktorübersicht

    Konstruktoren
    Konstruktor
    Beschreibung
    HttpError(int code, String message, Map<String,Object> data, Collection<Exception> exceptions)
    create a new Error object carrying the passed message
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    int
    return the error code assigned with this error
    static <T> HttpError<T>
    of(int code, Exception exception, String message, Object... fills)
    create a new HttpError object carrying the passed message
    static <T> HttpError<T>
    of(int code, String message, Object... fills)
    create a new HttpError object carrying the passed message
    static <T> HttpError<T>
    of(int code, Collection<Exception> exceptions, String message, Object... fills)
    create a new HttpError object carrying the passed message
    static <T> HttpError<T>
    of(int code, Map<String,Object> data, Exception exception, String message, Object... fills)
    create a new HttpError object carrying the passed message
    static <T> HttpError<T>
    of(int code, Map<String,Object> data, String message, Object... fills)
    create a new HttpError object carrying the passed message
    static <T> HttpError<T>
    of(int code, Map<String,Object> data, Collection<Exception> exceptions, String message, Object... fills)
    create a new HttpError object carrying the passed message
    <NewType> HttpError<NewType>
    create an HttpError with the same metadata content as this Object, but with different payload type

    Von Klasse geerbte Methoden de.srsoftware.tools.container.Error

    add, addData, data, error, error, error, error, error, error, exceptions, isEmpty, json, message, optional, stream, streamContained, then, toString, wrap

    Von Klasse geerbte Methoden java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Von Schnittstelle geerbte Methoden de.srsoftware.tools.container.Container

    map
  • Konstruktordetails

    • HttpError

      public HttpError(int code, String message, Map<String,Object> data, Collection<Exception> exceptions)
      create a new Error object carrying the passed message
      Parameter:
      code - the error code
      message - the message to add to the Error object
      data - (optional) data to carry along
      exceptions - (optional) exceptions to wrap
  • Methodendetails

    • code

      public int code()
      return the error code assigned with this error
      Gibt zurück:
      a numeric error code
    • of

      public static <T> HttpError<T> of(int code, String message, Object... fills)
      create a new HttpError object carrying the passed message
      Typparameter:
      T - the type of the result expected at the place this error occurred
      Parameter:
      code - the error code
      message - the message to add to the Error object, may contain placeholder marks
      fills - the list of objects to fill the marks
      Gibt zurück:
      the created HttpError object
    • of

      public static <T> HttpError<T> of(int code, Collection<Exception> exceptions, String message, Object... fills)
      create a new HttpError object carrying the passed message
      Typparameter:
      T - the type of the result expected at the place this error occurred
      Parameter:
      code - the error code
      exceptions - (optional) exceptions to wrap
      message - the message to add to the Error object, may contain placeholder marks
      fills - the list of objects to fill the marks
      Gibt zurück:
      the created HttpError object
    • of

      public static <T> HttpError<T> of(int code, Exception exception, String message, Object... fills)
      create a new HttpError object carrying the passed message
      Typparameter:
      T - the type of the result expected at the place this error occurred
      Parameter:
      code - the error code
      exception - exceptions to wrap
      message - the message to add to the Error object, may contain placeholder marks
      fills - the list of objects to fill the marks
      Gibt zurück:
      the created HttpError object
    • of

      public static <T> HttpError<T> of(int code, Map<String,Object> data, String message, Object... fills)
      create a new HttpError object carrying the passed message
      Typparameter:
      T - the type of the result expected at the place this error occurred
      Parameter:
      code - the error code
      data - (optional) data to carry along
      message - the message to add to the Error object, may contain placeholder marks
      fills - the list of objects to fill the marks
      Gibt zurück:
      the created HttpError object
    • of

      public static <T> HttpError<T> of(int code, Map<String,Object> data, Collection<Exception> exceptions, String message, Object... fills)
      create a new HttpError object carrying the passed message
      Typparameter:
      T - the type of the result expected at the place this error occurred
      Parameter:
      code - the error code
      data - (optional) data to carry along
      exceptions - (optional) exceptions to wrap
      message - the message to add to the Error object, may contain placeholder marks
      fills - the list of objects to fill the marks
      Gibt zurück:
      the created HttpError object
    • of

      public static <T> HttpError<T> of(int code, Map<String,Object> data, Exception exception, String message, Object... fills)
      create a new HttpError object carrying the passed message
      Typparameter:
      T - the type of the result expected at the place this error occurred
      Parameter:
      code - the error code
      data - (optional) data to carry along
      exception - exception to wrap
      message - the message to add to the Error object, may contain placeholder marks
      fills - the list of objects to fill the marks
      Gibt zurück:
      the created HttpError object
    • transform

      public <NewType> HttpError<NewType> transform()
      create an HttpError with the same metadata content as this Object, but with different payload type
      Setzt außer Kraft:
      transform in Klasse de.srsoftware.tools.container.Error<NONE>
      Typparameter:
      NewType - the payload type of the returned error
      Gibt zurück:
      the transformed Error (new object)