public final class SerializerSessionArgs extends BeanSessionArgs
This object specifies information such as session locale or URI context.
| Modifier and Type | Field and Description |
|---|---|
static SerializerSessionArgs |
DEFAULT
Default serializer session args.
|
| Constructor and Description |
|---|
SerializerSessionArgs() |
| Modifier and Type | Method and Description |
|---|---|
static SerializerSessionArgs |
create()
Creator.
|
SerializerSessionArgs |
debug(Boolean value)
Debug mode.
|
SerializerSessionArgs |
fileCharset(Charset value)
File charset.
|
SerializerSessionArgs |
javaMethod(Method value)
The java method that called this serializer, usually the method in a REST servlet.
|
SerializerSessionArgs |
locale(Locale value)
The session locale.
|
SerializerSessionArgs |
mediaType(MediaType value)
The session media type.
|
SerializerSessionArgs |
properties(ObjectMap value)
Session-level properties.
|
SerializerSessionArgs |
property(String key,
Object value)
Adds a property to this session.
|
SerializerSessionArgs |
resolver(VarResolverSession value)
String variable resolver.
|
SerializerSessionArgs |
schema(HttpPartSchema value)
HTTP-part schema.
|
SerializerSessionArgs |
streamCharset(Charset value)
Output stream charset.
|
SerializerSessionArgs |
timeZone(TimeZone value)
The session timezone.
|
ObjectMap |
toMap()
Returns the properties defined on this object as a simple map for debugging purposes.
|
SerializerSessionArgs |
uriContext(UriContext value)
URI context bean.
|
SerializerSessionArgs |
useWhitespace(Boolean value)
Use whitespace.
|
getProperty, toStringpublic static final SerializerSessionArgs DEFAULT
public SerializerSessionArgs()
public static final SerializerSessionArgs create()
public SerializerSessionArgs fileCharset(Charset value)
The character set to use for writing Files to the file system.
Used when passing in files to Serializer.serialize(Object, Object).
If not specified, defaults to the JVM system default charset.
value - The new property value.
public SerializerSessionArgs javaMethod(Method value)
value - The new property value.
public SerializerSessionArgs resolver(VarResolverSession value)
If not specified, defaults to session created by VarResolver.DEFAULT.
value - The new property value.
public SerializerSessionArgs streamCharset(Charset value)
The character set to use when writing to OutputStreams.
Used when passing in output streams and byte arrays to Serializer.serialize(Object, Object).
If not specified, defaults to UTF-8.
value - The new property value.
public SerializerSessionArgs uriContext(UriContext value)
Bean used for resolution of URIs to absolute or root-relative form.
If not specified, defaults to Serializer.SERIALIZER_uriContext.
value - The new property value.
public SerializerSessionArgs useWhitespace(Boolean value)
If true, whitespace is added to the output to improve readability.
value - The new property value.
public SerializerSessionArgs debug(Boolean value)
BeanSessionArgsEnables the following additional information during parsing:
If not specified, defaults to BeanContext.BEAN_debug.
debug in class BeanSessionArgsvalue - The new value for this property.
public SerializerSessionArgs locale(Locale value)
BeanSessionArgsSpecifies the default locale for serializer and parser sessions.
If not specified, defaults to BeanContext.BEAN_locale.
locale in class BeanSessionArgsvalue - The new value for this property.
public SerializerSessionArgs mediaType(MediaType value)
BeanSessionArgsSpecifies the default media type value for serializer and parser sessions.
If not specified, defaults to BeanContext.BEAN_mediaType.
mediaType in class BeanSessionArgsvalue - The new value for this property.
public SerializerSessionArgs schema(HttpPartSchema value)
BeanSessionArgsUsed for schema-based serializers and parsers to define additional formatting.
schema in class BeanSessionArgsvalue - The new value for this property.
public SerializerSessionArgs timeZone(TimeZone value)
BeanSessionArgsSpecifies the default timezone for serializer and parser sessions.
If not specified, defaults to BeanContext.BEAN_timeZone.
timeZone in class BeanSessionArgsvalue - The new value for this property.
public SerializerSessionArgs properties(ObjectMap value)
SessionArgsOverrides context-level properties.
properties in class BeanSessionArgsvalue - The new value for this property.
public SerializerSessionArgs property(String key, Object value)
SessionArgsproperty in class BeanSessionArgskey - The property key.value - The property value.public ObjectMap toMap()
SessionArgstoMap in class BeanSessionArgsCopyright © 2016–2019 The Apache Software Foundation. All rights reserved.