Class Thrown
- All Implemented Interfaces:
Serializable,Header,NameValuePair
Contains exception information including name and optionally a message.
Example
Thrown: org.apache.juneau.http.classic.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.classic.response.NotFound;Resource was not found,RuntimeException;foo
Note that this is equivalent to specifying multiple header values.
Thrown: org.apache.juneau.http.classic.response.NotFound;Resource was not found Thrown: RuntimeException;foo
See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents a single entry in this header. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.juneau.http.classic.header.BasicCsvHeader
asArray, asList, assertList, contains, containsIgnoreCase, getValue, of, of, orElse, toArray, toListMethods inherited from class org.apache.juneau.http.classic.header.BasicHeader
assertName, assertStringValue, asString, copy, equals, equalsIgnoreCase, get, getElements, getName, hashCode, isNotEmpty, isPresent, of, of, orElse, toString
-
Field Details
-
EMPTY
An empty unmodifiable Thrown header.
-
-
Constructor Details
-
Thrown
Constructor.- Parameters:
value- The header value.
-
Thrown
Constructor.- Parameters:
value- The header value.
-
Thrown
Constructor.- Parameters:
value- The header value.
Can benull or empty to create a header with no value.
-
-
Method Details
-
of
Static creator.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
of
Static creator.- Parameters:
values- The header value.
Can benull or empty (treated as no thrown values).- Returns:
- A new header bean, or
null if the value isnull .
-
of
Static creator.- Parameters:
value- The header value.
Can benull or empty to create a header with no value.- Returns:
- A new header bean, or
null if the value isnull .
-
of
Static creator for two CSV tokens.This distinct fixed-arity overload ensures two literal
Stringarguments resolve to this class's own factory (returning aThrown) rather than the inherited fixed-arityBasicCsvHeader.of(String,String), which Java overload resolution would otherwise prefer.- Parameters:
value1- The first CSV token.value2- The second CSV token.- Returns:
- A new header bean.
-
asParts
Returns the parts in this header.- Returns:
- The parts in this header, or an empty
Optionalif the header value wasnull .
-