Class ParserSet
Parsers that can be looked up by media type.
 Description
Provides the following features:- 
      Finds parsers based on HTTP Content-Type header values.
- Sets common properties on all parsers in a single method call.
- Locks all parsers in a single method call.
- Clones existing groups and all parsers within the group in a single method call.
Match ordering
Parsers are matched againstAdding new entries will cause the entries to be prepended to the group. This allows for previous parsers to be overridden through subsequent calls.
 For example, calling g.append(P1.
 will result in the order 
Example:
   
Notes:
- This class is thread safe and reusable.
See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classBuilder class.static classAn identifier that the previous entries in this group should be inherited.static classAn identifier that the previous entries in this group should not be inherited.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptioncopy()Creates a copy of this parser group.static ParserSet.Buildercreate()Static creator.static ParserSet.BuilderStatic creator.Same asgetParserMatch(String)but returns just the matched parser.Same asgetParserMatch(MediaType)but returns just the matched parser.getParserMatch(String contentTypeHeader) Searches the group for a parser that can handle the specifiedContent-Type header value.getParserMatch(MediaType mediaType) Same asgetParserMatch(String)but matches using aMediaTypeinstance.Returns the parsers in this group.Returns the media types that all parsers in this group can handlebooleanisEmpty()Returnstrue if this group contains no parsers.
- 
Constructor Details- 
ParserSetConstructor.- Parameters:
- builder- The builder for this bean.
 
 
- 
- 
Method Details- 
createStatic creator.- Parameters:
- beanStore- The bean store to use for creating beans.
- Returns:
- A new builder for this object.
 
- 
createStatic creator.- Returns:
- A new builder for this object.
 
- 
copyCreates a copy of this parser group.- Returns:
- A new copy of this parser group.
 
- 
getParserMatchSearches the group for a parser that can handle the specifiedContent-Type header value.The returned object includes both the parser and media type that matched. - Parameters:
- contentTypeHeader- The HTTP- Content-Type header value.
- Returns:
- The parser and media type that matched the content type header, or null if no match was made.
 
- 
getParserMatchSame asgetParserMatch(String)but matches using aMediaTypeinstance.- Parameters:
- mediaType- The HTTP- Content-Type header value as a media type.
- Returns:
- The parser and media type that matched the media type, or null if no match was made.
 
- 
getParserSame asgetParserMatch(String)but returns just the matched parser.- Parameters:
- contentTypeHeader- The HTTP- Content-Type header string.
- Returns:
- The parser that matched the content type header, or null if no match was made.
 
- 
getParserSame asgetParserMatch(MediaType)but returns just the matched parser.- Parameters:
- mediaType- The HTTP media type.
- Returns:
- The parser that matched the media type, or null if no match was made.
 
- 
getSupportedMediaTypesReturns the media types that all parsers in this group can handleEntries are ordered in the same order as the parsers in the group. - Returns:
- An unmodifiable list of media types.
 
- 
getParsersReturns the parsers in this group.- Returns:
- An unmodifiable list of parsers in this group.
 
- 
isEmptyReturnstrue if this group contains no parsers.- Returns:
- true if this group contains no parsers.
 
 
-