Package org.apache.juneau.http.header
Class HeaderBeanMeta<T>
java.lang.Object
org.apache.juneau.http.header.HeaderBeanMeta<T>
- Type Parameters:
- T- The header bean type.
Holds metadata about header beans (POJOs that get serialized as HTTP headers).
 
 Header beans are typically annotated with @Header although it's not an
 absolute requirement.
 
Header beans must have one of the following public constructors:
- public X(String- headerValue )
- public X(Object- headerValue )
- public X(String- headerName , String- headerValue )
- public X(String- headerName , Object- headerValue )
Example
   
See Also:
- 
Method SummaryModifier and TypeMethodDescriptionConstructs a header bean with the specified name or value.Constructs a header bean with the specified name or value.Returns schema information about this header.static <T> HeaderBeanMeta<T>Finds the header bean meta for the specified type.
- 
Method Details- 
ofFinds the header bean meta for the specified type.- Type Parameters:
- T- The header bean type.
- Parameters:
- type- The header bean type.
- Returns:
- The metadata, or null if a valid constructor could not be found.
 
- 
getSchemaReturns schema information about this header.This is information pulled from @Headerannotation on the class.- Returns:
- The schema information.
 
- 
constructConstructs a header bean with the specified name or value.Can only be used on beans where the header name is known. - Parameters:
- value- The header value.
- Returns:
- A newly constructed bean.
 
- 
constructConstructs a header bean with the specified name or value.- Parameters:
- name- The header name.
 If- null , uses the value pulled from the- @Header(name)or- @Header(value)annotations.
- value- The header value.
- Returns:
- A newly constructed bean.
- Throws:
- UnsupportedOperationException- If bean could not be constructed (e.g. couldn't find a constructor).
 
 
-