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 voidappendQuotedWithSeparator(StringBuilder b, String field, String value) private voidappendWithSeparator(StringBuilder b, String field) private voidappendWithSeparator(StringBuilder b, String field, int value) private voidappendWithSeparator(StringBuilder b, String field, String value) private StringbuildListValue(List<String> values) javax.ws.rs.core.CacheControlfromString(String header) private StringquoteIfWhitespace(String value) private voidreadDirective(javax.ws.rs.core.CacheControl cacheControl, HttpHeaderReader reader) private voidreadFieldNames(List<String> fieldNames, HttpHeaderReader reader) private intreadIntValue(HttpHeaderReader reader, String directiveName) booleanAscertain 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:HeaderDelegateProviderAscertain if the Provider supports a particular type.- Specified by:
supportsin 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:
toStringin 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:
fromStringin interfacejavax.ws.rs.ext.RuntimeDelegate.HeaderDelegate<javax.ws.rs.core.CacheControl>
-
appendWithSeparator
-
appendQuotedWithSeparator
-
appendWithSeparator
-
appendWithSeparator
-
buildListValue
-
quoteIfWhitespace
-