Class CacheControlProvider
java.lang.Object
org.glassfish.jersey.message.internal.CacheControlProvider
- All Implemented Interfaces:
javax.ws.rs.ext.RuntimeDelegate.HeaderDelegate<javax.ws.rs.core.CacheControl>
,HeaderDelegateProvider<javax.ws.rs.core.CacheControl>
@Singleton
public final class CacheControlProvider
extends Object
implements HeaderDelegateProvider<javax.ws.rs.core.CacheControl>
Cache-Control
header delegate provider
.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
appendQuotedWithSeparator
(StringBuilder b, String field, String value) private void
appendWithSeparator
(StringBuilder b, String field) private void
appendWithSeparator
(StringBuilder b, String field, int value) private void
appendWithSeparator
(StringBuilder b, String field, String value) private String
buildListValue
(List<String> values) javax.ws.rs.core.CacheControl
fromString
(String header) private String
quoteIfWhitespace
(String value) private void
readDirective
(javax.ws.rs.core.CacheControl cacheControl, HttpHeaderReader reader) private void
readFieldNames
(List<String> fieldNames, HttpHeaderReader reader) private int
readIntValue
(HttpHeaderReader reader, String directiveName) boolean
Ascertain if the Provider supports a particular type.toString
(javax.ws.rs.core.CacheControl header)
-
Field Details
-
WHITESPACE
-
COMMA_SEPARATED_LIST
-
-
Constructor Details
-
CacheControlProvider
public CacheControlProvider()
-
-
Method Details
-
supports
Description copied from interface:HeaderDelegateProvider
Ascertain if the Provider supports a particular type.- Specified by:
supports
in interfaceHeaderDelegateProvider<javax.ws.rs.core.CacheControl>
- Parameters:
type
- the type that is to be supported.- Returns:
- true if the type is supported, otherwise false.
-
toString
- Specified by:
toString
in interfacejavax.ws.rs.ext.RuntimeDelegate.HeaderDelegate<javax.ws.rs.core.CacheControl>
-
readFieldNames
- Throws:
ParseException
-
readIntValue
- Throws:
ParseException
-
readDirective
private void readDirective(javax.ws.rs.core.CacheControl cacheControl, HttpHeaderReader reader) throws ParseException - Throws:
ParseException
-
fromString
- Specified by:
fromString
in interfacejavax.ws.rs.ext.RuntimeDelegate.HeaderDelegate<javax.ws.rs.core.CacheControl>
-
appendWithSeparator
-
appendQuotedWithSeparator
-
appendWithSeparator
-
appendWithSeparator
-
buildListValue
-
quoteIfWhitespace
-