juneau-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamesbog...@apache.org
Subject [1/2] juneau git commit: Sort properties in context classes.
Date Sun, 07 Jan 2018 02:37:29 GMT
Repository: juneau
Updated Branches:
  refs/heads/master 7b5961008 -> 4eaa07281


http://git-wip-us.apache.org/repos/asf/juneau/blob/4eaa0728/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/Serializer.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/Serializer.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/Serializer.java
index f1493c7..d3552ee 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/Serializer.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/Serializer.java
@@ -46,41 +46,47 @@ public abstract class Serializer extends BeanContext {
 	private static final String PREFIX = "Serializer.";
 
 	/**
-	 * Configuration property:  Max serialization depth.
+	 * Configuration property:  Abridged output.
 	 *
 	 *	<h5 class='section'>Property:</h5>
 	 * <ul>
-	 * 	<li><b>Name:</b>  <js>"Serializer.maxDepth.i"</js>
-	 * 	<li><b>Data type:</b>  <code>Integer</code>
-	 * 	<li><b>Default:</b>  <code>100</code>
+	 * 	<li><b>Name:</b>  <js>"Serializer.abridged.b"</js>
+	 * 	<li><b>Data type:</b>  <code>Boolean</code>
+	 * 	<li><b>Default:</b>  <jk>false</jk>
 	 * 	<li><b>Session-overridable:</b>  <jk>true</jk>
 	 * </ul>
 	 *
 	 *	<h5 class='section'>Description:</h5>
 	 * <p>
-	 * Abort serialization if specified depth is reached in the POJO tree.
-	 * If this depth is exceeded, an exception is thrown.
-	 * This prevents stack overflows from occurring when trying to serialize models with recursive references.
+	 * When enabled, it is assumed that the parser knows the exact Java POJO type being parsed, and therefore top-level
+	 * type information that might normally be included to determine the data type will not be serialized.
+	 *
+	 * <p>
+	 * For example, when serializing a POJO with a {@link Bean#typeName()} value, a <js>"_type"</js> will be added when
+	 * this setting is disabled, but not added when it is enabled.
 	 */
-	public static final String SERIALIZER_maxDepth = PREFIX + "maxDepth.i";
+	public static final String SERIALIZER_abridged = PREFIX + "abridged.b";
 
 	/**
-	 * Configuration property:  Initial depth.
+	 * Configuration property:  Add <js>"_type"</js> properties when needed.
 	 *
 	 *	<h5 class='section'>Property:</h5>
 	 * <ul>
-	 * 	<li><b>Name:</b>  <js>"Serializer.initialDepth.i"</js>
-	 * 	<li><b>Data type:</b>  <code>Integer</code>
-	 * 	<li><b>Default:</b>  <code>0</code>
+	 * 	<li><b>Name:</b>  <js>"Serializer.addBeanTypeProperties.b"</js>
+	 * 	<li><b>Data type:</b>  <code>Boolean</code>
+	 * 	<li><b>Default:</b>  <jk>true</jk>
 	 * 	<li><b>Session-overridable:</b>  <jk>true</jk>
 	 * </ul>
 	 *
 	 *	<h5 class='section'>Description:</h5>
 	 * <p>
-	 * The initial indentation level at the root.
-	 * Useful when constructing document fragments that need to be indented at a certain level.
+	 * If <jk>true</jk>, then <js>"_type"</js> properties will be added to beans if their type cannot be inferred
+	 * through reflection.
+	 * This is used to recreate the correct objects during parsing if the object types cannot be inferred.
+	 * For example, when serializing a {@code Map<String,Object>} field, where the bean class cannot be determined from
+	 * the value type.
 	 */
-	public static final String SERIALIZER_initialDepth = PREFIX + "initialDepth.i";
+	public static final String SERIALIZER_addBeanTypeProperties = PREFIX + "addBeanTypeProperties.b";
 
 	/**
 	 * Configuration property:  Automatically detect POJO recursions.
@@ -138,31 +144,46 @@ public abstract class Serializer extends BeanContext {
 	public static final String SERIALIZER_ignoreRecursions = PREFIX + "ignoreRecursions.b";
 
 	/**
-	 * Configuration property:  Use whitespace.
+	 * Configuration property:  Initial depth.
 	 *
 	 *	<h5 class='section'>Property:</h5>
 	 * <ul>
-	 * 	<li><b>Name:</b>  <js>"Serializer.useWhitespace.b"</js>
-	 * 	<li><b>Data type:</b>  <code>Boolean</code>
-	 * 	<li><b>Default:</b>  <jk>false</jk>
+	 * 	<li><b>Name:</b>  <js>"Serializer.initialDepth.i"</js>
+	 * 	<li><b>Data type:</b>  <code>Integer</code>
+	 * 	<li><b>Default:</b>  <code>0</code>
 	 * 	<li><b>Session-overridable:</b>  <jk>true</jk>
 	 * </ul>
 	 *
 	 *	<h5 class='section'>Description:</h5>
 	 * <p>
-	 * If <jk>true</jk>, whitespace is added to the output to improve readability.
+	 * The initial indentation level at the root.
+	 * Useful when constructing document fragments that need to be indented at a certain level.
+	 */
+	public static final String SERIALIZER_initialDepth = PREFIX + "initialDepth.i";
+
+	/**
+	 * Configuration property:  Serializer listener.
 	 *
+	 *	<h5 class='section'>Property:</h5>
+	 * <ul>
+	 * 	<li><b>Name:</b>  <js>"Serializer.listener.c"</js>
+	 * 	<li><b>Data type:</b>  <code>Class&lt;? extends SerializerListener&gt;</code>
+	 * 	<li><b>Default:</b>  <jk>null</jk>
+	 * 	<li><b>Session-overridable:</b>  <jk>true</jk>
+	 * </ul>
+	 *
+	 *	<h5 class='section'>Description:</h5>
 	 * <p>
-	 * This setting does not apply to the MessagePack serializer.
+	 * Class used to listen for errors and warnings that occur during serialization.
 	 */
-	public static final String SERIALIZER_useWhitespace = PREFIX + "useWhitespace.b";
+	public static final String SERIALIZER_listener = PREFIX + "listener.c";
 
 	/**
-	 * Configuration property:  Maximum indentation.
+	 * Configuration property:  Max serialization depth.
 	 *
 	 *	<h5 class='section'>Property:</h5>
 	 * <ul>
-	 * 	<li><b>Name:</b>  <js>"Serializer.maxIndent.i"</js>
+	 * 	<li><b>Name:</b>  <js>"Serializer.maxDepth.i"</js>
 	 * 	<li><b>Data type:</b>  <code>Integer</code>
 	 * 	<li><b>Default:</b>  <code>100</code>
 	 * 	<li><b>Session-overridable:</b>  <jk>true</jk>
@@ -170,33 +191,31 @@ public abstract class Serializer extends BeanContext {
 	 *
 	 *	<h5 class='section'>Description:</h5>
 	 * <p>
-	 * Specifies the maximum indentation level in the serialized document.
-	 *
-	 * <p>
-	 * This setting does not apply to the MessagePack or RDF serializers.
+	 * Abort serialization if specified depth is reached in the POJO tree.
+	 * If this depth is exceeded, an exception is thrown.
+	 * This prevents stack overflows from occurring when trying to serialize models with recursive references.
 	 */
-	public static final String SERIALIZER_maxIndent = PREFIX + "maxIndent.i";
+	public static final String SERIALIZER_maxDepth = PREFIX + "maxDepth.i";
 
 	/**
-	 * Configuration property:  Add <js>"_type"</js> properties when needed.
+	 * Configuration property:  Maximum indentation.
 	 *
 	 *	<h5 class='section'>Property:</h5>
 	 * <ul>
-	 * 	<li><b>Name:</b>  <js>"Serializer.addBeanTypeProperties.b"</js>
-	 * 	<li><b>Data type:</b>  <code>Boolean</code>
-	 * 	<li><b>Default:</b>  <jk>true</jk>
+	 * 	<li><b>Name:</b>  <js>"Serializer.maxIndent.i"</js>
+	 * 	<li><b>Data type:</b>  <code>Integer</code>
+	 * 	<li><b>Default:</b>  <code>100</code>
 	 * 	<li><b>Session-overridable:</b>  <jk>true</jk>
 	 * </ul>
 	 *
 	 *	<h5 class='section'>Description:</h5>
 	 * <p>
-	 * If <jk>true</jk>, then <js>"_type"</js> properties will be added to beans if their type cannot be inferred
-	 * through reflection.
-	 * This is used to recreate the correct objects during parsing if the object types cannot be inferred.
-	 * For example, when serializing a {@code Map<String,Object>} field, where the bean class cannot be determined from
-	 * the value type.
+	 * Specifies the maximum indentation level in the serialized document.
+	 *
+	 * <p>
+	 * This setting does not apply to the MessagePack or RDF serializers.
 	 */
-	public static final String SERIALIZER_addBeanTypeProperties = PREFIX + "addBeanTypeProperties.b";
+	public static final String SERIALIZER_maxIndent = PREFIX + "maxIndent.i";
 
 	/**
 	 * Configuration property:  Quote character.
@@ -219,28 +238,38 @@ public abstract class Serializer extends BeanContext {
 	public static final String SERIALIZER_quoteChar = PREFIX + "quoteChar.s";
 
 	/**
-	 * Configuration property:  Trim null bean property values.
+	 * Configuration property:  Sort arrays and collections alphabetically.
 	 *
 	 *	<h5 class='section'>Property:</h5>
 	 * <ul>
-	 * 	<li><b>Name:</b>  <js>"Serializer.trimNullProperties.b"</js>
+	 * 	<li><b>Name:</b>  <js>"Serializer.sortCollections.b"</js>
 	 * 	<li><b>Data type:</b>  <code>Boolean</code>
-	 * 	<li><b>Default:</b>  <jk>true</jk>
+	 * 	<li><b>Default:</b>  <jk>false</jk>
 	 * 	<li><b>Session-overridable:</b>  <jk>true</jk>
 	 * </ul>
 	 *
 	 *	<h5 class='section'>Description:</h5>
 	 * <p>
-	 * If <jk>true</jk>, null bean values will not be serialized to the output.
+	 * Note that this introduces a performance penalty.
+	 */
+	public static final String SERIALIZER_sortCollections = PREFIX + "sortCollections.b";
+
+	/**
+	 * Configuration property:  Sort maps alphabetically.
 	 *
-	 * <p>
-	 * Note that enabling this setting has the following effects on parsing:
-	 * <ul class='spaced-list'>
-	 * 	<li>
-	 * 		Map entries with <jk>null</jk> values will be lost.
+	 *	<h5 class='section'>Property:</h5>
+	 * <ul>
+	 * 	<li><b>Name:</b>  <js>"Serializer.sortMaps.b"</js>
+	 * 	<li><b>Data type:</b>  <code>Boolean</code>
+	 * 	<li><b>Default:</b>  <jk>false</jk>
+	 * 	<li><b>Session-overridable:</b>  <jk>true</jk>
 	 * </ul>
+	 *
+	 *	<h5 class='section'>Description:</h5>
+	 * <p>
+	 * Note that this introduces a performance penalty.
 	 */
-	public static final String SERIALIZER_trimNullProperties = PREFIX + "trimNullProperties.b";
+	public static final String SERIALIZER_sortMaps = PREFIX + "sortMaps.b";
 
 	/**
 	 * Configuration property:  Trim empty lists and arrays.
@@ -293,6 +322,30 @@ public abstract class Serializer extends BeanContext {
 	public static final String SERIALIZER_trimEmptyMaps = PREFIX + "trimEmptyMaps.b";
 
 	/**
+	 * Configuration property:  Trim null bean property values.
+	 *
+	 *	<h5 class='section'>Property:</h5>
+	 * <ul>
+	 * 	<li><b>Name:</b>  <js>"Serializer.trimNullProperties.b"</js>
+	 * 	<li><b>Data type:</b>  <code>Boolean</code>
+	 * 	<li><b>Default:</b>  <jk>true</jk>
+	 * 	<li><b>Session-overridable:</b>  <jk>true</jk>
+	 * </ul>
+	 *
+	 *	<h5 class='section'>Description:</h5>
+	 * <p>
+	 * If <jk>true</jk>, null bean values will not be serialized to the output.
+	 *
+	 * <p>
+	 * Note that enabling this setting has the following effects on parsing:
+	 * <ul class='spaced-list'>
+	 * 	<li>
+	 * 		Map entries with <jk>null</jk> values will be lost.
+	 * </ul>
+	 */
+	public static final String SERIALIZER_trimNullProperties = PREFIX + "trimNullProperties.b";
+
+	/**
 	 * Configuration property:  Trim strings.
 	 *
 	 *	<h5 class='section'>Property:</h5>
@@ -332,39 +385,6 @@ public abstract class Serializer extends BeanContext {
 	public static final String SERIALIZER_uriContext = PREFIX + "uriContext.s";
 
 	/**
-	 * Configuration property:  URI resolution.
-	 *
-	 *	<h5 class='section'>Property:</h5>
-	 * <ul>
-	 * 	<li><b>Name:</b>  <js>"Serializer.uriResolution.s"</js>
-	 * 	<li><b>Data type:</b>  <code>String</code> ({@link UriResolution})
-	 * 	<li><b>Default:</b>  <js>"NONE"</js>
-	 * 	<li><b>Session-overridable:</b>  <jk>true</jk>
-	 * </ul>
-	 *
-	 *	<h5 class='section'>Description:</h5>
-	 * <p>
-	 * Defines the resolution level for URIs when serializing any of the following:
-	 * <ul>
-	 * 	<li>{@link java.net.URI}
-	 * 	<li>{@link java.net.URL}
-	 * 	<li>Properties annotated with {@link org.apache.juneau.annotation.URI @URI}
-	 * </ul>
-	 *
-	 * <p>
-	 * Possible values are:
-	 * <ul>
-	 * 	<li>{@link UriResolution#ABSOLUTE}
-	 * 		- Resolve to an absolute URL (e.g. <js>"http://host:port/context-root/servlet-path/path-info"</js>).
-	 * 	<li>{@link UriResolution#ROOT_RELATIVE}
-	 * 		- Resolve to a root-relative URL (e.g. <js>"/context-root/servlet-path/path-info"</js>).
-	 * 	<li>{@link UriResolution#NONE}
-	 * 		- Don't do any URL resolution.
-	 * </ul>
-	 */
-	public static final String SERIALIZER_uriResolution = PREFIX + "uriResolution.s";
-
-	/**
 	 * Configuration property:  URI relativity.
 	 *
 	 *	<h5 class='section'>Property:</h5>
@@ -396,45 +416,44 @@ public abstract class Serializer extends BeanContext {
 	public static final String SERIALIZER_uriRelativity = PREFIX + "uriRelativity.s";
 
 	/**
-	 * Configuration property:  Sort arrays and collections alphabetically.
+	 * Configuration property:  URI resolution.
 	 *
 	 *	<h5 class='section'>Property:</h5>
 	 * <ul>
-	 * 	<li><b>Name:</b>  <js>"Serializer.sortCollections.b"</js>
-	 * 	<li><b>Data type:</b>  <code>Boolean</code>
-	 * 	<li><b>Default:</b>  <jk>false</jk>
+	 * 	<li><b>Name:</b>  <js>"Serializer.uriResolution.s"</js>
+	 * 	<li><b>Data type:</b>  <code>String</code> ({@link UriResolution})
+	 * 	<li><b>Default:</b>  <js>"NONE"</js>
 	 * 	<li><b>Session-overridable:</b>  <jk>true</jk>
 	 * </ul>
 	 *
 	 *	<h5 class='section'>Description:</h5>
 	 * <p>
-	 * Note that this introduces a performance penalty.
-	 */
-	public static final String SERIALIZER_sortCollections = PREFIX + "sortCollections.b";
-
-	/**
-	 * Configuration property:  Sort maps alphabetically.
-	 *
-	 *	<h5 class='section'>Property:</h5>
+	 * Defines the resolution level for URIs when serializing any of the following:
 	 * <ul>
-	 * 	<li><b>Name:</b>  <js>"Serializer.sortMaps.b"</js>
-	 * 	<li><b>Data type:</b>  <code>Boolean</code>
-	 * 	<li><b>Default:</b>  <jk>false</jk>
-	 * 	<li><b>Session-overridable:</b>  <jk>true</jk>
+	 * 	<li>{@link java.net.URI}
+	 * 	<li>{@link java.net.URL}
+	 * 	<li>Properties annotated with {@link org.apache.juneau.annotation.URI @URI}
 	 * </ul>
 	 *
-	 *	<h5 class='section'>Description:</h5>
 	 * <p>
-	 * Note that this introduces a performance penalty.
+	 * Possible values are:
+	 * <ul>
+	 * 	<li>{@link UriResolution#ABSOLUTE}
+	 * 		- Resolve to an absolute URL (e.g. <js>"http://host:port/context-root/servlet-path/path-info"</js>).
+	 * 	<li>{@link UriResolution#ROOT_RELATIVE}
+	 * 		- Resolve to a root-relative URL (e.g. <js>"/context-root/servlet-path/path-info"</js>).
+	 * 	<li>{@link UriResolution#NONE}
+	 * 		- Don't do any URL resolution.
+	 * </ul>
 	 */
-	public static final String SERIALIZER_sortMaps = PREFIX + "sortMaps.b";
+	public static final String SERIALIZER_uriResolution = PREFIX + "uriResolution.s";
 
 	/**
-	 * Configuration property:  Abridged output.
+	 * Configuration property:  Use whitespace.
 	 *
 	 *	<h5 class='section'>Property:</h5>
 	 * <ul>
-	 * 	<li><b>Name:</b>  <js>"Serializer.abridged.b"</js>
+	 * 	<li><b>Name:</b>  <js>"Serializer.useWhitespace.b"</js>
 	 * 	<li><b>Data type:</b>  <code>Boolean</code>
 	 * 	<li><b>Default:</b>  <jk>false</jk>
 	 * 	<li><b>Session-overridable:</b>  <jk>true</jk>
@@ -442,31 +461,12 @@ public abstract class Serializer extends BeanContext {
 	 *
 	 *	<h5 class='section'>Description:</h5>
 	 * <p>
-	 * When enabled, it is assumed that the parser knows the exact Java POJO type being parsed, and therefore top-level
-	 * type information that might normally be included to determine the data type will not be serialized.
-	 *
-	 * <p>
-	 * For example, when serializing a POJO with a {@link Bean#typeName()} value, a <js>"_type"</js> will be added when
-	 * this setting is disabled, but not added when it is enabled.
-	 */
-	public static final String SERIALIZER_abridged = PREFIX + "abridged.b";
-
-	/**
-	 * Configuration property:  Serializer listener.
-	 *
-	 *	<h5 class='section'>Property:</h5>
-	 * <ul>
-	 * 	<li><b>Name:</b>  <js>"Serializer.listener.c"</js>
-	 * 	<li><b>Data type:</b>  <code>Class&lt;? extends SerializerListener&gt;</code>
-	 * 	<li><b>Default:</b>  <jk>null</jk>
-	 * 	<li><b>Session-overridable:</b>  <jk>true</jk>
-	 * </ul>
+	 * If <jk>true</jk>, whitespace is added to the output to improve readability.
 	 *
-	 *	<h5 class='section'>Description:</h5>
 	 * <p>
-	 * Class used to listen for errors and warnings that occur during serialization.
+	 * This setting does not apply to the MessagePack serializer.
 	 */
-	public static final String SERIALIZER_listener = PREFIX + "listener.c";
+	public static final String SERIALIZER_useWhitespace = PREFIX + "useWhitespace.b";
 
 	
 	static final Serializer DEFAULT = new Serializer(PropertyStore.create().build(), "") {

http://git-wip-us.apache.org/repos/asf/juneau/blob/4eaa0728/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/uon/UonSerializer.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/uon/UonSerializer.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/uon/UonSerializer.java
index 99fad08..130f027 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/uon/UonSerializer.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/uon/UonSerializer.java
@@ -123,51 +123,51 @@ public class UonSerializer extends WriterSerializer {
 	private static final String PREFIX = "UonSerializer.";
 
 	/**
-	 * Configuration property:  Encode non-valid URI characters.
+	 * Configuration property:  Add <js>"_type"</js> properties when needed.
 	 *
 	 *	<h5 class='section'>Property:</h5>
 	 * <ul>
-	 * 	<li><b>Name:</b>  <js>"UonSerializer.encodeChars.b"</js>
+	 * 	<li><b>Name:</b>  <js>"UonSerializer.addBeanTypeProperties.b"</js>
 	 * 	<li><b>Data type:</b>  <code>Boolean</code>
-	 * 	<li><b>Default:</b>  <jk>false</jk> for {@link UonSerializer}, <jk>true</jk> for {@link UrlEncodingSerializer}
+	 * 	<li><b>Default:</b>  <jk>false</jk>
 	 * 	<li><b>Session-overridable:</b>  <jk>true</jk>
 	 * </ul>
 	 *
 	 *	<h5 class='section'>Description:</h5>
 	 * <p>
-	 * Encode non-valid URI characters with <js>"%xx"</js> constructs.
+	 * If <jk>true</jk>, then <js>"_type"</js> properties will be added to beans if their type cannot be inferred
+	 * through reflection.
+	 * This is used to recreate the correct objects during parsing if the object types cannot be inferred.
+	 * For example, when serializing a {@code Map<String,Object>} field, where the bean class cannot be determined from
+	 * the value type.
 	 *
 	 * <p>
-	 * If <jk>true</jk>, non-valid URI characters will be converted to <js>"%xx"</js> sequences.
-	 * Set to <jk>false</jk> if parameter value is being passed to some other code that will already perform
-	 * URL-encoding of non-valid URI characters.
+	 * When present, this value overrides the {@link #SERIALIZER_addBeanTypeProperties} setting and is
+	 * provided to customize the behavior of specific serializers in a {@link SerializerGroup}.
 	 */
-	public static final String UON_encodeChars = PREFIX + "encodeChars.b";
+	public static final String UON_addBeanTypeProperties = PREFIX + "addBeanTypeProperties.b";
 
 	/**
-	 * Configuration property:  Add <js>"_type"</js> properties when needed.
+	 * Configuration property:  Encode non-valid URI characters.
 	 *
 	 *	<h5 class='section'>Property:</h5>
 	 * <ul>
-	 * 	<li><b>Name:</b>  <js>"UonSerializer.addBeanTypeProperties.b"</js>
+	 * 	<li><b>Name:</b>  <js>"UonSerializer.encodeChars.b"</js>
 	 * 	<li><b>Data type:</b>  <code>Boolean</code>
-	 * 	<li><b>Default:</b>  <jk>false</jk>
+	 * 	<li><b>Default:</b>  <jk>false</jk> for {@link UonSerializer}, <jk>true</jk> for {@link UrlEncodingSerializer}
 	 * 	<li><b>Session-overridable:</b>  <jk>true</jk>
 	 * </ul>
 	 *
 	 *	<h5 class='section'>Description:</h5>
 	 * <p>
-	 * If <jk>true</jk>, then <js>"_type"</js> properties will be added to beans if their type cannot be inferred
-	 * through reflection.
-	 * This is used to recreate the correct objects during parsing if the object types cannot be inferred.
-	 * For example, when serializing a {@code Map<String,Object>} field, where the bean class cannot be determined from
-	 * the value type.
+	 * Encode non-valid URI characters with <js>"%xx"</js> constructs.
 	 *
 	 * <p>
-	 * When present, this value overrides the {@link #SERIALIZER_addBeanTypeProperties} setting and is
-	 * provided to customize the behavior of specific serializers in a {@link SerializerGroup}.
+	 * If <jk>true</jk>, non-valid URI characters will be converted to <js>"%xx"</js> sequences.
+	 * Set to <jk>false</jk> if parameter value is being passed to some other code that will already perform
+	 * URL-encoding of non-valid URI characters.
 	 */
-	public static final String UON_addBeanTypeProperties = PREFIX + "addBeanTypeProperties.b";
+	public static final String UON_encodeChars = PREFIX + "encodeChars.b";
 
 	/**
 	 * Configuration property:  Format to use for query/form-data/header values.

http://git-wip-us.apache.org/repos/asf/juneau/blob/4eaa0728/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlParser.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlParser.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlParser.java
index f3cf9ae..378150f 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlParser.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlParser.java
@@ -38,11 +38,28 @@ public class XmlParser extends ReaderParser {
 	private static final String PREFIX = "XmlParser.";
 
 	/**
-	 * Configuration property:  Enable validation.
+	 * Configuration property:  XML event allocator.
 	 *
 	 *	<h5 class='section'>Property:</h5>
 	 * <ul>
-	 * 	<li><b>Name:</b>  <js>"XmlParser.validating.b"</js>
+	 * 	<li><b>Name:</b>  <js>"XmlParser.eventAllocator.c"</js>
+	 * 	<li><b>Data type:</b>  <code>Class&lt;? <jk>extends</jk> {@link XMLEventAllocator}&gt;</code>
+	 * 	<li><b>Default:</b>  <jk>null</jk>
+	 * 	<li><b>Session-overridable:</b>  <jk>true</jk>
+	 * </ul>
+	 *
+	 *	<h5 class='section'>Description:</h5>
+	 * <p>
+	 * Associates an {@link XMLEventAllocator} with this parser.
+	 */
+	public static final String XML_eventAllocator = PREFIX + "eventAllocator.c";
+
+	/**
+	 * Configuration property:  Preserve root element during generalized parsing.
+	 *
+	 *	<h5 class='section'>Property:</h5>
+	 * <ul>
+	 * 	<li><b>Name:</b>  <js>"XmlParser.preserveRootElement.b"</js>
 	 * 	<li><b>Data type:</b>  <code>Boolean</code>
 	 * 	<li><b>Default:</b>  <jk>false</jk>
 	 * 	<li><b>Session-overridable:</b>  <jk>true</jk>
@@ -50,10 +67,24 @@ public class XmlParser extends ReaderParser {
 	 *
 	 *	<h5 class='section'>Description:</h5>
 	 * <p>
-	 * If <jk>true</jk>, XML document will be validated.
-	 * See {@link XMLInputFactory#IS_VALIDATING} for more info.
+	 * If <jk>true</jk>, when parsing into a generic {@link ObjectMap}, the map will contain a single entry whose key
+	 * is the root element name.
+	 *
+	 *	<h5 class='section'>Example:</h5>
+	 * <table class='styled'>
+	 * 	<tr>
+	 * 		<td>XML</td>
+	 * 		<td>ObjectMap.toString(), preserveRootElement==false</td>
+	 * 		<td>ObjectMap.toString(), preserveRootElement==true</td>
+	 * 	</tr>
+	 * 	<tr>
+	 * 		<td><code><xt>&lt;root&gt;&lt;a&gt;</xt>foobar<xt>&lt;/a&gt;&lt;/root&gt;</xt></code></td>
+	 * 		<td><code>{ a:<js>'foobar'</js> }</code></td>
+	 * 		<td><code>{ root: { a:<js>'foobar'</js> }}</code></td>
+	 * 	</tr>
+	 * </table>
 	 */
-	public static final String XML_validating = PREFIX + "validating.b";
+	public static final String XML_preserveRootElement = PREFIX + "preserveRootElement.b";
 
 	/**
 	 * Configuration property:  XML reporter.
@@ -95,28 +126,11 @@ public class XmlParser extends ReaderParser {
 	public static final String XML_resolver = PREFIX + "resolver.c";
 
 	/**
-	 * Configuration property:  XML event allocator.
-	 *
-	 *	<h5 class='section'>Property:</h5>
-	 * <ul>
-	 * 	<li><b>Name:</b>  <js>"XmlParser.eventAllocator.c"</js>
-	 * 	<li><b>Data type:</b>  <code>Class&lt;? <jk>extends</jk> {@link XMLEventAllocator}&gt;</code>
-	 * 	<li><b>Default:</b>  <jk>null</jk>
-	 * 	<li><b>Session-overridable:</b>  <jk>true</jk>
-	 * </ul>
-	 *
-	 *	<h5 class='section'>Description:</h5>
-	 * <p>
-	 * Associates an {@link XMLEventAllocator} with this parser.
-	 */
-	public static final String XML_eventAllocator = PREFIX + "eventAllocator.c";
-
-	/**
-	 * Configuration property:  Preserve root element during generalized parsing.
+	 * Configuration property:  Enable validation.
 	 *
 	 *	<h5 class='section'>Property:</h5>
 	 * <ul>
-	 * 	<li><b>Name:</b>  <js>"XmlParser.preserveRootElement.b"</js>
+	 * 	<li><b>Name:</b>  <js>"XmlParser.validating.b"</js>
 	 * 	<li><b>Data type:</b>  <code>Boolean</code>
 	 * 	<li><b>Default:</b>  <jk>false</jk>
 	 * 	<li><b>Session-overridable:</b>  <jk>true</jk>
@@ -124,24 +138,10 @@ public class XmlParser extends ReaderParser {
 	 *
 	 *	<h5 class='section'>Description:</h5>
 	 * <p>
-	 * If <jk>true</jk>, when parsing into a generic {@link ObjectMap}, the map will contain a single entry whose key
-	 * is the root element name.
-	 *
-	 *	<h5 class='section'>Example:</h5>
-	 * <table class='styled'>
-	 * 	<tr>
-	 * 		<td>XML</td>
-	 * 		<td>ObjectMap.toString(), preserveRootElement==false</td>
-	 * 		<td>ObjectMap.toString(), preserveRootElement==true</td>
-	 * 	</tr>
-	 * 	<tr>
-	 * 		<td><code><xt>&lt;root&gt;&lt;a&gt;</xt>foobar<xt>&lt;/a&gt;&lt;/root&gt;</xt></code></td>
-	 * 		<td><code>{ a:<js>'foobar'</js> }</code></td>
-	 * 		<td><code>{ root: { a:<js>'foobar'</js> }}</code></td>
-	 * 	</tr>
-	 * </table>
+	 * If <jk>true</jk>, XML document will be validated.
+	 * See {@link XMLInputFactory#IS_VALIDATING} for more info.
 	 */
-	public static final String XML_preserveRootElement = PREFIX + "preserveRootElement.b";
+	public static final String XML_validating = PREFIX + "validating.b";
 
 
 	//-------------------------------------------------------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/juneau/blob/4eaa0728/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlSerializer.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlSerializer.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlSerializer.java
index 7c64eac..de105df 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlSerializer.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlSerializer.java
@@ -118,11 +118,11 @@ public class XmlSerializer extends WriterSerializer {
 	private static final String PREFIX = "XmlSerializer.";
 
 	/**
-	 * Configuration property:  Enable support for XML namespaces.
+	 * Configuration property:  Add <js>"_type"</js> properties when needed.
 	 *
 	 *	<h5 class='section'>Property:</h5>
 	 * <ul>
-	 * 	<li><b>Name:</b>  <js>"XmlSerializer.enableNamespaces.b"</js>
+	 * 	<li><b>Name:</b>  <js>"XmlSerializer.addBeanTypeProperties.b"</js>
 	 * 	<li><b>Data type:</b>  <code>Boolean</code>
 	 * 	<li><b>Default:</b>  <jk>false</jk>
 	 * 	<li><b>Session-overridable:</b>  <jk>true</jk>
@@ -130,9 +130,37 @@ public class XmlSerializer extends WriterSerializer {
 	 *
 	 *	<h5 class='section'>Description:</h5>
 	 * <p>
-	 * If not enabled, XML output will not contain any namespaces regardless of any other settings.
+	 * If <jk>true</jk>, then <js>"_type"</js> properties will be added to beans if their type cannot be inferred
+	 * through reflection.
+	 * This is used to recreate the correct objects during parsing if the object types cannot be inferred.
+	 * For example, when serializing a {@code Map<String,Object>} field, where the bean class cannot be determined from
+	 * the value type.
+	 *
+	 * <p>
+	 * When present, this value overrides the {@link #SERIALIZER_addBeanTypeProperties} setting and is
+	 * provided to customize the behavior of specific serializers in a {@link SerializerGroup}.
 	 */
-	public static final String XML_enableNamespaces = PREFIX + "enableNamespaces.b";
+	public static final String XML_addBeanTypeProperties = PREFIX + "addBeanTypeProperties.b";
+
+	/**
+	 * Configuration property:  Add namespace URLs to the root element.
+	 *
+	 *	<h5 class='section'>Property:</h5>
+	 * <ul>
+	 * 	<li><b>Name:</b>  <js>"XmlSerializer.addNamespaceUrisToRoot.b"</js>
+	 * 	<li><b>Data type:</b>  <code>Boolean</code>
+	 * 	<li><b>Default:</b>  <jk>false</jk>
+	 * 	<li><b>Session-overridable:</b>  <jk>true</jk>
+	 * </ul>
+	 *
+	 *	<h5 class='section'>Description:</h5>
+	 * <p>
+	 * Use this setting to add {@code xmlns:x} attributes to the root element for the default and all mapped namespaces.
+	 *
+	 * <p>
+	 * This setting is ignored if {@link #XML_enableNamespaces} is not enabled.
+	 */
+	public static final String XML_addNamespaceUrisToRoot = PREFIX + "addNamespaceUrisToRoot.b";
 
 	/**
 	 * Configuration property:  Auto-detect namespace usage.
@@ -170,26 +198,6 @@ public class XmlSerializer extends WriterSerializer {
 	public static final String XML_autoDetectNamespaces = PREFIX + "autoDetectNamespaces.b";
 
 	/**
-	 * Configuration property:  Add namespace URLs to the root element.
-	 *
-	 *	<h5 class='section'>Property:</h5>
-	 * <ul>
-	 * 	<li><b>Name:</b>  <js>"XmlSerializer.addNamespaceUrisToRoot.b"</js>
-	 * 	<li><b>Data type:</b>  <code>Boolean</code>
-	 * 	<li><b>Default:</b>  <jk>false</jk>
-	 * 	<li><b>Session-overridable:</b>  <jk>true</jk>
-	 * </ul>
-	 *
-	 *	<h5 class='section'>Description:</h5>
-	 * <p>
-	 * Use this setting to add {@code xmlns:x} attributes to the root element for the default and all mapped namespaces.
-	 *
-	 * <p>
-	 * This setting is ignored if {@link #XML_enableNamespaces} is not enabled.
-	 */
-	public static final String XML_addNamespaceUrisToRoot = PREFIX + "addNamespaceUrisToRoot.b";
-
-	/**
 	 * Configuration property:  Default namespace.
 	 *
 	 *	<h5 class='section'>Property:</h5>
@@ -207,22 +215,21 @@ public class XmlSerializer extends WriterSerializer {
 	public static final String XML_defaultNamespace = PREFIX + "defaultNamespace.s";
 
 	/**
-	 * Configuration property:  XMLSchema namespace.
+	 * Configuration property:  Enable support for XML namespaces.
 	 *
 	 *	<h5 class='section'>Property:</h5>
 	 * <ul>
-	 * 	<li><b>Name:</b>  <js>"XmlSerializer.xsNamespace.s"</js>
-	 * 	<li><b>Data type:</b>  <code>String</code> ({@link Namespace})
-	 * 	<li><b>Default:</b>  <js>"xs: http://www.w3.org/2001/XMLSchema"</js>
+	 * 	<li><b>Name:</b>  <js>"XmlSerializer.enableNamespaces.b"</js>
+	 * 	<li><b>Data type:</b>  <code>Boolean</code>
+	 * 	<li><b>Default:</b>  <jk>false</jk>
 	 * 	<li><b>Session-overridable:</b>  <jk>true</jk>
 	 * </ul>
 	 *
 	 *	<h5 class='section'>Description:</h5>
 	 * <p>
-	 * Specifies the namespace for the <code>XMLSchema</code> namespace, used by the schema generated by the
-	 * {@link XmlSchemaSerializer} class.
+	 * If not enabled, XML output will not contain any namespaces regardless of any other settings.
 	 */
-	public static final String XML_xsNamespace = PREFIX + "xsNamespace.s";
+	public static final String XML_enableNamespaces = PREFIX + "enableNamespaces.b";
 
 	/**
 	 * Configuration property:  Default namespaces.
@@ -242,29 +249,22 @@ public class XmlSerializer extends WriterSerializer {
 	public static final String XML_namespaces = PREFIX + "namespaces.ls";
 
 	/**
-	 * Configuration property:  Add <js>"_type"</js> properties when needed.
+	 * Configuration property:  XMLSchema namespace.
 	 *
 	 *	<h5 class='section'>Property:</h5>
 	 * <ul>
-	 * 	<li><b>Name:</b>  <js>"XmlSerializer.addBeanTypeProperties.b"</js>
-	 * 	<li><b>Data type:</b>  <code>Boolean</code>
-	 * 	<li><b>Default:</b>  <jk>false</jk>
+	 * 	<li><b>Name:</b>  <js>"XmlSerializer.xsNamespace.s"</js>
+	 * 	<li><b>Data type:</b>  <code>String</code> ({@link Namespace})
+	 * 	<li><b>Default:</b>  <js>"xs: http://www.w3.org/2001/XMLSchema"</js>
 	 * 	<li><b>Session-overridable:</b>  <jk>true</jk>
 	 * </ul>
 	 *
 	 *	<h5 class='section'>Description:</h5>
 	 * <p>
-	 * If <jk>true</jk>, then <js>"_type"</js> properties will be added to beans if their type cannot be inferred
-	 * through reflection.
-	 * This is used to recreate the correct objects during parsing if the object types cannot be inferred.
-	 * For example, when serializing a {@code Map<String,Object>} field, where the bean class cannot be determined from
-	 * the value type.
-	 *
-	 * <p>
-	 * When present, this value overrides the {@link #SERIALIZER_addBeanTypeProperties} setting and is
-	 * provided to customize the behavior of specific serializers in a {@link SerializerGroup}.
+	 * Specifies the namespace for the <code>XMLSchema</code> namespace, used by the schema generated by the
+	 * {@link XmlSchemaSerializer} class.
 	 */
-	public static final String XML_addBeanTypeProperties = PREFIX + "addBeanTypeProperties.b";
+	public static final String XML_xsNamespace = PREFIX + "xsNamespace.s";
 
 
 	//-------------------------------------------------------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/juneau/blob/4eaa0728/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlSerializer.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlSerializer.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlSerializer.java
index a13e4ac..6f42fc5 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlSerializer.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlSerializer.java
@@ -85,11 +85,11 @@ public class YamlSerializer extends WriterSerializer {
 	private static final String PREFIX = "YamlSerializer.";
 
 	/**
-	 * Configuration property:  Simple JSON mode.
+	 * Configuration property:  Add <js>"_type"</js> properties when needed.
 	 *
 	 *	<h5 class='section'>Property:</h5>
 	 * <ul>
-	 * 	<li><b>Name:</b>  <js>"JsonSerializer.simpleMode.b"</js>
+	 * 	<li><b>Name:</b>  <js>"JsonSerializer.addBeanTypeProperties.b"</js>
 	 * 	<li><b>Data type:</b>  <code>Boolean</code>
 	 * 	<li><b>Default:</b>  <jk>false</jk>
 	 * 	<li><b>Session-overridable:</b>  <jk>true</jk>
@@ -97,10 +97,17 @@ public class YamlSerializer extends WriterSerializer {
 	 *
 	 *	<h5 class='section'>Description:</h5>
 	 * <p>
-	 * If <jk>true</jk>, JSON attribute names will only be quoted when necessary.
-	 * Otherwise, they are always quoted.
+	 * If <jk>true</jk>, then <js>"_type"</js> properties will be added to beans if their type cannot be inferred
+	 * through reflection.
+	 * This is used to recreate the correct objects during parsing if the object types cannot be inferred.
+	 * For example, when serializing a {@code Map<String,Object>} field, where the bean class cannot be determined from
+	 * the value type.
+	 *
+	 * <p>
+	 * When present, this value overrides the {@link #SERIALIZER_addBeanTypeProperties} setting and is
+	 * provided to customize the behavior of specific serializers in a {@link SerializerGroup}.
 	 */
-	public static final String YAML_simpleMode = PREFIX + "simpleMode.b";
+	public static final String YAML_addBeanTypeProperties = PREFIX + "addBeanTypeProperties.b";
 
 	/**
 	 * Configuration property:  Prefix solidus <js>'/'</js> characters with escapes.
@@ -123,11 +130,11 @@ public class YamlSerializer extends WriterSerializer {
 	public static final String YAML_escapeSolidus = PREFIX + "escapeSolidus.b";
 
 	/**
-	 * Configuration property:  Add <js>"_type"</js> properties when needed.
+	 * Configuration property:  Simple JSON mode.
 	 *
 	 *	<h5 class='section'>Property:</h5>
 	 * <ul>
-	 * 	<li><b>Name:</b>  <js>"JsonSerializer.addBeanTypeProperties.b"</js>
+	 * 	<li><b>Name:</b>  <js>"JsonSerializer.simpleMode.b"</js>
 	 * 	<li><b>Data type:</b>  <code>Boolean</code>
 	 * 	<li><b>Default:</b>  <jk>false</jk>
 	 * 	<li><b>Session-overridable:</b>  <jk>true</jk>
@@ -135,17 +142,10 @@ public class YamlSerializer extends WriterSerializer {
 	 *
 	 *	<h5 class='section'>Description:</h5>
 	 * <p>
-	 * If <jk>true</jk>, then <js>"_type"</js> properties will be added to beans if their type cannot be inferred
-	 * through reflection.
-	 * This is used to recreate the correct objects during parsing if the object types cannot be inferred.
-	 * For example, when serializing a {@code Map<String,Object>} field, where the bean class cannot be determined from
-	 * the value type.
-	 *
-	 * <p>
-	 * When present, this value overrides the {@link #SERIALIZER_addBeanTypeProperties} setting and is
-	 * provided to customize the behavior of specific serializers in a {@link SerializerGroup}.
+	 * If <jk>true</jk>, JSON attribute names will only be quoted when necessary.
+	 * Otherwise, they are always quoted.
 	 */
-	public static final String YAML_addBeanTypeProperties = PREFIX + "addBeanTypeProperties.b";
+	public static final String YAML_simpleMode = PREFIX + "simpleMode.b";
 
 
 	//-------------------------------------------------------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/juneau/blob/4eaa0728/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestClient.java
----------------------------------------------------------------------
diff --git a/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestClient.java b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestClient.java
index 43d8599..d969a80 100644
--- a/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestClient.java
+++ b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestClient.java
@@ -71,104 +71,65 @@ public class RestClient extends BeanContext {
 	private static final String PREFIX = "RestClient.";
 
 	/**
-	 * Configuration property:  Keep HttpClient open.
-	 *
-	 *	<h5 class='section'>Property:</h5>
-	 * <ul>
-	 * 	<li><b>Name:</b>  <js>"RestClient.keepHttpClientOpen.b"</js>
-	 * 	<li><b>Data type:</b>  <code>Boolean</code>
-	 * 	<li><b>Default:</b>  <jk>false</jk>
-	 * </ul>
-	 *
-	 *	<h5 class='section'>Description:</h5>
-	 * <p>
-	 * Don't close this client when the {@link RestClient#close()} method is called.
-	 */
-	public static final String RESTCLIENT_keepHttpClientOpen = PREFIX + "keepHttpClientOpen.b";
-	
-	/**
-	 * Configuration property:  Shut down executor service on close.</b>  
+	 * Configuration property:  Debug.
 	 *
 	 *	<h5 class='section'>Property:</h5>
 	 * <ul>
-	 * 	<li><b>Name:</b>  <js>"RestClient.executorServiceShutdownOnClose.b"</js>
+	 * 	<li><b>Name:</b>  <js>"RestClient.debug.b"</js>
 	 * 	<li><b>Data type:</b>  <code>Boolean</code>
 	 * 	<li><b>Default:</b>  <jk>false</jk>
 	 * </ul>
 	 *
 	 *	<h5 class='section'>Description:</h5>
 	 * <p>
-	 * Call {@link ExecutorService#shutdown()} when {@link RestClient#close()} is called.
+	 * Enable debug mode.
 	 */
-	public static final String RESTCLIENT_executorServiceShutdownOnClose = PREFIX + "executorServiceShutdownOnClose.b";
+	public static final String RESTCLIENT_debug = PREFIX + "debug.b";
 	
 	/**
-	 * Configuration property:  Number of retries to attempt.
+	 * Configuration property:  Executor service.
 	 *
 	 *	<h5 class='section'>Property:</h5>
 	 * <ul>
-	 * 	<li><b>Name:</b>  <js>"RestClient.retries.i"</js>
-	 * 	<li><b>Data type:</b>  <code>Integer</code>
-	 * 	<li><b>Default:</b>  <code>1</code>
+	 * 	<li><b>Name:</b>  <js>"RestClient.executorService.o"</js>
+	 * 	<li><b>Data type:</b>  <code>Class&lt;? <jk>implements</jk> ExecutorService&gt;</code> or {@link ExecutorService}.
+	 * 	<li><b>Default:</b>  <jk>null</jk>.
 	 * </ul>
-	 *
+	 * 
 	 *	<h5 class='section'>Description:</h5>
-	 * <p>
-	 * The number of retries to attempt when the connection cannot be made or a <code>&gt;400</code> response is received.
-	 */
-	public static final String RESTCLIENT_retries = PREFIX + "retries.i";
-	
-	/**
-	 * Configuration property:  The time in milliseconds between retry attempts.
-	 *
-	 *	<h5 class='section'>Property:</h5>
-	 * <ul>
-	 * 	<li><b>Name:</b>  <js>"RestClient.retryInterval.i"</js>
-	 * 	<li><b>Data type:</b>  <code>Integer</code>
-	 * 	<li><b>Default:</b>  <code>-1</code>
-	 * </ul>
+	 *	<p>
+	 * Defines the executor service to use when calling future methods on the {@link RestCall} class.
 	 *
-	 *	<h5 class='section'>Description:</h5>
 	 * <p>
-	 * The time in milliseconds between retry attempts.
-	 * <code>-1</code> means retry immediately.
-	 */
-	public static final String RESTCLIENT_retryInterval = PREFIX + "retryInterval.i";
-	
-	/**
-	 * Configuration property:  Retry-on determination object.
-	 *
-	 *	<h5 class='section'>Property:</h5>
+	 * This executor service is used to create {@link Future} objects on the following methods:
 	 * <ul>
-	 * 	<li><b>Name:</b>  <js>"RestClient.retryOn.o"</js>
-	 * 	<li><b>Data type:</b>  <code>Class&lt;? extends {@link RetryOn}</code> or {@link RetryOn}
-	 * 	<li><b>Default:</b>  {@link RetryOn#DEFAULT}
+	 * 	<li>{@link RestCall#runFuture()}
+	 * 	<li>{@link RestCall#getResponseFuture(Class)}
+	 * 	<li>{@link RestCall#getResponseFuture(Type,Type...)}
+	 * 	<li>{@link RestCall#getResponseAsString()}
 	 * </ul>
 	 *
-	 *	<h5 class='section'>Description:</h5>
 	 * <p>
-	 * Object used for determining whether a retry should be attempted.
+	 * The default executor service is a single-threaded {@link ThreadPoolExecutor} with a 30 second timeout
+	 * and a queue size of 10.
 	 */
-	public static final String RESTCLIENT_retryOn = PREFIX + "retryOn.o";
-	
+	public static final String RESTCLIENT_executorService = PREFIX + "executorService.o";
+
 	/**
-	 * Configuration property:  Root URI.
+	 * Configuration property:  Shut down executor service on close.</b>  
 	 *
 	 *	<h5 class='section'>Property:</h5>
 	 * <ul>
-	 * 	<li><b>Name:</b>  <js>"RestClient.rootUri.s"</js>
-	 * 	<li><b>Data type:</b>  <code>String</code>
+	 * 	<li><b>Name:</b>  <js>"RestClient.executorServiceShutdownOnClose.b"</js>
+	 * 	<li><b>Data type:</b>  <code>Boolean</code>
 	 * 	<li><b>Default:</b>  <jk>false</jk>
 	 * </ul>
 	 *
 	 *	<h5 class='section'>Description:</h5>
 	 * <p>
-	 * When set, relative URL strings passed in through the various rest call methods (e.g. {@link RestClient#doGet(Object)}
-	 * will be prefixed with the specified root.
-	 * This root URL is ignored on those methods if you pass in a {@link URL}, {@link URI}, or an absolute URL string.
-	 * Trailing slashes are trimmed.
+	 * Call {@link ExecutorService#shutdown()} when {@link RestClient#close()} is called.
 	 */
-	public static final String RESTCLIENT_rootUri = PREFIX + "rootUri.s";
+	public static final String RESTCLIENT_executorServiceShutdownOnClose = PREFIX + "executorServiceShutdownOnClose.b";
 	
 	/**
 	 * Configuration property:  Request headers.
@@ -187,37 +148,42 @@ public class RestClient extends BeanContext {
 	public static final String RESTCLIENT_headers = PREFIX + "headers.sms";
 
 	/**
-	 * Configuration property:  Request query parameters.
+	 * Configuration property:  Call interceptors.
 	 *
 	 *	<h5 class='section'>Property:</h5>
 	 * <ul>
-	 * 	<li><b>Name:</b>  <js>"RestClient.query.sms"</js>
-	 * 	<li><b>Data type:</b>  <code>Map&lt;String,String&gt;</code>
-	 * 	<li><b>Default:</b>  empty map
+	 * 	<li><b>Name:</b>  <js>"RestClient.interceptors.lo"</js>
+	 * 	<li><b>Data type:</b>  <code>List&lt;Class&lt;? <jk>implements</jk> RestCallInterceptor | RestCallInterceptor</code>&gt.</code>
+	 * 	<li><b>Default:</b>  empty list.
 	 * </ul>
-	 *
+	 * 
 	 *	<h5 class='section'>Description:</h5>
-	 * <p>
-	 * Query parameters to add to every request.
+	 *	<p>
+	 * Interceptors that get called immediately after a connection is made.
 	 */
-	public static final String RESTCLIENT_query = PREFIX + "query.sms";
+	public static final String RESTCLIENT_interceptors = PREFIX + "interceptors.lo";
 
 	/**
-	 * Configuration property:  Serializer.
+	 * Add to the Call interceptors property.
+	 */
+	public static final String RESTCLIENT_interceptors_add = PREFIX + "interceptors.lo/add";
+
+	/**
+	 * Configuration property:  Keep HttpClient open.
 	 *
 	 *	<h5 class='section'>Property:</h5>
 	 * <ul>
-	 * 	<li><b>Name:</b>  <js>"RestClient.serializer.o"</js>
-	 * 	<li><b>Data type:</b>  <code>Class&lt;? <jk>extends</jk> Serializer&gt;</code> or {@link Serializer}.
-	 * 	<li><b>Default:</b>  {@link JsonSerializer};
+	 * 	<li><b>Name:</b>  <js>"RestClient.keepHttpClientOpen.b"</js>
+	 * 	<li><b>Data type:</b>  <code>Boolean</code>
+	 * 	<li><b>Default:</b>  <jk>false</jk>
 	 * </ul>
-	 * 
+	 *
 	 *	<h5 class='section'>Description:</h5>
 	 * <p>
-	 * The serializer to use for serializing POJOs in request bodies.
+	 * Don't close this client when the {@link RestClient#close()} method is called.
 	 */
-	public static final String RESTCLIENT_serializer = PREFIX + "serializer.o";
-
+	public static final String RESTCLIENT_keepHttpClientOpen = PREFIX + "keepHttpClientOpen.b";
+	
 	/**
 	 * Configuration property:  Parser.
 	 *
@@ -251,71 +217,105 @@ public class RestClient extends BeanContext {
 	public static final String RESTCLIENT_partSerializer = PREFIX + "partSerializer.o";
 	
 	/**
-	 * Configuration property:  Executor service.
+	 * Configuration property:  Request query parameters.
 	 *
 	 *	<h5 class='section'>Property:</h5>
 	 * <ul>
-	 * 	<li><b>Name:</b>  <js>"RestClient.executorService.o"</js>
-	 * 	<li><b>Data type:</b>  <code>Class&lt;? <jk>implements</jk> ExecutorService&gt;</code> or {@link ExecutorService}.
-	 * 	<li><b>Default:</b>  <jk>null</jk>.
+	 * 	<li><b>Name:</b>  <js>"RestClient.query.sms"</js>
+	 * 	<li><b>Data type:</b>  <code>Map&lt;String,String&gt;</code>
+	 * 	<li><b>Default:</b>  empty map
 	 * </ul>
-	 * 
-	 *	<h5 class='section'>Description:</h5>
-	 *	<p>
-	 * Defines the executor service to use when calling future methods on the {@link RestCall} class.
 	 *
+	 *	<h5 class='section'>Description:</h5>
 	 * <p>
-	 * This executor service is used to create {@link Future} objects on the following methods:
+	 * Query parameters to add to every request.
+	 */
+	public static final String RESTCLIENT_query = PREFIX + "query.sms";
+
+	/**
+	 * Configuration property:  Number of retries to attempt.
+	 *
+	 *	<h5 class='section'>Property:</h5>
 	 * <ul>
-	 * 	<li>{@link RestCall#runFuture()}
-	 * 	<li>{@link RestCall#getResponseFuture(Class)}
-	 * 	<li>{@link RestCall#getResponseFuture(Type,Type...)}
-	 * 	<li>{@link RestCall#getResponseAsString()}
+	 * 	<li><b>Name:</b>  <js>"RestClient.retries.i"</js>
+	 * 	<li><b>Data type:</b>  <code>Integer</code>
+	 * 	<li><b>Default:</b>  <code>1</code>
 	 * </ul>
 	 *
+	 *	<h5 class='section'>Description:</h5>
 	 * <p>
-	 * The default executor service is a single-threaded {@link ThreadPoolExecutor} with a 30 second timeout
-	 * and a queue size of 10.
+	 * The number of retries to attempt when the connection cannot be made or a <code>&gt;400</code> response is received.
 	 */
-	public static final String RESTCLIENT_executorService = PREFIX + "executorService.o";
-
+	public static final String RESTCLIENT_retries = PREFIX + "retries.i";
+	
 	/**
-	 * Configuration property:  Call interceptors.
+	 * Configuration property:  The time in milliseconds between retry attempts.
 	 *
 	 *	<h5 class='section'>Property:</h5>
 	 * <ul>
-	 * 	<li><b>Name:</b>  <js>"RestClient.interceptors.lo"</js>
-	 * 	<li><b>Data type:</b>  <code>List&lt;Class&lt;? <jk>implements</jk> RestCallInterceptor | RestCallInterceptor</code>&gt.</code>
-	 * 	<li><b>Default:</b>  empty list.
+	 * 	<li><b>Name:</b>  <js>"RestClient.retryInterval.i"</js>
+	 * 	<li><b>Data type:</b>  <code>Integer</code>
+	 * 	<li><b>Default:</b>  <code>-1</code>
 	 * </ul>
-	 * 
+	 *
 	 *	<h5 class='section'>Description:</h5>
-	 *	<p>
-	 * Interceptors that get called immediately after a connection is made.
+	 * <p>
+	 * The time in milliseconds between retry attempts.
+	 * <code>-1</code> means retry immediately.
 	 */
-	public static final String RESTCLIENT_interceptors = PREFIX + "interceptors.lo";
-
+	public static final String RESTCLIENT_retryInterval = PREFIX + "retryInterval.i";
+	
 	/**
-	 * Add to the Call interceptors property.
+	 * Configuration property:  Retry-on determination object.
+	 *
+	 *	<h5 class='section'>Property:</h5>
+	 * <ul>
+	 * 	<li><b>Name:</b>  <js>"RestClient.retryOn.o"</js>
+	 * 	<li><b>Data type:</b>  <code>Class&lt;? extends {@link RetryOn}</code> or {@link RetryOn}
+	 * 	<li><b>Default:</b>  {@link RetryOn#DEFAULT}
+	 * </ul>
+	 *
+	 *	<h5 class='section'>Description:</h5>
+	 * <p>
+	 * Object used for determining whether a retry should be attempted.
 	 */
-	public static final String RESTCLIENT_interceptors_add = PREFIX + "interceptors.lo/add";
-
+	public static final String RESTCLIENT_retryOn = PREFIX + "retryOn.o";
+	
 	/**
-	 * Configuration property:  Debug.
+	 * Configuration property:  Root URI.
 	 *
 	 *	<h5 class='section'>Property:</h5>
 	 * <ul>
-	 * 	<li><b>Name:</b>  <js>"RestClient.debug.b"</js>
-	 * 	<li><b>Data type:</b>  <code>Boolean</code>
+	 * 	<li><b>Name:</b>  <js>"RestClient.rootUri.s"</js>
+	 * 	<li><b>Data type:</b>  <code>String</code>
 	 * 	<li><b>Default:</b>  <jk>false</jk>
 	 * </ul>
 	 *
 	 *	<h5 class='section'>Description:</h5>
 	 * <p>
-	 * Enable debug mode.
+	 * When set, relative URL strings passed in through the various rest call methods (e.g. {@link RestClient#doGet(Object)}
+	 * will be prefixed with the specified root.
+	 * This root URL is ignored on those methods if you pass in a {@link URL}, {@link URI}, or an absolute URL string.
+	 * Trailing slashes are trimmed.
 	 */
-	public static final String RESTCLIENT_debug = PREFIX + "debug.b";
+	public static final String RESTCLIENT_rootUri = PREFIX + "rootUri.s";
 	
+	/**
+	 * Configuration property:  Serializer.
+	 *
+	 *	<h5 class='section'>Property:</h5>
+	 * <ul>
+	 * 	<li><b>Name:</b>  <js>"RestClient.serializer.o"</js>
+	 * 	<li><b>Data type:</b>  <code>Class&lt;? <jk>extends</jk> Serializer&gt;</code> or {@link Serializer}.
+	 * 	<li><b>Default:</b>  {@link JsonSerializer};
+	 * </ul>
+	 * 
+	 *	<h5 class='section'>Description:</h5>
+	 * <p>
+	 * The serializer to use for serializing POJOs in request bodies.
+	 */
+	public static final String RESTCLIENT_serializer = PREFIX + "serializer.o";
+
 
 	private static final ConcurrentHashMap<Class,HttpPartSerializer> partSerializerCache = new ConcurrentHashMap<>();
 	


Mime
View raw message