Class Thrown

All Implemented Interfaces:
Serializable, Cloneable, Header, NameValuePair

@Header("Thrown") public class Thrown extends BasicCsvHeader
Represents a parsed Thrown HTTP response header.

Contains exception information including name and optionally a message.

Example

Thrown: org.apache.juneau.http.response.NotFound;Resource was not found

This header isn't part of the RFC2616 specification, but is provided to allow for Java exception information to be delivered to remote REST Java interfaces.

This header supports comma-delimited values for multiple thrown values.

Thrown: org.apache.juneau.http.response.NotFound;Resource was not found,java.lang.RuntimeException;foo

Note that this is equivalent to specifying multiple header values.

Thrown: org.apache.juneau.http.response.NotFound;Resource was not found Thrown: java.lang.RuntimeException;foo

See Also:
  • Field Details

    • EMPTY

      public static final Thrown EMPTY
      An empty unmodifiable Thrown header.
  • Constructor Details

    • Thrown

      public Thrown(String value)
      Constructor.
      Parameters:
      value - The header value.
    • Thrown

      public Thrown(List<Thrown.Part> value)
      Constructor.
      Parameters:
      value - The header value.
  • Method Details

    • of

      public static Thrown of(String value)
      Static creator.
      Parameters:
      value - The header value.
      Can be null.
      Returns:
      A new header bean, or null if the value is null.
    • of

      public static Thrown of(Throwable... values)
      Static creator.
      Parameters:
      values - The header value.
      Can be null.
      Returns:
      A new header bean, or null if the value is null.
    • asParts

      Returns the class name portion of the header.
      Returns:
      The class name portion of the header, or null if not there.