| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>MockRestClientBuilder (Apache Juneau 8.1.4)</title> |
| <link rel="stylesheet" type="text/css" href="../../../../../javadoc.css" title="Style"> |
| <script type="text/javascript" src="../../../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="MockRestClientBuilder (Apache Juneau 8.1.4)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":10,"i34":10,"i35":10,"i36":10,"i37":10,"i38":10,"i39":10,"i40":10,"i41":10,"i42":10,"i43":10,"i44":10,"i45":10,"i46":10,"i47":10,"i48":10,"i49":10,"i50":10,"i51":10,"i52":10,"i53":10,"i54":10,"i55":10,"i56":10,"i57":10,"i58":10,"i59":10,"i60":10,"i61":10,"i62":10,"i63":10,"i64":10,"i65":10,"i66":10,"i67":10,"i68":10,"i69":10,"i70":10,"i71":10,"i72":10,"i73":10,"i74":10,"i75":10,"i76":10,"i77":10,"i78":10,"i79":10,"i80":10,"i81":10,"i82":10,"i83":10,"i84":10,"i85":10,"i86":10,"i87":10,"i88":10,"i89":10,"i90":10,"i91":10,"i92":10,"i93":10,"i94":10,"i95":10,"i96":10,"i97":10,"i98":10,"i99":10,"i100":10,"i101":10,"i102":10,"i103":10,"i104":10,"i105":10,"i106":10,"i107":10,"i108":10,"i109":10,"i110":10,"i111":10,"i112":10,"i113":10,"i114":10,"i115":10,"i116":10,"i117":10,"i118":10,"i119":10,"i120":10,"i121":10,"i122":10,"i123":10,"i124":10,"i125":10,"i126":10,"i127":10,"i128":10,"i129":10,"i130":10,"i131":10,"i132":10,"i133":10,"i134":10,"i135":10,"i136":10,"i137":10,"i138":10,"i139":10,"i140":10,"i141":10,"i142":10,"i143":10,"i144":10,"i145":10,"i146":10,"i147":10,"i148":10,"i149":10,"i150":10,"i151":10,"i152":10,"i153":10,"i154":10,"i155":10,"i156":10,"i157":10,"i158":10,"i159":10,"i160":10,"i161":10,"i162":10,"i163":10,"i164":10,"i165":10,"i166":10,"i167":10,"i168":10,"i169":10,"i170":10,"i171":10,"i172":10,"i173":10,"i174":10,"i175":10,"i176":10,"i177":10,"i178":10,"i179":10,"i180":10,"i181":10,"i182":10,"i183":10,"i184":10,"i185":10,"i186":10,"i187":10,"i188":10,"i189":10,"i190":10,"i191":10,"i192":10,"i193":10,"i194":10,"i195":10,"i196":10,"i197":10,"i198":10,"i199":10,"i200":10,"i201":10,"i202":10,"i203":10,"i204":10,"i205":10,"i206":10,"i207":10,"i208":10,"i209":10,"i210":10,"i211":10,"i212":10,"i213":10,"i214":10,"i215":10,"i216":10,"i217":10,"i218":10,"i219":10,"i220":10,"i221":10,"i222":10,"i223":10,"i224":10,"i225":10,"i226":10,"i227":10,"i228":10,"i229":10,"i230":10,"i231":10,"i232":10,"i233":10,"i234":10,"i235":10,"i236":10,"i237":10,"i238":10,"i239":10,"i240":10,"i241":10,"i242":10,"i243":10,"i244":10,"i245":10,"i246":10,"i247":10,"i248":10,"i249":10,"i250":10}; |
| var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClient.html" title="class in org.apache.juneau.rest.mock2"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/juneau/rest/mock2/MockRestRequest.html" title="class in org.apache.juneau.rest.mock2"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/juneau/rest/mock2/MockRestClientBuilder.html" target="_top">Frames</a></li> |
| <li><a href="MockRestClientBuilder.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.apache.juneau.rest.mock2</div> |
| <h2 title="Class MockRestClientBuilder" class="title">Class MockRestClientBuilder</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li><a href="../../../../../org/apache/juneau/ContextBuilder.html" title="class in org.apache.juneau">org.apache.juneau.ContextBuilder</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li><a href="../../../../../org/apache/juneau/BeanContextBuilder.html" title="class in org.apache.juneau">org.apache.juneau.BeanContextBuilder</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">org.apache.juneau.rest.client2.RestClientBuilder</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.juneau.rest.mock2.MockRestClientBuilder</li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre>public class <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.65">MockRestClientBuilder</a> |
| extends <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></pre> |
| <div class="block">Builder class for <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClient.html" title="class in org.apache.juneau.rest.mock2"><code>MockRestClient</code></a> objects. |
| |
| <ul class='seealso'> |
| <li class='link'><a class='doclink' href='../../../../../overview-summary.html#juneau-rest-mock'>Overview > juneau-rest-mock</a> |
| </ul></div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier</th> |
| <th class="colLast" scope="col">Constructor and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected </code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#MockRestClientBuilder--">MockRestClientBuilder</a></span>()</code> |
| <div class="block">No-arg constructor.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected </code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#MockRestClientBuilder-org.apache.juneau.PropertyStore-">MockRestClientBuilder</a></span>(<a href="../../../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau">PropertyStore</a> ps)</code> |
| <div class="block">Constructor.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#accept-java.lang.Object-">accept</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> |
| <div class="block">Sets the value for the <c>Accept</c> request header on all requests.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#acceptCharset-java.lang.Object-">acceptCharset</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> |
| <div class="block">Sets the value for the <c>Accept-Charset</c> request header on all requests.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#acceptEncoding-java.lang.Object-">acceptEncoding</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> |
| <div class="block">Sets the value for the <c>Accept-Encoding</c> request header on all requests.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#acceptLanguage-java.lang.Object-">acceptLanguage</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> |
| <div class="block">Sets the value for the <c>Accept-Language</c> request header on all requests.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#add-java.util.Map-">add</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>> properties)</code> |
| <div class="block">Adds multiple free-form configuration properties on this object without first clearing out any previous values.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#addBeanTypes--">addBeanTypes</a></span>()</code> |
| <div class="block"><i><l>Serializer</l> configuration property: </i> Add <js>"_type"</js> properties when needed.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#addInterceptorFirst-org.apache.http.HttpRequestInterceptor-">addInterceptorFirst</a></span>(<a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/HttpRequestInterceptor.html?is-external=true" title="class or interface in org.apache.http">HttpRequestInterceptor</a> itcp)</code> |
| <div class="block">Adds this protocol interceptor to the head of the protocol processing list.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#addInterceptorFirst-org.apache.http.HttpResponseInterceptor-">addInterceptorFirst</a></span>(<a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/HttpResponseInterceptor.html?is-external=true" title="class or interface in org.apache.http">HttpResponseInterceptor</a> itcp)</code> |
| <div class="block">Adds this protocol interceptor to the head of the protocol processing list.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#addInterceptorLast-org.apache.http.HttpRequestInterceptor-">addInterceptorLast</a></span>(<a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/HttpRequestInterceptor.html?is-external=true" title="class or interface in org.apache.http">HttpRequestInterceptor</a> itcp)</code> |
| <div class="block">Adds this protocol interceptor to the tail of the protocol processing list.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#addInterceptorLast-org.apache.http.HttpResponseInterceptor-">addInterceptorLast</a></span>(<a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/HttpResponseInterceptor.html?is-external=true" title="class or interface in org.apache.http">HttpResponseInterceptor</a> itcp)</code> |
| <div class="block">Adds this protocol interceptor to the tail of the protocol processing list.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#addRootType--">addRootType</a></span>()</code> |
| <div class="block"><i><l>Serializer</l> configuration property: </i> Add type attribute to root nodes.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#addTo-java.lang.String-java.lang.Object-">addTo</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> |
| <div class="block">Adds a free-form value to a SET property.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#annotations-java.lang.annotation.Annotation...-">annotations</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Annotation.html?is-external=true" title="class or interface in java.lang.annotation">Annotation</a>... values)</code> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Dynamically applied POJO annotations.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#appendTo-java.lang.String-java.lang.Object-">appendTo</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> |
| <div class="block">Adds a free-form value to the end of a LIST property.</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#apply-org.apache.juneau.PropertyStore-">apply</a></span>(<a href="../../../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau">PropertyStore</a> copyFrom)</code> |
| <div class="block">Copies the settings from the specified property store into this builder.</div> |
| </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#applyAnnotations-org.apache.juneau.reflect.AnnotationList-org.apache.juneau.svl.VarResolverSession-">applyAnnotations</a></span>(<a href="../../../../../org/apache/juneau/reflect/AnnotationList.html" title="class in org.apache.juneau.reflect">AnnotationList</a> al, |
| <a href="../../../../../org/apache/juneau/svl/VarResolverSession.html" title="class in org.apache.juneau.svl">VarResolverSession</a> r)</code> |
| <div class="block">Applies a set of annotations to this property store.</div> |
| </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#applyAnnotations-java.lang.Class...-">applyAnnotations</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?>... fromClasses)</code> |
| <div class="block">Applies any of the various <ja>@XConfig</ja> annotations on the specified class to this context.</div> |
| </td> |
| </tr> |
| <tr id="i17" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#applyAnnotations-java.lang.reflect.Method...-">applyAnnotations</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Method.html?is-external=true" title="class or interface in java.lang.reflect">Method</a>... fromMethods)</code> |
| <div class="block">Applies any of the various <ja>@XConfig</ja> annotations on the specified method to this context.</div> |
| </td> |
| </tr> |
| <tr id="i18" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#authorization-java.lang.Object-">authorization</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> |
| <div class="block">Sets the value for the <c>Authorization</c> request header on all requests.</div> |
| </td> |
| </tr> |
| <tr id="i19" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#backoffManager-org.apache.http.client.BackoffManager-">backoffManager</a></span>(<a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/BackoffManager.html?is-external=true" title="class or interface in org.apache.http.client">BackoffManager</a> backoffManager)</code> |
| <div class="block">Assigns <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/BackoffManager.html?is-external=true" title="class or interface in org.apache.http.client"><code>BackoffManager</code></a> instance.</div> |
| </td> |
| </tr> |
| <tr id="i20" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#basicAuth-java.lang.String-int-java.lang.String-java.lang.String-">basicAuth</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> host, |
| int port, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> user, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> pw)</code> |
| <div class="block">Set up this client to use BASIC auth.</div> |
| </td> |
| </tr> |
| <tr id="i21" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#beanClassVisibility-org.apache.juneau.Visibility-">beanClassVisibility</a></span>(<a href="../../../../../org/apache/juneau/Visibility.html" title="enum in org.apache.juneau">Visibility</a> value)</code> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Minimum bean class visibility.</div> |
| </td> |
| </tr> |
| <tr id="i22" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#beanConstructorVisibility-org.apache.juneau.Visibility-">beanConstructorVisibility</a></span>(<a href="../../../../../org/apache/juneau/Visibility.html" title="enum in org.apache.juneau">Visibility</a> value)</code> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Minimum bean constructor visibility.</div> |
| </td> |
| </tr> |
| <tr id="i23" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#beanFieldVisibility-org.apache.juneau.Visibility-">beanFieldVisibility</a></span>(<a href="../../../../../org/apache/juneau/Visibility.html" title="enum in org.apache.juneau">Visibility</a> value)</code> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Minimum bean field visibility.</div> |
| </td> |
| </tr> |
| <tr id="i24" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#beanInterceptor-java.lang.Class-java.lang.Class-">beanInterceptor</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> on, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="../../../../../org/apache/juneau/transform/BeanInterceptor.html" title="class in org.apache.juneau.transform">BeanInterceptor</a><?>> value)</code> |
| <div class="block">Bean interceptor.</div> |
| </td> |
| </tr> |
| <tr id="i25" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#beanMethodVisibility-org.apache.juneau.Visibility-">beanMethodVisibility</a></span>(<a href="../../../../../org/apache/juneau/Visibility.html" title="enum in org.apache.juneau">Visibility</a> value)</code> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Minimum bean method visibility.</div> |
| </td> |
| </tr> |
| <tr id="i26" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#beansDontRequireSomeProperties--">beansDontRequireSomeProperties</a></span>()</code> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Beans require at least one property.</div> |
| </td> |
| </tr> |
| <tr id="i27" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#beansRequireDefaultConstructor--">beansRequireDefaultConstructor</a></span>()</code> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Beans require no-arg constructors.</div> |
| </td> |
| </tr> |
| <tr id="i28" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#beansRequireSerializable--">beansRequireSerializable</a></span>()</code> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Beans require Serializable interface.</div> |
| </td> |
| </tr> |
| <tr id="i29" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#beansRequireSettersForGetters--">beansRequireSettersForGetters</a></span>()</code> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Beans require setters for getters.</div> |
| </td> |
| </tr> |
| <tr id="i30" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#bpi-java.lang.Class-java.lang.String-">bpi</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> beanClass, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> properties)</code> |
| <div class="block">Bean property includes.</div> |
| </td> |
| </tr> |
| <tr id="i31" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#bpi-java.util.Map-">bpi</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>> values)</code> |
| <div class="block">Bean property includes.</div> |
| </td> |
| </tr> |
| <tr id="i32" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#bpi-java.lang.String-java.lang.String-">bpi</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> beanClassName, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> properties)</code> |
| <div class="block">Bean property includes.</div> |
| </td> |
| </tr> |
| <tr id="i33" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#bpro-java.lang.Class-java.lang.String-">bpro</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> beanClass, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> properties)</code> |
| <div class="block">Read-only bean properties.</div> |
| </td> |
| </tr> |
| <tr id="i34" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#bpro-java.util.Map-">bpro</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>> values)</code> |
| <div class="block">Read-only bean properties.</div> |
| </td> |
| </tr> |
| <tr id="i35" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#bpro-java.lang.String-java.lang.String-">bpro</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> beanClassName, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> properties)</code> |
| <div class="block">Read-only bean properties.</div> |
| </td> |
| </tr> |
| <tr id="i36" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#bpwo-java.lang.Class-java.lang.String-">bpwo</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> beanClass, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> properties)</code> |
| <div class="block">Write-only bean properties.</div> |
| </td> |
| </tr> |
| <tr id="i37" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#bpwo-java.util.Map-">bpwo</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>> values)</code> |
| <div class="block">Write-only bean properties.</div> |
| </td> |
| </tr> |
| <tr id="i38" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#bpwo-java.lang.String-java.lang.String-">bpwo</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> beanClassName, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> properties)</code> |
| <div class="block">Write-only bean properties.</div> |
| </td> |
| </tr> |
| <tr id="i39" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#bpx-java.lang.Class-java.lang.String-">bpx</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> beanClass, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> properties)</code> |
| <div class="block">Bean property excludes.</div> |
| </td> |
| </tr> |
| <tr id="i40" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#bpx-java.util.Map-">bpx</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>> values)</code> |
| <div class="block">Bean property excludes.</div> |
| </td> |
| </tr> |
| <tr id="i41" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#bpx-java.lang.String-java.lang.String-">bpx</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> beanClassName, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> properties)</code> |
| <div class="block">Bean property excludes.</div> |
| </td> |
| </tr> |
| <tr id="i42" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClient.html" title="class in org.apache.juneau.rest.mock2">MockRestClient</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#build--">build</a></span>()</code> |
| <div class="block">Build the object.</div> |
| </td> |
| </tr> |
| <tr id="i43" class="rowColor"> |
| <td class="colFirst"><code><T extends <a href="../../../../../org/apache/juneau/Context.html" title="class in org.apache.juneau">Context</a>><br>T</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#build-java.lang.Class-">build</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> c)</code> |
| <div class="block">Build a new instance of the specified object.</div> |
| </td> |
| </tr> |
| <tr id="i44" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#cacheControl-java.lang.Object-">cacheControl</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> |
| <div class="block">Sets the value for the <c>Cache-Control</c> request header on all requests.</div> |
| </td> |
| </tr> |
| <tr id="i45" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#callHandler-java.lang.Class-">callHandler</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="../../../../../org/apache/juneau/rest/client2/RestCallHandler.html" title="interface in org.apache.juneau.rest.client2">RestCallHandler</a>> value)</code> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> REST call handler.</div> |
| </td> |
| </tr> |
| <tr id="i46" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#callHandler-org.apache.juneau.rest.client2.RestCallHandler-">callHandler</a></span>(<a href="../../../../../org/apache/juneau/rest/client2/RestCallHandler.html" title="interface in org.apache.juneau.rest.client2">RestCallHandler</a> value)</code> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> REST call handler.</div> |
| </td> |
| </tr> |
| <tr id="i47" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#clientVersion-java.lang.Object-">clientVersion</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> |
| <div class="block">Sets the client version by setting the value for the <js>"X-Client-Version"</js> header.</div> |
| </td> |
| </tr> |
| <tr id="i48" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#connection-java.lang.Object-">connection</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> |
| <div class="block">Sets the value for the <c>Connection</c> request header on all requests.</div> |
| </td> |
| </tr> |
| <tr id="i49" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#connectionBackoffStrategy-org.apache.http.client.ConnectionBackoffStrategy-">connectionBackoffStrategy</a></span>(<a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/ConnectionBackoffStrategy.html?is-external=true" title="class or interface in org.apache.http.client">ConnectionBackoffStrategy</a> connectionBackoffStrategy)</code> |
| <div class="block">Assigns <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/ConnectionBackoffStrategy.html?is-external=true" title="class or interface in org.apache.http.client"><code>ConnectionBackoffStrategy</code></a> instance.</div> |
| </td> |
| </tr> |
| <tr id="i50" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#connectionManager-org.apache.http.conn.HttpClientConnectionManager-">connectionManager</a></span>(<a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/conn/HttpClientConnectionManager.html?is-external=true" title="class or interface in org.apache.http.conn">HttpClientConnectionManager</a> connManager)</code> |
| <div class="block">Assigns <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/conn/HttpClientConnectionManager.html?is-external=true" title="class or interface in org.apache.http.conn"><code>HttpClientConnectionManager</code></a> instance.</div> |
| </td> |
| </tr> |
| <tr id="i51" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#connectionManagerShared-boolean-">connectionManagerShared</a></span>(boolean shared)</code> |
| <div class="block">Defines the connection manager is to be shared by multiple client instances.</div> |
| </td> |
| </tr> |
| <tr id="i52" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#connectionReuseStrategy-org.apache.http.ConnectionReuseStrategy-">connectionReuseStrategy</a></span>(<a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/ConnectionReuseStrategy.html?is-external=true" title="class or interface in org.apache.http">ConnectionReuseStrategy</a> reuseStrategy)</code> |
| <div class="block">Assigns <a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/ConnectionReuseStrategy.html?is-external=true" title="class or interface in org.apache.http"><code>ConnectionReuseStrategy</code></a> instance.</div> |
| </td> |
| </tr> |
| <tr id="i53" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#connectionTimeToLive-long-java.util.concurrent.TimeUnit-">connectionTimeToLive</a></span>(long connTimeToLive, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent">TimeUnit</a> connTimeToLiveTimeUnit)</code> |
| <div class="block">Sets maximum time to live for persistent connections.</div> |
| </td> |
| </tr> |
| <tr id="i54" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#console-java.lang.Class-">console</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="https://docs.oracle.com/javase/8/docs/api/java/io/PrintStream.html?is-external=true" title="class or interface in java.io">PrintStream</a>> value)</code> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Console print stream</div> |
| </td> |
| </tr> |
| <tr id="i55" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#console-java.io.PrintStream-">console</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/PrintStream.html?is-external=true" title="class or interface in java.io">PrintStream</a> value)</code> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Console print stream</div> |
| </td> |
| </tr> |
| <tr id="i56" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#contentDecoderRegistry-java.util.Map-">contentDecoderRegistry</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/entity/InputStreamFactory.html?is-external=true" title="class or interface in org.apache.http.client.entity">InputStreamFactory</a>> contentDecoderMap)</code> |
| <div class="block">Assigns a map of <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/entity/InputStreamFactory.html?is-external=true" title="class or interface in org.apache.http.client.entity"><code>InputStreamFactories</code></a> to be used for automatic content decompression.</div> |
| </td> |
| </tr> |
| <tr id="i57" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#contentEncoding-java.lang.Object-">contentEncoding</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> |
| <div class="block">Sets the value for the <c>Content-Encoding</c> request header on all requests.</div> |
| </td> |
| </tr> |
| <tr id="i58" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#contentLength-java.lang.Object-">contentLength</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> |
| <div class="block">Sets the value for the <c>Content-Length</c> request header on all requests.</div> |
| </td> |
| </tr> |
| <tr id="i59" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#contentType-java.lang.Object-">contentType</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> |
| <div class="block">Sets the value for the <c>Content-Type</c> request header on all requests.</div> |
| </td> |
| </tr> |
| <tr id="i60" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#contextPath-java.lang.String-">contextPath</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value)</code> |
| <div class="block">Identifies the context path for the REST resource.</div> |
| </td> |
| </tr> |
| <tr id="i61" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#date-java.lang.Object-">date</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> |
| <div class="block">Sets the value for the <c>Date</c> request header on all requests.</div> |
| </td> |
| </tr> |
| <tr id="i62" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#debug--">debug</a></span>()</code> |
| <div class="block"><i><l>Context</l> configuration property: </i> Debug mode.</div> |
| </td> |
| </tr> |
| <tr id="i63" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#debugOutputLines-int-">debugOutputLines</a></span>(int value)</code> |
| <div class="block"><i><l>Parser</l> configuration property: </i> Debug output lines.</div> |
| </td> |
| </tr> |
| <tr id="i64" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#defaultAuthSchemeRegistry-org.apache.http.config.Lookup-">defaultAuthSchemeRegistry</a></span>(<a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/config/Lookup.html?is-external=true" title="class or interface in org.apache.http.config">Lookup</a><<a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/auth/AuthSchemeProvider.html?is-external=true" title="class or interface in org.apache.http.auth">AuthSchemeProvider</a>> authSchemeRegistry)</code> |
| <div class="block">Assigns default <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/auth/AuthScheme.html?is-external=true" title="class or interface in org.apache.http.auth"><code>AuthScheme</code></a> registry which will be used for request execution if not explicitly set in the client execution context.</div> |
| </td> |
| </tr> |
| <tr id="i65" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#defaultConnectionConfig-org.apache.http.config.ConnectionConfig-">defaultConnectionConfig</a></span>(<a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/config/ConnectionConfig.html?is-external=true" title="class or interface in org.apache.http.config">ConnectionConfig</a> config)</code> |
| <div class="block">Assigns default <a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/config/ConnectionConfig.html?is-external=true" title="class or interface in org.apache.http.config"><code>ConnectionConfig</code></a>.</div> |
| </td> |
| </tr> |
| <tr id="i66" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#defaultCookieSpecRegistry-org.apache.http.config.Lookup-">defaultCookieSpecRegistry</a></span>(<a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/config/Lookup.html?is-external=true" title="class or interface in org.apache.http.config">Lookup</a><<a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/cookie/CookieSpecProvider.html?is-external=true" title="class or interface in org.apache.http.cookie">CookieSpecProvider</a>> cookieSpecRegistry)</code> |
| <div class="block">Assigns default <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/cookie/CookieSpec.html?is-external=true" title="class or interface in org.apache.http.cookie"><code>CookieSpec</code></a> registry which will be used for request execution if not explicitly set in the client execution context.</div> |
| </td> |
| </tr> |
| <tr id="i67" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#defaultCookieStore-org.apache.http.client.CookieStore-">defaultCookieStore</a></span>(<a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/CookieStore.html?is-external=true" title="class or interface in org.apache.http.client">CookieStore</a> cookieStore)</code> |
| <div class="block">Assigns default <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/CookieStore.html?is-external=true" title="class or interface in org.apache.http.client"><code>CookieStore</code></a> instance which will be used for request execution if not explicitly set in the client execution context.</div> |
| </td> |
| </tr> |
| <tr id="i68" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#defaultCredentialsProvider-org.apache.http.client.CredentialsProvider-">defaultCredentialsProvider</a></span>(<a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/CredentialsProvider.html?is-external=true" title="class or interface in org.apache.http.client">CredentialsProvider</a> credentialsProvider)</code> |
| <div class="block">Assigns default <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/CredentialsProvider.html?is-external=true" title="class or interface in org.apache.http.client"><code>CredentialsProvider</code></a> instance which will be used for request execution if not explicitly set in the client execution context.</div> |
| </td> |
| </tr> |
| <tr id="i69" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#defaultHeaders-java.util.Collection-">defaultHeaders</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a><? extends <a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/Header.html?is-external=true" title="class or interface in org.apache.http">Header</a>> defaultHeaders)</code> |
| <div class="block">Assigns default request header values.</div> |
| </td> |
| </tr> |
| <tr id="i70" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#defaultRequestConfig-org.apache.http.client.config.RequestConfig-">defaultRequestConfig</a></span>(<a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/config/RequestConfig.html?is-external=true" title="class or interface in org.apache.http.client.config">RequestConfig</a> config)</code> |
| <div class="block">Assigns default <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/config/RequestConfig.html?is-external=true" title="class or interface in org.apache.http.client.config"><code>RequestConfig</code></a> instance which will be used for request execution if not explicitly set in the client execution context.</div> |
| </td> |
| </tr> |
| <tr id="i71" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#defaultSocketConfig-org.apache.http.config.SocketConfig-">defaultSocketConfig</a></span>(<a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/config/SocketConfig.html?is-external=true" title="class or interface in org.apache.http.config">SocketConfig</a> config)</code> |
| <div class="block">Assigns default <a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/config/SocketConfig.html?is-external=true" title="class or interface in org.apache.http.config"><code>SocketConfig</code></a>.</div> |
| </td> |
| </tr> |
| <tr id="i72" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#detectRecursions--">detectRecursions</a></span>()</code> |
| <div class="block"><i><l>BeanTraverse</l> configuration property: </i> Automatically detect POJO recursions.</div> |
| </td> |
| </tr> |
| <tr id="i73" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#dictionary-java.lang.Object...-">dictionary</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>... values)</code> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Bean dictionary.</div> |
| </td> |
| </tr> |
| <tr id="i74" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#dictionaryOn-java.lang.Class-java.lang.Class...-">dictionaryOn</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> on, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?>... values)</code> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Bean dictionary.</div> |
| </td> |
| </tr> |
| <tr id="i75" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#disableAuthCaching--">disableAuthCaching</a></span>()</code> |
| <div class="block">Disables authentication scheme caching.</div> |
| </td> |
| </tr> |
| <tr id="i76" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#disableAutomaticRetries--">disableAutomaticRetries</a></span>()</code> |
| <div class="block">Disables automatic request recovery and re-execution.</div> |
| </td> |
| </tr> |
| <tr id="i77" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#disableConnectionState--">disableConnectionState</a></span>()</code> |
| <div class="block">Disables connection state tracking.</div> |
| </td> |
| </tr> |
| <tr id="i78" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#disableContentCompression--">disableContentCompression</a></span>()</code> |
| <div class="block">Disables automatic content decompression.</div> |
| </td> |
| </tr> |
| <tr id="i79" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#disableCookieManagement--">disableCookieManagement</a></span>()</code> |
| <div class="block">Disables state (cookie) management.</div> |
| </td> |
| </tr> |
| <tr id="i80" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#disableRedirectHandling--">disableRedirectHandling</a></span>()</code> |
| <div class="block">Disables automatic redirect handling.</div> |
| </td> |
| </tr> |
| <tr id="i81" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#dontIgnorePropertiesWithoutSetters--">dontIgnorePropertiesWithoutSetters</a></span>()</code> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Ignore properties without setters.</div> |
| </td> |
| </tr> |
| <tr id="i82" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#dontIgnoreTransientFields--">dontIgnoreTransientFields</a></span>()</code> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Ignore transient fields.</div> |
| </td> |
| </tr> |
| <tr id="i83" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#dontIgnoreUnknownNullBeanProperties--">dontIgnoreUnknownNullBeanProperties</a></span>()</code> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Ignore unknown properties with null values.</div> |
| </td> |
| </tr> |
| <tr id="i84" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#dontUseInterfaceProxies--">dontUseInterfaceProxies</a></span>()</code> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Use interface proxies.</div> |
| </td> |
| </tr> |
| <tr id="i85" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#errorCodes-java.util.function.Predicate-">errorCodes</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Predicate.html?is-external=true" title="class or interface in java.util.function">Predicate</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a>> value)</code> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Errors codes predicate.</div> |
| </td> |
| </tr> |
| <tr id="i86" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#evictExpiredConnections--">evictExpiredConnections</a></span>()</code> |
| <div class="block">Makes this instance of <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/HttpClient.html?is-external=true" title="class or interface in org.apache.http.client"><code>HttpClient</code></a> proactively evict expired connections from the connection pool using a background thread.</div> |
| </td> |
| </tr> |
| <tr id="i87" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#evictIdleConnections-long-java.util.concurrent.TimeUnit-">evictIdleConnections</a></span>(long maxIdleTime, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent">TimeUnit</a> maxIdleTimeUnit)</code> |
| <div class="block">Makes this instance of <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/HttpClient.html?is-external=true" title="class or interface in org.apache.http.client"><code>HttpClient</code></a> proactively evict idle connections from the connection pool using a background thread.</div> |
| </td> |
| </tr> |
| <tr id="i88" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#executorService-java.util.concurrent.ExecutorService-boolean-">executorService</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutorService.html?is-external=true" title="class or interface in java.util.concurrent">ExecutorService</a> executorService, |
| boolean shutdownOnClose)</code> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Executor service.</div> |
| </td> |
| </tr> |
| <tr id="i89" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#expect-java.lang.Object-">expect</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> |
| <div class="block">Sets the value for the <c>Expect</c> request header on all requests.</div> |
| </td> |
| </tr> |
| <tr id="i90" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#fluentSetters--">fluentSetters</a></span>()</code> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Find fluent setters.</div> |
| </td> |
| </tr> |
| <tr id="i91" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#fluentSetters-java.lang.Class-">fluentSetters</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> on)</code> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Find fluent setters.</div> |
| </td> |
| </tr> |
| <tr id="i92" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#formData-org.apache.http.NameValuePair-">formData</a></span>(<a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/NameValuePair.html?is-external=true" title="class or interface in org.apache.http">NameValuePair</a> pair)</code> |
| <div class="block">Adds a form-data parameter to all request bodies.</div> |
| </td> |
| </tr> |
| <tr id="i93" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#formData-java.lang.String-java.lang.Object-">formData</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> |
| <div class="block">Adds a form-data parameter to all request bodies.</div> |
| </td> |
| </tr> |
| <tr id="i94" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#formData-java.lang.String-java.lang.Object-org.apache.juneau.httppart.HttpPartSchema-">formData</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value, |
| <a href="../../../../../org/apache/juneau/httppart/HttpPartSchema.html" title="class in org.apache.juneau.httppart">HttpPartSchema</a> schema)</code> |
| <div class="block">Adds a form-data parameter to all request bodies.</div> |
| </td> |
| </tr> |
| <tr id="i95" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#formData-java.lang.String-java.lang.Object-org.apache.juneau.httppart.HttpPartSchema-org.apache.juneau.httppart.HttpPartSerializer-">formData</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value, |
| <a href="../../../../../org/apache/juneau/httppart/HttpPartSchema.html" title="class in org.apache.juneau.httppart">HttpPartSchema</a> schema, |
| <a href="../../../../../org/apache/juneau/httppart/HttpPartSerializer.html" title="interface in org.apache.juneau.httppart">HttpPartSerializer</a> serializer)</code> |
| <div class="block">Adds a form-data parameter to all request bodies.</div> |
| </td> |
| </tr> |
| <tr id="i96" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#formData-java.lang.String-java.util.function.Supplier-">formData</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function">Supplier</a><?> value)</code> |
| <div class="block">Adds a form-data parameter with a dynamic value to all request bodies.</div> |
| </td> |
| </tr> |
| <tr id="i97" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#formData-java.lang.String-java.util.function.Supplier-org.apache.juneau.httppart.HttpPartSchema-">formData</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function">Supplier</a><?> value, |
| <a href="../../../../../org/apache/juneau/httppart/HttpPartSchema.html" title="class in org.apache.juneau.httppart">HttpPartSchema</a> schema)</code> |
| <div class="block">Adds a form-data parameter with a dynamic value to all request bodies.</div> |
| </td> |
| </tr> |
| <tr id="i98" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#formData-java.lang.String-java.util.function.Supplier-org.apache.juneau.httppart.HttpPartSchema-org.apache.juneau.httppart.HttpPartSerializer-">formData</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function">Supplier</a><?> value, |
| <a href="../../../../../org/apache/juneau/httppart/HttpPartSchema.html" title="class in org.apache.juneau.httppart">HttpPartSchema</a> schema, |
| <a href="../../../../../org/apache/juneau/httppart/HttpPartSerializer.html" title="interface in org.apache.juneau.httppart">HttpPartSerializer</a> serializer)</code> |
| <div class="block">Adds a form-data parameter with a dynamic value to all request bodies.</div> |
| </td> |
| </tr> |
| <tr id="i99" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#formDataPairs-java.lang.Object...-">formDataPairs</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>... pairs)</code> |
| <div class="block">Adds form-data parameters to all request bodies using free-form key/value pairs.</div> |
| </td> |
| </tr> |
| <tr id="i100" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#formDatas-java.lang.Object...-">formDatas</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>... params)</code> |
| <div class="block">Adds a form-data parameter to all request bodies.</div> |
| </td> |
| </tr> |
| <tr id="i101" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#forwarded-java.lang.Object-">forwarded</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> |
| <div class="block">Sets the value for the <c>Forwarded</c> request header on all requests.</div> |
| </td> |
| </tr> |
| <tr id="i102" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#from-java.lang.Object-">from</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> |
| <div class="block">Sets the value for the <c>From</c> request header on all requests.</div> |
| </td> |
| </tr> |
| <tr id="i103" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#header-org.apache.http.Header-">header</a></span>(<a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/Header.html?is-external=true" title="class or interface in org.apache.http">Header</a> header)</code> |
| <div class="block">Sets a header on all requests.</div> |
| </td> |
| </tr> |
| <tr id="i104" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#header-java.lang.String-java.lang.Object-">header</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> |
| <div class="block">Sets a header on all requests.</div> |
| </td> |
| </tr> |
| <tr id="i105" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#header-java.lang.String-java.lang.Object-org.apache.juneau.httppart.HttpPartSchema-">header</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value, |
| <a href="../../../../../org/apache/juneau/httppart/HttpPartSchema.html" title="class in org.apache.juneau.httppart">HttpPartSchema</a> schema)</code> |
| <div class="block">Sets a header on all requests.</div> |
| </td> |
| </tr> |
| <tr id="i106" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#header-java.lang.String-java.lang.Object-org.apache.juneau.httppart.HttpPartSchema-org.apache.juneau.httppart.HttpPartSerializer-">header</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value, |
| <a href="../../../../../org/apache/juneau/httppart/HttpPartSchema.html" title="class in org.apache.juneau.httppart">HttpPartSchema</a> schema, |
| <a href="../../../../../org/apache/juneau/httppart/HttpPartSerializer.html" title="interface in org.apache.juneau.httppart">HttpPartSerializer</a> serializer)</code> |
| <div class="block">Sets a header on all requests.</div> |
| </td> |
| </tr> |
| <tr id="i107" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#header-java.lang.String-java.util.function.Supplier-">header</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function">Supplier</a><?> value)</code> |
| <div class="block">Sets a header with a dynamic value on all requests.</div> |
| </td> |
| </tr> |
| <tr id="i108" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#header-java.lang.String-java.util.function.Supplier-org.apache.juneau.httppart.HttpPartSchema-">header</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function">Supplier</a><?> value, |
| <a href="../../../../../org/apache/juneau/httppart/HttpPartSchema.html" title="class in org.apache.juneau.httppart">HttpPartSchema</a> schema)</code> |
| <div class="block">Sets a header with a dynamic value on all requests.</div> |
| </td> |
| </tr> |
| <tr id="i109" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#header-java.lang.String-java.util.function.Supplier-org.apache.juneau.httppart.HttpPartSchema-org.apache.juneau.httppart.HttpPartSerializer-">header</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function">Supplier</a><?> value, |
| <a href="../../../../../org/apache/juneau/httppart/HttpPartSchema.html" title="class in org.apache.juneau.httppart">HttpPartSchema</a> schema, |
| <a href="../../../../../org/apache/juneau/httppart/HttpPartSerializer.html" title="interface in org.apache.juneau.httppart">HttpPartSerializer</a> serializer)</code> |
| <div class="block">Sets a header with a dynamic value on all requests.</div> |
| </td> |
| </tr> |
| <tr id="i110" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#headerPairs-java.lang.Object...-">headerPairs</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>... pairs)</code> |
| <div class="block">Sets multiple headers on all requests using freeform key/value pairs.</div> |
| </td> |
| </tr> |
| <tr id="i111" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#headers-java.lang.Object...-">headers</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>... headers)</code> |
| <div class="block">Sets multiple headers on all requests.</div> |
| </td> |
| </tr> |
| <tr id="i112" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#host-java.lang.Object-">host</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> |
| <div class="block">Sets the value for the <c>Host</c> request header on all requests.</div> |
| </td> |
| </tr> |
| <tr id="i113" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#html--">html</a></span>()</code> |
| <div class="block">Convenience method for specifying HTML as the marshalling transmission media type.</div> |
| </td> |
| </tr> |
| <tr id="i114" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#htmlDoc--">htmlDoc</a></span>()</code> |
| <div class="block">Convenience method for specifying HTML DOC as the marshalling transmission media type.</div> |
| </td> |
| </tr> |
| <tr id="i115" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#htmlStrippedDoc--">htmlStrippedDoc</a></span>()</code> |
| <div class="block">Convenience method for specifying Stripped HTML DOC as the marshalling transmission media type.</div> |
| </td> |
| </tr> |
| <tr id="i116" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#httpClient-org.apache.http.impl.client.CloseableHttpClient-">httpClient</a></span>(<a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/CloseableHttpClient.html?is-external=true" title="class or interface in org.apache.http.impl.client">CloseableHttpClient</a> value)</code> |
| <div class="block">Sets the <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/HttpClient.html?is-external=true" title="class or interface in org.apache.http.client"><code>HttpClient</code></a> to be used to handle all HTTP communications with the target server.</div> |
| </td> |
| </tr> |
| <tr id="i117" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#httpClientBuilder-org.apache.http.impl.client.HttpClientBuilder-">httpClientBuilder</a></span>(<a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true" title="class or interface in org.apache.http.impl.client">HttpClientBuilder</a> value)</code> |
| <div class="block">Sets the <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder</code></a> that will be used to create the <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/HttpClient.html?is-external=true" title="class or interface in org.apache.http.client"><code>HttpClient</code></a> used by <a href="../../../../../org/apache/juneau/rest/client2/RestClient.html" title="class in org.apache.juneau.rest.client2"><code>RestClient</code></a>.</div> |
| </td> |
| </tr> |
| <tr id="i118" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#httpProcessor-org.apache.http.protocol.HttpProcessor-">httpProcessor</a></span>(<a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/protocol/HttpProcessor.html?is-external=true" title="class or interface in org.apache.http.protocol">HttpProcessor</a> httpprocessor)</code> |
| <div class="block">Assigns <a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/protocol/HttpProcessor.html?is-external=true" title="class or interface in org.apache.http.protocol"><code>HttpProcessor</code></a> instance.</div> |
| </td> |
| </tr> |
| <tr id="i119" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#ifMatch-java.lang.Object-">ifMatch</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> |
| <div class="block">Sets the value for the <c>If-Match</c> request header on all requests.</div> |
| </td> |
| </tr> |
| <tr id="i120" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#ifModifiedSince-java.lang.Object-">ifModifiedSince</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> |
| <div class="block">Sets the value for the <c>If-Modified-Since</c> request header on all requests.</div> |
| </td> |
| </tr> |
| <tr id="i121" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#ifNoneMatch-java.lang.Object-">ifNoneMatch</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> |
| <div class="block">Sets the value for the <c>If-None-Match</c> request header on all requests.</div> |
| </td> |
| </tr> |
| <tr id="i122" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#ifRange-java.lang.Object-">ifRange</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> |
| <div class="block">Sets the value for the <c>If-Range</c> request header on all requests.</div> |
| </td> |
| </tr> |
| <tr id="i123" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#ifUnmodifiedSince-java.lang.Object-">ifUnmodifiedSince</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> |
| <div class="block">Sets the value for the <c>If-Unmodified-Since</c> request header on all requests.</div> |
| </td> |
| </tr> |
| <tr id="i124" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#ignoreErrors--">ignoreErrors</a></span>()</code> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Ignore errors.</div> |
| </td> |
| </tr> |
| <tr id="i125" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#ignoreErrors-boolean-">ignoreErrors</a></span>(boolean value)</code> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Ignore errors.</div> |
| </td> |
| </tr> |
| <tr id="i126" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#ignoreInvocationExceptionsOnGetters--">ignoreInvocationExceptionsOnGetters</a></span>()</code> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Ignore invocation errors on getters.</div> |
| </td> |
| </tr> |
| <tr id="i127" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#ignoreInvocationExceptionsOnSetters--">ignoreInvocationExceptionsOnSetters</a></span>()</code> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Ignore invocation errors on setters.</div> |
| </td> |
| </tr> |
| <tr id="i128" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#ignoreRecursions--">ignoreRecursions</a></span>()</code> |
| <div class="block"><i><l>BeanTraverse</l> configuration property: </i> Ignore recursion errors.</div> |
| </td> |
| </tr> |
| <tr id="i129" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#ignoreUnknownBeanProperties--">ignoreUnknownBeanProperties</a></span>()</code> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Ignore unknown properties.</div> |
| </td> |
| </tr> |
| <tr id="i130" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#implClass-java.lang.Class-java.lang.Class-">implClass</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> interfaceClass, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> implClass)</code> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Implementation classes.</div> |
| </td> |
| </tr> |
| <tr id="i131" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#implClasses-java.util.Map-">implClasses</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?>> values)</code> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Implementation classes.</div> |
| </td> |
| </tr> |
| <tr id="i132" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#initialDepth-int-">initialDepth</a></span>(int value)</code> |
| <div class="block"><i><l>BeanTraverse</l> configuration property: </i> Initial depth.</div> |
| </td> |
| </tr> |
| <tr id="i133" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#interceptors-java.lang.Class...-">interceptors</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?>... values)</code> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Call interceptors.</div> |
| </td> |
| </tr> |
| <tr id="i134" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#interceptors-java.lang.Object...-">interceptors</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>... value)</code> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Call interceptors.</div> |
| </td> |
| </tr> |
| <tr id="i135" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#interfaceClass-java.lang.Class-java.lang.Class-">interfaceClass</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> on, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> value)</code> |
| <div class="block">Identifies a class to be used as the interface class for the specified class and all subclasses.</div> |
| </td> |
| </tr> |
| <tr id="i136" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#interfaces-java.lang.Class...-">interfaces</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?>... value)</code> |
| <div class="block">Identifies a set of interfaces.</div> |
| </td> |
| </tr> |
| <tr id="i137" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#json--">json</a></span>()</code> |
| <div class="block">Convenience method for specifying JSON as the marshalling transmission media type.</div> |
| </td> |
| </tr> |
| <tr id="i138" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#keepAliveStrategy-org.apache.http.conn.ConnectionKeepAliveStrategy-">keepAliveStrategy</a></span>(<a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/conn/ConnectionKeepAliveStrategy.html?is-external=true" title="class or interface in org.apache.http.conn">ConnectionKeepAliveStrategy</a> keepAliveStrategy)</code> |
| <div class="block">Assigns <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/conn/ConnectionKeepAliveStrategy.html?is-external=true" title="class or interface in org.apache.http.conn"><code>ConnectionKeepAliveStrategy</code></a> instance.</div> |
| </td> |
| </tr> |
| <tr id="i139" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#keepHttpClientOpen--">keepHttpClientOpen</a></span>()</code> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Keep HttpClient open.</div> |
| </td> |
| </tr> |
| <tr id="i140" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#keepNullProperties--">keepNullProperties</a></span>()</code> |
| <div class="block"><i><l>Serializer</l> configuration property: </i> Don't trim null bean property values.</div> |
| </td> |
| </tr> |
| <tr id="i141" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#leakDetection--">leakDetection</a></span>()</code> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Enable leak detection.</div> |
| </td> |
| </tr> |
| <tr id="i142" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#locale-java.util.Locale-">locale</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util">Locale</a> value)</code> |
| <div class="block"><i><l>Context</l> configuration property: </i> Locale.</div> |
| </td> |
| </tr> |
| <tr id="i143" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#logger-java.util.logging.Logger-">logger</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/logging/Logger.html?is-external=true" title="class or interface in java.util.logging">Logger</a> value)</code> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Logger.</div> |
| </td> |
| </tr> |
| <tr id="i144" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#logRequests-org.apache.juneau.DetailLevel-java.util.logging.Level-java.util.function.BiPredicate-">logRequests</a></span>(<a href="../../../../../org/apache/juneau/DetailLevel.html" title="enum in org.apache.juneau">DetailLevel</a> detail, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/logging/Level.html?is-external=true" title="class or interface in java.util.logging">Level</a> level, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/BiPredicate.html?is-external=true" title="class or interface in java.util.function">BiPredicate</a><<a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html" title="class in org.apache.juneau.rest.client2">RestRequest</a>,<a href="../../../../../org/apache/juneau/rest/client2/RestResponse.html" title="class in org.apache.juneau.rest.client2">RestResponse</a>> test)</code> |
| <div class="block"><i><i><l>RestClient</l> configuration property: </i></i> Log requests.</div> |
| </td> |
| </tr> |
| <tr id="i145" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#logToConsole--">logToConsole</a></span>()</code> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Log to console.</div> |
| </td> |
| </tr> |
| <tr id="i146" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#marshall-org.apache.juneau.marshall.Marshall-">marshall</a></span>(<a href="../../../../../org/apache/juneau/marshall/Marshall.html" title="class in org.apache.juneau.marshall">Marshall</a> value)</code> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Marshall</div> |
| </td> |
| </tr> |
| <tr id="i147" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#marshalls-org.apache.juneau.marshall.Marshall...-">marshalls</a></span>(<a href="../../../../../org/apache/juneau/marshall/Marshall.html" title="class in org.apache.juneau.marshall">Marshall</a>... value)</code> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Marshalls</div> |
| </td> |
| </tr> |
| <tr id="i148" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#maxConnPerRoute-int-">maxConnPerRoute</a></span>(int maxConnPerRoute)</code> |
| <div class="block">Assigns maximum connection per route value.</div> |
| </td> |
| </tr> |
| <tr id="i149" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#maxConnTotal-int-">maxConnTotal</a></span>(int maxConnTotal)</code> |
| <div class="block">Assigns maximum total connection value.</div> |
| </td> |
| </tr> |
| <tr id="i150" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#maxDepth-int-">maxDepth</a></span>(int value)</code> |
| <div class="block"><i><l>BeanTraverse</l> configuration property: </i> Max serialization depth.</div> |
| </td> |
| </tr> |
| <tr id="i151" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#maxForwards-java.lang.Object-">maxForwards</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> |
| <div class="block">Sets the value for the <c>Max-Forwards</c> request header on all requests.</div> |
| </td> |
| </tr> |
| <tr id="i152" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#maxIndent-int-">maxIndent</a></span>(int value)</code> |
| <div class="block"><i><l>WriterSerializer</l> configuration property: </i> Maximum indentation.</div> |
| </td> |
| </tr> |
| <tr id="i153" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#mediaType-org.apache.juneau.http.MediaType-">mediaType</a></span>(<a href="../../../../../org/apache/juneau/http/MediaType.html" title="class in org.apache.juneau.http">MediaType</a> value)</code> |
| <div class="block"><i><l>Context</l> configuration property: </i> Media type.</div> |
| </td> |
| </tr> |
| <tr id="i154" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#msgPack--">msgPack</a></span>()</code> |
| <div class="block">Convenience method for specifying MessagePack as the marshalling transmission media type.</div> |
| </td> |
| </tr> |
| <tr id="i155" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#notBeanClasses-java.lang.Object...-">notBeanClasses</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>... values)</code> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Bean class exclusions.</div> |
| </td> |
| </tr> |
| <tr id="i156" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#notBeanPackages-java.lang.Object...-">notBeanPackages</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>... values)</code> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Bean package exclusions.</div> |
| </td> |
| </tr> |
| <tr id="i157" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#noTrace--">noTrace</a></span>()</code> |
| <div class="block">When called, <c>No-Trace: true</c> is added to requests.</div> |
| </td> |
| </tr> |
| <tr id="i158" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#oapiCollectionFormat-org.apache.juneau.httppart.HttpPartCollectionFormat-">oapiCollectionFormat</a></span>(<a href="../../../../../org/apache/juneau/httppart/HttpPartCollectionFormat.html" title="enum in org.apache.juneau.httppart">HttpPartCollectionFormat</a> value)</code> |
| <div class="block"><i><l>OpenApiCommon</l> configuration property: </i> Default collection format for HTTP parts.</div> |
| </td> |
| </tr> |
| <tr id="i159" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#oapiFormat-org.apache.juneau.httppart.HttpPartFormat-">oapiFormat</a></span>(<a href="../../../../../org/apache/juneau/httppart/HttpPartFormat.html" title="enum in org.apache.juneau.httppart">HttpPartFormat</a> value)</code> |
| <div class="block"><i><l>OpenApiCommon</l> configuration property: </i> Default OpenAPI format for HTTP parts.</div> |
| </td> |
| </tr> |
| <tr id="i160" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#openApi--">openApi</a></span>()</code> |
| <div class="block">Convenience method for specifying OpenAPI as the marshalling transmission media type.</div> |
| </td> |
| </tr> |
| <tr id="i161" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#origin-java.lang.Object-">origin</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> |
| <div class="block">Sets the value for the <c>Origin</c> request header on all requests.</div> |
| </td> |
| </tr> |
| <tr id="i162" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#paramFormat-org.apache.juneau.uon.ParamFormat-">paramFormat</a></span>(<a href="../../../../../org/apache/juneau/uon/ParamFormat.html" title="enum in org.apache.juneau.uon">ParamFormat</a> value)</code> |
| <div class="block"><i><l>UonSerializer</l> configuration property: </i> Parameter format.</div> |
| </td> |
| </tr> |
| <tr id="i163" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#paramFormatPlain--">paramFormatPlain</a></span>()</code> |
| <div class="block"><i><l>UonSerializer</l> configuration property: </i> Parameter format.</div> |
| </td> |
| </tr> |
| <tr id="i164" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#parser-java.lang.Class-">parser</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="../../../../../org/apache/juneau/parser/Parser.html" title="class in org.apache.juneau.parser">Parser</a>> value)</code> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Parser.</div> |
| </td> |
| </tr> |
| <tr id="i165" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#parser-org.apache.juneau.parser.Parser-">parser</a></span>(<a href="../../../../../org/apache/juneau/parser/Parser.html" title="class in org.apache.juneau.parser">Parser</a> value)</code> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Parser.</div> |
| </td> |
| </tr> |
| <tr id="i166" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#parsers-java.lang.Class...-">parsers</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="../../../../../org/apache/juneau/parser/Parser.html" title="class in org.apache.juneau.parser">Parser</a>>... value)</code> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Parsers.</div> |
| </td> |
| </tr> |
| <tr id="i167" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#parsers-org.apache.juneau.parser.Parser...-">parsers</a></span>(<a href="../../../../../org/apache/juneau/parser/Parser.html" title="class in org.apache.juneau.parser">Parser</a>... value)</code> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Parsers.</div> |
| </td> |
| </tr> |
| <tr id="i168" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#partParser-java.lang.Class-">partParser</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="../../../../../org/apache/juneau/httppart/HttpPartParser.html" title="interface in org.apache.juneau.httppart">HttpPartParser</a>> value)</code> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Part parser.</div> |
| </td> |
| </tr> |
| <tr id="i169" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#partParser-org.apache.juneau.httppart.HttpPartParser-">partParser</a></span>(<a href="../../../../../org/apache/juneau/httppart/HttpPartParser.html" title="interface in org.apache.juneau.httppart">HttpPartParser</a> value)</code> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Part parser.</div> |
| </td> |
| </tr> |
| <tr id="i170" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#partSerializer-java.lang.Class-">partSerializer</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="../../../../../org/apache/juneau/httppart/HttpPartSerializer.html" title="interface in org.apache.juneau.httppart">HttpPartSerializer</a>> value)</code> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Part serializer.</div> |
| </td> |
| </tr> |
| <tr id="i171" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#partSerializer-org.apache.juneau.httppart.HttpPartSerializer-">partSerializer</a></span>(<a href="../../../../../org/apache/juneau/httppart/HttpPartSerializer.html" title="interface in org.apache.juneau.httppart">HttpPartSerializer</a> value)</code> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Part serializer.</div> |
| </td> |
| </tr> |
| <tr id="i172" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#plainText--">plainText</a></span>()</code> |
| <div class="block">Convenience method for specifying Plain Text as the marshalling transmission media type.</div> |
| </td> |
| </tr> |
| <tr id="i173" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#pooled--">pooled</a></span>()</code> |
| <div class="block">When called, the <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#createConnectionManager--"><code>RestClientBuilder.createConnectionManager()</code></a> method will return a <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/conn/PoolingHttpClientConnectionManager.html?is-external=true" title="class or interface in org.apache.http.impl.conn"><code>PoolingHttpClientConnectionManager</code></a> |
| instead of a <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/conn/BasicHttpClientConnectionManager.html?is-external=true" title="class or interface in org.apache.http.impl.conn"><code>BasicHttpClientConnectionManager</code></a>.</div> |
| </td> |
| </tr> |
| <tr id="i174" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#pragma-java.lang.Object-">pragma</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> |
| <div class="block">Sets the value for the <c>Pragma</c> request header on all requests.</div> |
| </td> |
| </tr> |
| <tr id="i175" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#prependTo-java.lang.String-java.lang.Object-">prependTo</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> |
| <div class="block">Adds a free-form value to the beginning of a LIST property.</div> |
| </td> |
| </tr> |
| <tr id="i176" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#propertyNamer-java.lang.Class-java.lang.Class-">propertyNamer</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> on, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="../../../../../org/apache/juneau/PropertyNamer.html" title="interface in org.apache.juneau">PropertyNamer</a>> value)</code> |
| <div class="block">Bean property namer</div> |
| </td> |
| </tr> |
| <tr id="i177" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#propertyNamer-java.lang.Class-">propertyNamer</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="../../../../../org/apache/juneau/PropertyNamer.html" title="interface in org.apache.juneau">PropertyNamer</a>> value)</code> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Bean property namer</div> |
| </td> |
| </tr> |
| <tr id="i178" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#proxy-org.apache.http.HttpHost-">proxy</a></span>(<a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/HttpHost.html?is-external=true" title="class or interface in org.apache.http">HttpHost</a> proxy)</code> |
| <div class="block">Assigns default proxy value.</div> |
| </td> |
| </tr> |
| <tr id="i179" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#proxyAuthenticationStrategy-org.apache.http.client.AuthenticationStrategy-">proxyAuthenticationStrategy</a></span>(<a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/AuthenticationStrategy.html?is-external=true" title="class or interface in org.apache.http.client">AuthenticationStrategy</a> proxyAuthStrategy)</code> |
| <div class="block">Assigns <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/AuthenticationStrategy.html?is-external=true" title="class or interface in org.apache.http.client"><code>AuthenticationStrategy</code></a> instance for proxy authentication.</div> |
| </td> |
| </tr> |
| <tr id="i180" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#proxyAuthorization-java.lang.Object-">proxyAuthorization</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> |
| <div class="block">Sets the value for the <c>Proxy-Authorization</c> request header on all requests.</div> |
| </td> |
| </tr> |
| <tr id="i181" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#publicSuffixMatcher-org.apache.http.conn.util.PublicSuffixMatcher-">publicSuffixMatcher</a></span>(<a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/conn/util/PublicSuffixMatcher.html?is-external=true" title="class or interface in org.apache.http.conn.util">PublicSuffixMatcher</a> publicSuffixMatcher)</code> |
| <div class="block">Assigns file containing public suffix matcher.</div> |
| </td> |
| </tr> |
| <tr id="i182" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#putAllTo-java.lang.String-java.lang.Object-">putAllTo</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> |
| <div class="block">Adds or overwrites multiple free-form entries in a MAP property.</div> |
| </td> |
| </tr> |
| <tr id="i183" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#putTo-java.lang.String-java.lang.String-java.lang.Object-">putTo</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> |
| <div class="block">Adds or overwrites a free-form entry in a MAP property.</div> |
| </td> |
| </tr> |
| <tr id="i184" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#queries-java.lang.Object...-">queries</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>... params)</code> |
| <div class="block">Adds a query parameter to the URI.</div> |
| </td> |
| </tr> |
| <tr id="i185" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#query-org.apache.http.NameValuePair-">query</a></span>(<a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/NameValuePair.html?is-external=true" title="class or interface in org.apache.http">NameValuePair</a> pair)</code> |
| <div class="block">Adds a query parameter to the URI.</div> |
| </td> |
| </tr> |
| <tr id="i186" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#query-java.lang.String-java.lang.Object-">query</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> |
| <div class="block">Adds a query parameter to the URI.</div> |
| </td> |
| </tr> |
| <tr id="i187" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#query-java.lang.String-java.lang.Object-org.apache.juneau.httppart.HttpPartSchema-">query</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value, |
| <a href="../../../../../org/apache/juneau/httppart/HttpPartSchema.html" title="class in org.apache.juneau.httppart">HttpPartSchema</a> schema)</code> |
| <div class="block">Adds a query parameter to the URI.</div> |
| </td> |
| </tr> |
| <tr id="i188" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#query-java.lang.String-java.lang.Object-org.apache.juneau.httppart.HttpPartSchema-org.apache.juneau.httppart.HttpPartSerializer-">query</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value, |
| <a href="../../../../../org/apache/juneau/httppart/HttpPartSchema.html" title="class in org.apache.juneau.httppart">HttpPartSchema</a> schema, |
| <a href="../../../../../org/apache/juneau/httppart/HttpPartSerializer.html" title="interface in org.apache.juneau.httppart">HttpPartSerializer</a> serializer)</code> |
| <div class="block">Adds a query parameter to the URI.</div> |
| </td> |
| </tr> |
| <tr id="i189" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#query-java.lang.String-java.util.function.Supplier-">query</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function">Supplier</a><?> value)</code> |
| <div class="block">Adds a query parameter with a dynamic value to the URI.</div> |
| </td> |
| </tr> |
| <tr id="i190" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#query-java.lang.String-java.util.function.Supplier-org.apache.juneau.httppart.HttpPartSchema-">query</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function">Supplier</a><?> value, |
| <a href="../../../../../org/apache/juneau/httppart/HttpPartSchema.html" title="class in org.apache.juneau.httppart">HttpPartSchema</a> schema)</code> |
| <div class="block">Adds a query parameter with a dynamic value to the URI.</div> |
| </td> |
| </tr> |
| <tr id="i191" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#query-java.lang.String-java.util.function.Supplier-org.apache.juneau.httppart.HttpPartSchema-org.apache.juneau.httppart.HttpPartSerializer-">query</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function">Supplier</a><?> value, |
| <a href="../../../../../org/apache/juneau/httppart/HttpPartSchema.html" title="class in org.apache.juneau.httppart">HttpPartSchema</a> schema, |
| <a href="../../../../../org/apache/juneau/httppart/HttpPartSerializer.html" title="interface in org.apache.juneau.httppart">HttpPartSerializer</a> serializer)</code> |
| <div class="block">Adds a query parameter with a dynamic value to the URI.</div> |
| </td> |
| </tr> |
| <tr id="i192" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#queryPairs-java.lang.Object...-">queryPairs</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>... pairs)</code> |
| <div class="block">Adds query parameters to the URI query using free-form key/value pairs.</div> |
| </td> |
| </tr> |
| <tr id="i193" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#quoteChar-char-">quoteChar</a></span>(char value)</code> |
| <div class="block"><i><l>WriterSerializer</l> configuration property: </i> Quote character.</div> |
| </td> |
| </tr> |
| <tr id="i194" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#range-java.lang.Object-">range</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> |
| <div class="block">Sets the value for the <c>Range</c> request header on all requests.</div> |
| </td> |
| </tr> |
| <tr id="i195" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#redirectStrategy-org.apache.http.client.RedirectStrategy-">redirectStrategy</a></span>(<a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/RedirectStrategy.html?is-external=true" title="class or interface in org.apache.http.client">RedirectStrategy</a> redirectStrategy)</code> |
| <div class="block">Assigns <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/RedirectStrategy.html?is-external=true" title="class or interface in org.apache.http.client"><code>RedirectStrategy</code></a> instance.</div> |
| </td> |
| </tr> |
| <tr id="i196" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#referer-java.lang.Object-">referer</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> |
| <div class="block">Sets the value for the <c>Referer</c> request header on all requests.</div> |
| </td> |
| </tr> |
| <tr id="i197" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#removeFrom-java.lang.String-java.lang.Object-">removeFrom</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> |
| <div class="block">Removes a free-form value from a SET, LIST, or MAP property.</div> |
| </td> |
| </tr> |
| <tr id="i198" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#requestExecutor-org.apache.http.protocol.HttpRequestExecutor-">requestExecutor</a></span>(<a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/protocol/HttpRequestExecutor.html?is-external=true" title="class or interface in org.apache.http.protocol">HttpRequestExecutor</a> requestExec)</code> |
| <div class="block">Assigns <a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/protocol/HttpRequestExecutor.html?is-external=true" title="class or interface in org.apache.http.protocol"><code>HttpRequestExecutor</code></a> instance.</div> |
| </td> |
| </tr> |
| <tr id="i199" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#restBean-java.lang.Object-">restBean</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> bean)</code> |
| <div class="block">Specifies the <a href="../../../../../org/apache/juneau/rest/annotation/Rest.html" title="annotation in org.apache.juneau.rest.annotation"><code>Rest</code></a>-annotated bean class or instance to test against.</div> |
| </td> |
| </tr> |
| <tr id="i200" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#retryHandler-org.apache.http.client.HttpRequestRetryHandler-">retryHandler</a></span>(<a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/HttpRequestRetryHandler.html?is-external=true" title="class or interface in org.apache.http.client">HttpRequestRetryHandler</a> retryHandler)</code> |
| <div class="block">Assigns <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/HttpRequestRetryHandler.html?is-external=true" title="class or interface in org.apache.http.client"><code>HttpRequestRetryHandler</code></a> instance.</div> |
| </td> |
| </tr> |
| <tr id="i201" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#rootUri-java.lang.Object-">rootUri</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Root URI.</div> |
| </td> |
| </tr> |
| <tr id="i202" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#routePlanner-org.apache.http.conn.routing.HttpRoutePlanner-">routePlanner</a></span>(<a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/conn/routing/HttpRoutePlanner.html?is-external=true" title="class or interface in org.apache.http.conn.routing">HttpRoutePlanner</a> routePlanner)</code> |
| <div class="block">Assigns <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/conn/routing/HttpRoutePlanner.html?is-external=true" title="class or interface in org.apache.http.conn.routing"><code>HttpRoutePlanner</code></a> instance.</div> |
| </td> |
| </tr> |
| <tr id="i203" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#schemePortResolver-org.apache.http.conn.SchemePortResolver-">schemePortResolver</a></span>(<a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/conn/SchemePortResolver.html?is-external=true" title="class or interface in org.apache.http.conn">SchemePortResolver</a> schemePortResolver)</code> |
| <div class="block">Assigns <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/conn/SchemePortResolver.html?is-external=true" title="class or interface in org.apache.http.conn"><code>SchemePortResolver</code></a> instance.</div> |
| </td> |
| </tr> |
| <tr id="i204" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#serializer-java.lang.Class-">serializer</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="../../../../../org/apache/juneau/serializer/Serializer.html" title="class in org.apache.juneau.serializer">Serializer</a>> value)</code> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Serializer.</div> |
| </td> |
| </tr> |
| <tr id="i205" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#serializer-org.apache.juneau.serializer.Serializer-">serializer</a></span>(<a href="../../../../../org/apache/juneau/serializer/Serializer.html" title="class in org.apache.juneau.serializer">Serializer</a> value)</code> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Serializer.</div> |
| </td> |
| </tr> |
| <tr id="i206" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#serializers-java.lang.Class...-">serializers</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="../../../../../org/apache/juneau/serializer/Serializer.html" title="class in org.apache.juneau.serializer">Serializer</a>>... value)</code> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Serializers.</div> |
| </td> |
| </tr> |
| <tr id="i207" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#serializers-org.apache.juneau.serializer.Serializer...-">serializers</a></span>(<a href="../../../../../org/apache/juneau/serializer/Serializer.html" title="class in org.apache.juneau.serializer">Serializer</a>... value)</code> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Serializers.</div> |
| </td> |
| </tr> |
| <tr id="i208" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#serviceUnavailableRetryStrategy-org.apache.http.client.ServiceUnavailableRetryStrategy-">serviceUnavailableRetryStrategy</a></span>(<a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/ServiceUnavailableRetryStrategy.html?is-external=true" title="class or interface in org.apache.http.client">ServiceUnavailableRetryStrategy</a> serviceUnavailStrategy)</code> |
| <div class="block">Assigns <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/ServiceUnavailableRetryStrategy.html?is-external=true" title="class or interface in org.apache.http.client"><code>ServiceUnavailableRetryStrategy</code></a> instance.</div> |
| </td> |
| </tr> |
| <tr id="i209" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#servletPath-java.lang.String-">servletPath</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value)</code> |
| <div class="block">Identifies the servlet path for the REST resource.</div> |
| </td> |
| </tr> |
| <tr id="i210" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#set-java.util.Map-">set</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>> properties)</code> |
| <div class="block">Sets multiple free-form configuration properties on this object replacing all previous values.</div> |
| </td> |
| </tr> |
| <tr id="i211" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#set-java.lang.String-java.lang.Object-">set</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> |
| <div class="block">Sets a free-form configuration property on this object.</div> |
| </td> |
| </tr> |
| <tr id="i212" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#simpleJson--">simpleJson</a></span>()</code> |
| <div class="block">Convenience method for specifying Simplified JSON as the marshalling transmission media type.</div> |
| </td> |
| </tr> |
| <tr id="i213" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#sortCollections--">sortCollections</a></span>()</code> |
| <div class="block"><i><l>Serializer</l> configuration property: </i> Sort arrays and collections alphabetically.</div> |
| </td> |
| </tr> |
| <tr id="i214" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#sortMaps--">sortMaps</a></span>()</code> |
| <div class="block"><i><l>Serializer</l> configuration property: </i> Sort maps alphabetically.</div> |
| </td> |
| </tr> |
| <tr id="i215" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#sortProperties--">sortProperties</a></span>()</code> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Sort bean properties.</div> |
| </td> |
| </tr> |
| <tr id="i216" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#sortProperties-java.lang.Class...-">sortProperties</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?>... on)</code> |
| <div class="block">Sort bean properties.</div> |
| </td> |
| </tr> |
| <tr id="i217" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#sq--">sq</a></span>()</code> |
| <div class="block"><i><l>WriterSerializer</l> configuration property: </i> Quote character.</div> |
| </td> |
| </tr> |
| <tr id="i218" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#sslContext-javax.net.ssl.SSLContext-">sslContext</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/javax/net/ssl/SSLContext.html?is-external=true" title="class or interface in javax.net.ssl">SSLContext</a> sslContext)</code> |
| <div class="block">Assigns <a href="https://docs.oracle.com/javase/8/docs/api/javax/net/ssl/SSLContext.html?is-external=true" title="class or interface in javax.net.ssl"><code>SSLContext</code></a> instance.</div> |
| </td> |
| </tr> |
| <tr id="i219" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#sslHostnameVerifier-javax.net.ssl.HostnameVerifier-">sslHostnameVerifier</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/javax/net/ssl/HostnameVerifier.html?is-external=true" title="class or interface in javax.net.ssl">HostnameVerifier</a> hostnameVerifier)</code> |
| <div class="block">Assigns <a href="https://docs.oracle.com/javase/8/docs/api/javax/net/ssl/HostnameVerifier.html?is-external=true" title="class or interface in javax.net.ssl"><code>HostnameVerifier</code></a> instance.</div> |
| </td> |
| </tr> |
| <tr id="i220" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#sslSocketFactory-org.apache.http.conn.socket.LayeredConnectionSocketFactory-">sslSocketFactory</a></span>(<a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/conn/socket/LayeredConnectionSocketFactory.html?is-external=true" title="class or interface in org.apache.http.conn.socket">LayeredConnectionSocketFactory</a> sslSocketFactory)</code> |
| <div class="block">Assigns <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/conn/socket/LayeredConnectionSocketFactory.html?is-external=true" title="class or interface in org.apache.http.conn.socket"><code>LayeredConnectionSocketFactory</code></a> instance.</div> |
| </td> |
| </tr> |
| <tr id="i221" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#stopClass-java.lang.Class-java.lang.Class-">stopClass</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> on, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> value)</code> |
| <div class="block">Identifies a stop class for the annotated class.</div> |
| </td> |
| </tr> |
| <tr id="i222" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#strict--">strict</a></span>()</code> |
| <div class="block"><i><l>Parser</l> configuration property: </i> Strict mode.</div> |
| </td> |
| </tr> |
| <tr id="i223" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#swaps-java.lang.Object...-">swaps</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>... values)</code> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Java object swaps.</div> |
| </td> |
| </tr> |
| <tr id="i224" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#targetAuthenticationStrategy-org.apache.http.client.AuthenticationStrategy-">targetAuthenticationStrategy</a></span>(<a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/AuthenticationStrategy.html?is-external=true" title="class or interface in org.apache.http.client">AuthenticationStrategy</a> targetAuthStrategy)</code> |
| <div class="block">Assigns <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/AuthenticationStrategy.html?is-external=true" title="class or interface in org.apache.http.client"><code>AuthenticationStrategy</code></a> instance for target host authentication.</div> |
| </td> |
| </tr> |
| <tr id="i225" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#te-java.lang.Object-">te</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> |
| <div class="block">Sets the value for the <c>TE</c> request header on all requests.</div> |
| </td> |
| </tr> |
| <tr id="i226" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#timeZone-java.util.TimeZone-">timeZone</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/TimeZone.html?is-external=true" title="class or interface in java.util">TimeZone</a> value)</code> |
| <div class="block"><i><l>Context</l> configuration property: </i> TimeZone.</div> |
| </td> |
| </tr> |
| <tr id="i227" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#trimEmptyCollections--">trimEmptyCollections</a></span>()</code> |
| <div class="block"><i><l>Serializer</l> configuration property: </i> Trim empty lists and arrays.</div> |
| </td> |
| </tr> |
| <tr id="i228" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#trimEmptyMaps--">trimEmptyMaps</a></span>()</code> |
| <div class="block"><i><l>Serializer</l> configuration property: </i> Trim empty maps.</div> |
| </td> |
| </tr> |
| <tr id="i229" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#trimStringsOnRead--">trimStringsOnRead</a></span>()</code> |
| <div class="block"><i><l>Parser</l> configuration property: </i> Trim parsed strings.</div> |
| </td> |
| </tr> |
| <tr id="i230" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#trimStringsOnWrite--">trimStringsOnWrite</a></span>()</code> |
| <div class="block"><i><l>Serializer</l> configuration property: </i> Trim strings.</div> |
| </td> |
| </tr> |
| <tr id="i231" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#typeName-java.lang.Class-java.lang.String-">typeName</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> on, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value)</code> |
| <div class="block">An identifying name for this class.</div> |
| </td> |
| </tr> |
| <tr id="i232" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#typePropertyName-java.lang.Class-java.lang.String-">typePropertyName</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> on, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value)</code> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Bean type property name.</div> |
| </td> |
| </tr> |
| <tr id="i233" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#typePropertyName-java.lang.String-">typePropertyName</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value)</code> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Bean type property name.</div> |
| </td> |
| </tr> |
| <tr id="i234" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#uon--">uon</a></span>()</code> |
| <div class="block">Convenience method for specifying UON as the marshalling transmission media type.</div> |
| </td> |
| </tr> |
| <tr id="i235" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#upgrade-java.lang.Object-">upgrade</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> |
| <div class="block">Sets the value for the <c>Upgrade</c> request header on all requests.</div> |
| </td> |
| </tr> |
| <tr id="i236" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#uriContext-org.apache.juneau.UriContext-">uriContext</a></span>(<a href="../../../../../org/apache/juneau/UriContext.html" title="class in org.apache.juneau">UriContext</a> value)</code> |
| <div class="block"><i><l>Serializer</l> configuration property: </i> URI context bean.</div> |
| </td> |
| </tr> |
| <tr id="i237" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#uriRelativity-org.apache.juneau.UriRelativity-">uriRelativity</a></span>(<a href="../../../../../org/apache/juneau/UriRelativity.html" title="enum in org.apache.juneau">UriRelativity</a> value)</code> |
| <div class="block"><i><l>Serializer</l> configuration property: </i> URI relativity.</div> |
| </td> |
| </tr> |
| <tr id="i238" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#uriResolution-org.apache.juneau.UriResolution-">uriResolution</a></span>(<a href="../../../../../org/apache/juneau/UriResolution.html" title="enum in org.apache.juneau">UriResolution</a> value)</code> |
| <div class="block"><i><l>Serializer</l> configuration property: </i> URI resolution.</div> |
| </td> |
| </tr> |
| <tr id="i239" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#urlEnc--">urlEnc</a></span>()</code> |
| <div class="block">Convenience method for specifying URL-Encoding as the marshalling transmission media type.</div> |
| </td> |
| </tr> |
| <tr id="i240" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#useEnumNames--">useEnumNames</a></span>()</code> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Use enum names.</div> |
| </td> |
| </tr> |
| <tr id="i241" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#useJavaBeanIntrospector--">useJavaBeanIntrospector</a></span>()</code> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Use Java Introspector.</div> |
| </td> |
| </tr> |
| <tr id="i242" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#userAgent-java.lang.Object-">userAgent</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> |
| <div class="block">Sets the value for the <c>User-Agent</c> request header on all requests.</div> |
| </td> |
| </tr> |
| <tr id="i243" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#userAgent-java.lang.String-">userAgent</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> userAgent)</code> |
| <div class="block">Assigns <c>User-Agent</c> value.</div> |
| </td> |
| </tr> |
| <tr id="i244" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#userTokenHandler-org.apache.http.client.UserTokenHandler-">userTokenHandler</a></span>(<a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/UserTokenHandler.html?is-external=true" title="class or interface in org.apache.http.client">UserTokenHandler</a> userTokenHandler)</code> |
| <div class="block">Assigns <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/UserTokenHandler.html?is-external=true" title="class or interface in org.apache.http.client"><code>UserTokenHandler</code></a> instance.</div> |
| </td> |
| </tr> |
| <tr id="i245" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#useSystemProperties--">useSystemProperties</a></span>()</code> |
| <div class="block">Use system properties when creating and configuring default implementations.</div> |
| </td> |
| </tr> |
| <tr id="i246" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#useWhitespace--">useWhitespace</a></span>()</code> |
| <div class="block"><i><l>WriterSerializer</l> configuration property: </i> Use whitespace.</div> |
| </td> |
| </tr> |
| <tr id="i247" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#via-java.lang.Object-">via</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> |
| <div class="block">Sets the value for the <c>Via</c> request header on all requests.</div> |
| </td> |
| </tr> |
| <tr id="i248" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#warning-java.lang.Object-">warning</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> |
| <div class="block">Sets the value for the <c>Warning</c> request header on all requests.</div> |
| </td> |
| </tr> |
| <tr id="i249" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#ws--">ws</a></span>()</code> |
| <div class="block"><i><l>WriterSerializer</l> configuration property: </i> Use whitespace.</div> |
| </td> |
| </tr> |
| <tr id="i250" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html#xml--">xml</a></span>()</code> |
| <div class="block">Convenience method for specifying XML as the marshalling transmission media type.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.org.apache.juneau.rest.client2.RestClientBuilder"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class org.apache.juneau.rest.client2.<a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></h3> |
| <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#createConnectionManager--">createConnectionManager</a>, <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#createHttpClient--">createHttpClient</a>, <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#createHttpClientBuilder--">createHttpClientBuilder</a>, <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#universal--">universal</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.org.apache.juneau.BeanContextBuilder"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class org.apache.juneau.<a href="../../../../../org/apache/juneau/BeanContextBuilder.html" title="class in org.apache.juneau">BeanContextBuilder</a></h3> |
| <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#beanDictionary-java.lang.Class...-">beanDictionary</a>, <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#beanDictionary-java.lang.Object...-">beanDictionary</a>, <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#beanDictionaryRemove-java.lang.Class...-">beanDictionaryRemove</a>, <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#beanDictionaryRemove-java.lang.Object...-">beanDictionaryRemove</a>, <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#beanDictionaryReplace-java.lang.Class...-">beanDictionaryReplace</a>, <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#beanDictionaryReplace-java.lang.Object...-">beanDictionaryReplace</a>, <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#beanFilters-java.lang.Object...-">beanFilters</a>, <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#beanFiltersRemove-java.lang.Object...-">beanFiltersRemove</a>, <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#beanFiltersReplace-java.lang.Object...-">beanFiltersReplace</a>, <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#beanMapPutReturnsOldValue--">beanMapPutReturnsOldValue</a>, <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#beanMapPutReturnsOldValue-boolean-">beanMapPutReturnsOldValue</a>, <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#beansRequireDefaultConstructor-boolean-">beansRequireDefaultConstructor</a>, <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#beansRequireSerializable-boolean-">beansRequireSerializable</a>, <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#beansRequireSettersForGetters-boolean-">beansRequireSettersForGetters</a>, <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#beansRequireSomeProperties-boolean-">beansRequireSomeProperties</a>, <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#debug-boolean-">debug</a>, <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#example-java.lang.Class-T-">example</a>, <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#exampleJson-java.lang.Class-java.lang.String-">exampleJson</a>, <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#excludeProperties-java.lang.Class-java.lang.String-">excludeProperties</a>, <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#excludeProperties-java.util.Map-">excludeProperties</a>, <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#excludeProperties-java.lang.String-java.lang.String-">excludeProperties</a>, <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#fluentSetters-boolean-">fluentSetters</a>, <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#ignoreInvocationExceptionsOnGetters-boolean-">ignoreInvocationExceptionsOnGetters</a>, <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#ignoreInvocationExceptionsOnSetters-boolean-">ignoreInvocationExceptionsOnSetters</a>, <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#ignorePropertiesWithoutSetters-boolean-">ignorePropertiesWithoutSetters</a>, <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#ignoreTransientFields-boolean-">ignoreTransientFields</a>, <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#ignoreUnknownBeanProperties-boolean-">ignoreUnknownBeanProperties</a>, <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#ignoreUnknownNullBeanProperties-boolean-">ignoreUnknownNullBeanProperties</a>, <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#includeProperties-java.lang.Class-java.lang.String-">includeProperties</a>, <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#includeProperties-java.util.Map-">includeProperties</a>, <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#includeProperties-java.lang.String-java.lang.String-">includeProperties</a>, <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#pojoSwaps-java.lang.Object...-">pojoSwaps</a>, <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#pojoSwapsRemove-java.lang.Object...-">pojoSwapsRemove</a>, <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#pojoSwapsReplace-java.lang.Object...-">pojoSwapsReplace</a>, <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#sortProperties-boolean-">sortProperties</a>, <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#useEnumNames-boolean-">useEnumNames</a>, <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#useInterfaceProxies-boolean-">useInterfaceProxies</a>, <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#useJavaBeanIntrospector-boolean-">useJavaBeanIntrospector</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.org.apache.juneau.ContextBuilder"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class org.apache.juneau.<a href="../../../../../org/apache/juneau/ContextBuilder.html" title="class in org.apache.juneau">ContextBuilder</a></h3> |
| <code><a href="../../../../../org/apache/juneau/ContextBuilder.html#getPropertyStore--">getPropertyStore</a>, <a href="../../../../../org/apache/juneau/ContextBuilder.html#getPropertyStoreBuilder--">getPropertyStoreBuilder</a>, <a href="../../../../../org/apache/juneau/ContextBuilder.html#peek-java.lang.Class-java.lang.String-">peek</a>, <a href="../../../../../org/apache/juneau/ContextBuilder.html#peek-java.lang.String-">peek</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> |
| <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a name="MockRestClientBuilder-org.apache.juneau.PropertyStore-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>MockRestClientBuilder</h4> |
| <pre>protected <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.73">MockRestClientBuilder</a>(<a href="../../../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau">PropertyStore</a> ps)</pre> |
| <div class="block">Constructor.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>ps</code> - Initial configuration properties for this builder.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="MockRestClientBuilder--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>MockRestClientBuilder</h4> |
| <pre>protected <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.83">MockRestClientBuilder</a>()</pre> |
| <div class="block">No-arg constructor. |
| |
| <p> |
| Provided so that this class can be easily subclassed.</div> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="restBean-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>restBean</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.93">restBean</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> bean)</pre> |
| <div class="block">Specifies the <a href="../../../../../org/apache/juneau/rest/annotation/Rest.html" title="annotation in org.apache.juneau.rest.annotation"><code>Rest</code></a>-annotated bean class or instance to test against.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>bean</code> - The <a href="../../../../../org/apache/juneau/rest/annotation/Rest.html" title="annotation in org.apache.juneau.rest.annotation"><code>Rest</code></a>-annotated bean class or instance.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="contextPath-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>contextPath</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.118">contextPath</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value)</pre> |
| <div class="block">Identifies the context path for the REST resource. |
| |
| <p> |
| This value is used to deconstruct the request URL and set the appropriate URL getters on the <a href="https://docs.oracle.com/javaee/5/api/javax/servlet/http/HttpServletRequest.html?is-external=true" title="class or interface in javax.servlet.http"><code>HttpServletRequest</code></a> |
| object correctly. |
| |
| <p> |
| Should either be a value such as <js>"/foo"</js> or an empty string. |
| |
| <p> |
| The following fixes are applied to non-conforming strings. |
| <ul> |
| <li><jk>nulls</jk> and <js>"/"</js> are converted to empty strings. |
| <li>Trailing slashes are trimmed. |
| <li>Leading slash is added if needed. |
| </ul></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The context path.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="servletPath-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>servletPath</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.143">servletPath</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value)</pre> |
| <div class="block">Identifies the servlet path for the REST resource. |
| |
| <p> |
| This value is used to deconstruct the request URL and set the appropriate URL getters on the <a href="https://docs.oracle.com/javaee/5/api/javax/servlet/http/HttpServletRequest.html?is-external=true" title="class or interface in javax.servlet.http"><code>HttpServletRequest</code></a> |
| object correctly. |
| |
| <p> |
| Should either be a value such as <js>"/foo"</js> or an empty string. |
| |
| <p> |
| The following fixes are applied to non-conforming strings. |
| <ul> |
| <li><jk>nulls</jk> and <js>"/"</js> are converted to empty strings. |
| <li>Trailing slashes are trimmed. |
| <li>Leading slash is added if needed. |
| </ul></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The context path.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="build--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>build</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClient.html" title="class in org.apache.juneau.rest.mock2">MockRestClient</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.148">build</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/ContextBuilder.html#build--">ContextBuilder</a></code></span></div> |
| <div class="block">Build the object.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#build--">build</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The built object. |
| <br>Subsequent calls to this method will create new instances (unless context object is cacheable).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="build-java.lang.Class-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>build</h4> |
| <pre>public <T extends <a href="../../../../../org/apache/juneau/Context.html" title="class in org.apache.juneau">Context</a>> T <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.153">build</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> c)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/ContextBuilder.html#build-java.lang.Class-">ContextBuilder</a></code></span></div> |
| <div class="block">Build a new instance of the specified object. |
| |
| <p> |
| Creates a new instance of the specified context-based class, or an existing instance if one with the equivalent |
| property store was already created.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#build-java.lang.Class-">build</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>c</code> - The subclass of <a href="../../../../../org/apache/juneau/Context.html" title="class in org.apache.juneau"><code>Context</code></a> to instantiate.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>A new object using the settings defined in this builder.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="add-java.util.Map-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>add</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.163">add</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>> properties)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/ContextBuilder.html#add-java.util.Map-">ContextBuilder</a></code></span></div> |
| <div class="block">Adds multiple free-form configuration properties on this object without first clearing out any previous values. |
| |
| <p> |
| Identical in function to <a href="../../../../../org/apache/juneau/ContextBuilder.html#set-java.lang.String-java.lang.Object-"><code>ContextBuilder.set(String, Object)</code></a> but allows you to specify multiple values at once. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a serializer that sorts bean properties.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .sortMaps() |
| .sortProperties() |
| .build(); |
| |
| <jc>// Same, but use generic add() method.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .add( |
| AMap.<jsm>of</jsm>( |
| <jsf>BEAN_sortMaps</jsf>, <jk>true</jk>, |
| <jsf>BEAN_sortProperties</jsf>, <jk>true</jk> |
| ) |
| ) |
| .build(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jc'><a href="../../../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau"><code>PropertyStore</code></a> |
| <li class='jm'><a href="../../../../../org/apache/juneau/ContextBuilder.html#set-java.lang.String-java.lang.Object-"><code>ContextBuilder.set(String, Object)</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#add-java.util.Map-">add</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>properties</code> - The properties to set on this class. |
| <br>The keys must be strings. |
| <br>The valid value types depend on the property type: |
| <ul> |
| <li><js>"s"</js> - Any <l>Object</l> converted to a <l>String</l> using <c>value.toString()</c>. |
| <li><js>"b"</js> - Any <l>Object</l> converted to a <l>Boolean</l> using <c>Boolean.<jsm>parseBoolean</jsm>(value.toString())</c>. |
| <li><js>"i"</js> - Any <l>Object</l> converted to an <l>Integer</l> using <c>Integer.<jsm>valueOf</jsm>(value.toString())</c>. |
| <li><js>"c"</js> - Only <l>Class</l> objects are allowed. |
| <li><js>"o"</js> - Left as-is. |
| <li><js>"ss"</js>,<js>"si"</js>,<js>"sc"</js> - Any collection or array of any convertible <l>Objects</l> or a JSON Array string. |
| <li><js>"ls"</js>,<js>"li"</js>,<js>"lc"</js>,<js>"lo"</js> - Any collection or array of any convertible <l>Objects</l> or a JSON Array string. |
| <li><js>"sms"</js>,<js>"smi"</js>,<js>"smc"</js>,<js>"smo"</js> - Any sorted map of any convertible <l>Objects</l> or a JSON Object string. |
| <li><js>"oms"</js>,<js>"omi"</js>,<js>"omc"</js>,<js>"omo"</js> - Any ordered map of any convertible <l>Objects</l> or a JSON Object string. |
| </ul></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="addTo-java.lang.String-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addTo</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.169">addTo</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/ContextBuilder.html#addTo-java.lang.String-java.lang.Object-">ContextBuilder</a></code></span></div> |
| <div class="block">Adds a free-form value to a SET property. |
| |
| <p> |
| SET properties are those properties with one of the following type parts: |
| <ul> |
| <li><js>"ss"</js> - <c>TreeSet<String></c> |
| <li><js>"si"</js> - <c>TreeSet<Integer></c> |
| <li><js>"sc"</js> - <c>TreeSet<Class></c> |
| </ul> |
| |
| <p> |
| For example, the <a href="../../../../../org/apache/juneau/BeanContext.html#BEAN_notBeanClasses"><code>BeanContext.BEAN_notBeanClasses</code></a> property which has the value <js>"BeanContext.notBeanClasses.sc"</js>. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a serializer that forces MyNotBean classes to be converted to strings.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .notBeanClasses(MyNotBean.<jk>class</jk>) |
| .build(); |
| |
| <jc>// Same, but use generic addTo() method.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .addTo(<jsf>BEAN_notBeanClasses</jsf>, MyNotBean.<jk>class</jk>) |
| .build(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jc'><a href="../../../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau"><code>PropertyStore</code></a> |
| <li class='jm'><a href="../../../../../org/apache/juneau/ContextBuilder.html#set-java.lang.String-java.lang.Object-"><code>ContextBuilder.set(String, Object)</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#addTo-java.lang.String-java.lang.Object-">addTo</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - The property name.</dd> |
| <dd><code>value</code> - The new value to add to the SET property. |
| <br>The valid value types depend on the property type: |
| <ul> |
| <li><js>"ss"</js> - Any <l>Object</l> converted to a <l>String</l> using <c>value.toString()</c>. |
| <li><js>"si"</js> - Any <l>Object</l> converted to an <l>Integer</l> using <c>Integer.<jsm>valueOf</jsm>(value.toString())</c>. |
| <li><js>"sc"</js> - Only <l>Class</l> objects are allowed. |
| </ul></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="appendTo-java.lang.String-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>appendTo</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.175">appendTo</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/ContextBuilder.html#appendTo-java.lang.String-java.lang.Object-">ContextBuilder</a></code></span></div> |
| <div class="block">Adds a free-form value to the end of a LIST property. |
| |
| <p> |
| LIST properties are those properties with one of the following type parts: |
| <ul> |
| <li><js>"ls"</js> - <c>Linkedlist<String></c> |
| <li><js>"li"</js> - <c>Linkedlist<Integer></c> |
| <li><js>"lc"</js> - <c>Linkedlist<Class></c> |
| <li><js>"lo"</js> - <c>Linkedlist<Object></c> |
| </ul> |
| |
| <p> |
| For example, the <a href="../../../../../org/apache/juneau/BeanContext.html#BEAN_swaps"><code>BeanContext.BEAN_swaps</code></a> property which has the value <js>"BeanContext.swaps.lo"</js>. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a serializer that converts Temporal objects to Basic ISO date strings.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .swaps(TemoralCalendarSwap.BasicIsoDate.<jk>class</jk>) |
| .build(); |
| |
| <jc>// Same, but use generic appendTo() method.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .appendTo(<jsf>BEAN_swaps</jsf>, TemoralCalendarSwap.BasicIsoDate.<jk>class</jk>) |
| .build(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jc'><a href="../../../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau"><code>PropertyStore</code></a> |
| <li class='jm'><a href="../../../../../org/apache/juneau/ContextBuilder.html#set-java.lang.String-java.lang.Object-"><code>ContextBuilder.set(String, Object)</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#appendTo-java.lang.String-java.lang.Object-">appendTo</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - The property name.</dd> |
| <dd><code>value</code> - The new value to add to the LIST property. |
| <br>The valid value types depend on the property type: |
| <ul> |
| <li><js>"ls"</js> - Any <l>Object</l> converted to a <l>String</l> using <c>value.toString()</c>. |
| <li><js>"li"</js> - Any <l>Object</l> converted to an <l>Integer</l> using <c>Integer.<jsm>valueOf</jsm>(value.toString())</c>. |
| <li><js>"lc"</js> - Only <l>Class</l> objects are allowed. |
| <li><js>"lo"</js> - Left as-is. |
| </ul></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="apply-org.apache.juneau.PropertyStore-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>apply</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.181">apply</a>(<a href="../../../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau">PropertyStore</a> copyFrom)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/ContextBuilder.html#apply-org.apache.juneau.PropertyStore-">ContextBuilder</a></code></span></div> |
| <div class="block">Copies the settings from the specified property store into this builder. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a free-form set of properties.</jc> |
| PropertyStore ps = PropertyStore |
| .<jsm>create</jsm>() |
| .set(<jsf>BEAN_sortMaps</jsf>, <jk>true</jk>) |
| .set(<jsf>BEAN_sortProperties</jsf>, <jk>true</jk>) |
| .build(); |
| |
| <jc>// Create a serializer that uses those settings.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .apply(ps) |
| .build(); |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#apply-org.apache.juneau.PropertyStore-">apply</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>copyFrom</code> - The property store whose settings are being copied.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="applyAnnotations-java.lang.Class...-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>applyAnnotations</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.187">applyAnnotations</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?>... fromClasses)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/ContextBuilder.html#applyAnnotations-java.lang.Class...-">ContextBuilder</a></code></span></div> |
| <div class="block">Applies any of the various <ja>@XConfig</ja> annotations on the specified class to this context. |
| |
| <p> |
| Any annotations found that themselves are annotated with <a href="../../../../../org/apache/juneau/annotation/PropertyStoreApply.html" title="annotation in org.apache.juneau.annotation"><code>PropertyStoreApply</code></a> will be resolved and |
| applied as properties to this builder. These annotations include: |
| <ul class='javatree'> |
| <li class ='ja'><a href="../../../../../org/apache/juneau/annotation/BeanConfig.html" title="annotation in org.apache.juneau.annotation"><code>BeanConfig</code></a> |
| <li class ='ja'><a href="../../../../../org/apache/juneau/csv/annotation/CsvConfig.html" title="annotation in org.apache.juneau.csv.annotation"><code>CsvConfig</code></a> |
| <li class ='ja'><a href="../../../../../org/apache/juneau/html/annotation/HtmlConfig.html" title="annotation in org.apache.juneau.html.annotation"><code>HtmlConfig</code></a> |
| <li class ='ja'><a href="../../../../../org/apache/juneau/html/annotation/HtmlDocConfig.html" title="annotation in org.apache.juneau.html.annotation"><code>HtmlDocConfig</code></a> |
| <li class ='ja'><a href="../../../../../org/apache/juneau/jso/annotation/JsoConfig.html" title="annotation in org.apache.juneau.jso.annotation"><code>JsoConfig</code></a> |
| <li class ='ja'><a href="../../../../../org/apache/juneau/json/annotation/JsonConfig.html" title="annotation in org.apache.juneau.json.annotation"><code>JsonConfig</code></a> |
| <li class ='ja'><a href="../../../../../org/apache/juneau/jsonschema/annotation/JsonSchemaConfig.html" title="annotation in org.apache.juneau.jsonschema.annotation"><code>JsonSchemaConfig</code></a> |
| <li class ='ja'><a href="../../../../../org/apache/juneau/msgpack/annotation/MsgPackConfig.html" title="annotation in org.apache.juneau.msgpack.annotation"><code>MsgPackConfig</code></a> |
| <li class ='ja'><a href="../../../../../org/apache/juneau/oapi/annotation/OpenApiConfig.html" title="annotation in org.apache.juneau.oapi.annotation"><code>OpenApiConfig</code></a> |
| <li class ='ja'><a href="../../../../../org/apache/juneau/parser/annotation/ParserConfig.html" title="annotation in org.apache.juneau.parser.annotation"><code>ParserConfig</code></a> |
| <li class ='ja'><a href="../../../../../org/apache/juneau/plaintext/annotation/PlainTextConfig.html" title="annotation in org.apache.juneau.plaintext.annotation"><code>PlainTextConfig</code></a> |
| <li class ='ja'><a href="../../../../../org/apache/juneau/serializer/annotation/SerializerConfig.html" title="annotation in org.apache.juneau.serializer.annotation"><code>SerializerConfig</code></a> |
| <li class ='ja'><a href="../../../../../org/apache/juneau/soap/annotation/SoapXmlConfig.html" title="annotation in org.apache.juneau.soap.annotation"><code>SoapXmlConfig</code></a> |
| <li class ='ja'><a href="../../../../../org/apache/juneau/uon/annotation/UonConfig.html" title="annotation in org.apache.juneau.uon.annotation"><code>UonConfig</code></a> |
| <li class ='ja'><a href="../../../../../org/apache/juneau/urlencoding/annotation/UrlEncodingConfig.html" title="annotation in org.apache.juneau.urlencoding.annotation"><code>UrlEncodingConfig</code></a> |
| <li class ='ja'><a href="../../../../../org/apache/juneau/xml/annotation/XmlConfig.html" title="annotation in org.apache.juneau.xml.annotation"><code>XmlConfig</code></a> |
| <li class ='ja'><c>RdfConfig</c> |
| </ul> |
| |
| <p> |
| Annotations on classes are appended in the following order: |
| <ol> |
| <li>On the package of this class. |
| <li>On interfaces ordered parent-to-child. |
| <li>On parent classes ordered parent-to-child. |
| <li>On this class. |
| </ol> |
| |
| <p> |
| The default var resolver <a href="../../../../../org/apache/juneau/svl/VarResolver.html#DEFAULT"><code>VarResolver.DEFAULT</code></a> is used to resolve any variables in annotation field values. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// A class annotated with a config annotation.</jc> |
| <ja>@BeanConfig</ja>(sortProperties=<js>"$S{sortProperties,false}"</js>) |
| <jk>public class</jk> MyClass {...} |
| |
| <jc>// Apply any settings found on the annotations.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .applyAnnotations(MyClass.<jk>class</jk>) |
| .build(); |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#applyAnnotations-java.lang.Class...-">applyAnnotations</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>fromClasses</code> - The classes on which the annotations are defined.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="applyAnnotations-java.lang.reflect.Method...-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>applyAnnotations</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.193">applyAnnotations</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Method.html?is-external=true" title="class or interface in java.lang.reflect">Method</a>... fromMethods)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/ContextBuilder.html#applyAnnotations-java.lang.reflect.Method...-">ContextBuilder</a></code></span></div> |
| <div class="block">Applies any of the various <ja>@XConfig</ja> annotations on the specified method to this context. |
| |
| <p> |
| Any annotations found that themselves are annotated with <a href="../../../../../org/apache/juneau/annotation/PropertyStoreApply.html" title="annotation in org.apache.juneau.annotation"><code>PropertyStoreApply</code></a> will be resolved and |
| applied as properties to this builder. These annotations include: |
| <ul class='javatree'> |
| <li class ='ja'><a href="../../../../../org/apache/juneau/annotation/BeanConfig.html" title="annotation in org.apache.juneau.annotation"><code>BeanConfig</code></a> |
| <li class ='ja'><a href="../../../../../org/apache/juneau/csv/annotation/CsvConfig.html" title="annotation in org.apache.juneau.csv.annotation"><code>CsvConfig</code></a> |
| <li class ='ja'><a href="../../../../../org/apache/juneau/html/annotation/HtmlConfig.html" title="annotation in org.apache.juneau.html.annotation"><code>HtmlConfig</code></a> |
| <li class ='ja'><a href="../../../../../org/apache/juneau/html/annotation/HtmlDocConfig.html" title="annotation in org.apache.juneau.html.annotation"><code>HtmlDocConfig</code></a> |
| <li class ='ja'><a href="../../../../../org/apache/juneau/jso/annotation/JsoConfig.html" title="annotation in org.apache.juneau.jso.annotation"><code>JsoConfig</code></a> |
| <li class ='ja'><a href="../../../../../org/apache/juneau/json/annotation/JsonConfig.html" title="annotation in org.apache.juneau.json.annotation"><code>JsonConfig</code></a> |
| <li class ='ja'><a href="../../../../../org/apache/juneau/jsonschema/annotation/JsonSchemaConfig.html" title="annotation in org.apache.juneau.jsonschema.annotation"><code>JsonSchemaConfig</code></a> |
| <li class ='ja'><a href="../../../../../org/apache/juneau/msgpack/annotation/MsgPackConfig.html" title="annotation in org.apache.juneau.msgpack.annotation"><code>MsgPackConfig</code></a> |
| <li class ='ja'><a href="../../../../../org/apache/juneau/oapi/annotation/OpenApiConfig.html" title="annotation in org.apache.juneau.oapi.annotation"><code>OpenApiConfig</code></a> |
| <li class ='ja'><a href="../../../../../org/apache/juneau/parser/annotation/ParserConfig.html" title="annotation in org.apache.juneau.parser.annotation"><code>ParserConfig</code></a> |
| <li class ='ja'><a href="../../../../../org/apache/juneau/plaintext/annotation/PlainTextConfig.html" title="annotation in org.apache.juneau.plaintext.annotation"><code>PlainTextConfig</code></a> |
| <li class ='ja'><a href="../../../../../org/apache/juneau/serializer/annotation/SerializerConfig.html" title="annotation in org.apache.juneau.serializer.annotation"><code>SerializerConfig</code></a> |
| <li class ='ja'><a href="../../../../../org/apache/juneau/soap/annotation/SoapXmlConfig.html" title="annotation in org.apache.juneau.soap.annotation"><code>SoapXmlConfig</code></a> |
| <li class ='ja'><a href="../../../../../org/apache/juneau/uon/annotation/UonConfig.html" title="annotation in org.apache.juneau.uon.annotation"><code>UonConfig</code></a> |
| <li class ='ja'><a href="../../../../../org/apache/juneau/urlencoding/annotation/UrlEncodingConfig.html" title="annotation in org.apache.juneau.urlencoding.annotation"><code>UrlEncodingConfig</code></a> |
| <li class ='ja'><a href="../../../../../org/apache/juneau/xml/annotation/XmlConfig.html" title="annotation in org.apache.juneau.xml.annotation"><code>XmlConfig</code></a> |
| <li class ='ja'><c>RdfConfig</c> |
| </ul> |
| |
| <p> |
| Annotations on methods are appended in the following order: |
| <ol> |
| <li>On the package of the method class. |
| <li>On interfaces ordered parent-to-child. |
| <li>On parent classes ordered parent-to-child. |
| <li>On the method class. |
| <li>On this method and matching methods ordered parent-to-child. |
| </ol> |
| |
| <p> |
| The default var resolver <a href="../../../../../org/apache/juneau/svl/VarResolver.html#DEFAULT"><code>VarResolver.DEFAULT</code></a> is used to resolve any variables in annotation field values. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// A method annotated with a config annotation.</jc> |
| <jk>public class</jk> MyClass { |
| <ja>@BeanConfig</ja>(sortProperties=<js>"$S{sortProperties,false}"</js>) |
| <jk>public void</jk> myMethod() {...} |
| } |
| |
| <jc>// Apply any settings found on the annotations.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .applyAnnotations(MyClass.<jk>class</jk>.getMethod(<js>"myMethod"</js>)) |
| .build(); |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#applyAnnotations-java.lang.reflect.Method...-">applyAnnotations</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>fromMethods</code> - The methods on which the annotations are defined.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="applyAnnotations-org.apache.juneau.reflect.AnnotationList-org.apache.juneau.svl.VarResolverSession-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>applyAnnotations</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.199">applyAnnotations</a>(<a href="../../../../../org/apache/juneau/reflect/AnnotationList.html" title="class in org.apache.juneau.reflect">AnnotationList</a> al, |
| <a href="../../../../../org/apache/juneau/svl/VarResolverSession.html" title="class in org.apache.juneau.svl">VarResolverSession</a> r)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/ContextBuilder.html#applyAnnotations-org.apache.juneau.reflect.AnnotationList-org.apache.juneau.svl.VarResolverSession-">ContextBuilder</a></code></span></div> |
| <div class="block">Applies a set of annotations to this property store. |
| |
| <p> |
| The <a href="../../../../../org/apache/juneau/reflect/AnnotationList.html" title="class in org.apache.juneau.reflect"><code>AnnotationList</code></a> object is an ordered list of annotations and the classes/methods/packages they were found on. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// A class annotated with a config annotation.</jc> |
| <ja>@BeanConfig</ja>(sortProperties=<js>"$S{sortProperties,false}"</js>) |
| <jk>public class</jk> MyClass {...} |
| |
| <jc>// Find all annotations that themselves are annotated with @PropertyStoreApply.</jc> |
| AnnotationList al = ClassInfo.<jsm>of</jsm>(MyClass.<jk>class</jk>) |
| .getAnnotationList(ConfigAnnotationFilter.<jsf>INSTANCE</jsf>); |
| |
| <jc>// Use the default VarResolver to resolve any variables in the annotation fields.</jc> |
| VarResolverSession vs = VarResolver.<jsf>DEFAULT</jsf>.createSession(); |
| |
| <jc>// Apply any settings found on the annotations.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .applyAnnotations(al, vs) |
| .build(); |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#applyAnnotations-org.apache.juneau.reflect.AnnotationList-org.apache.juneau.svl.VarResolverSession-">applyAnnotations</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>al</code> - The list of all annotations annotated with <a href="../../../../../org/apache/juneau/annotation/PropertyStoreApply.html" title="annotation in org.apache.juneau.annotation"><code>PropertyStoreApply</code></a>.</dd> |
| <dd><code>r</code> - The string resolver for resolving variables in annotation values.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="debug--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>debug</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.205">debug</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/ContextBuilder.html#debug--">ContextBuilder</a></code></span></div> |
| <div class="block"><i><l>Context</l> configuration property: </i> Debug mode. |
| |
| <p> |
| Enables the following additional information during serialization: |
| <ul class='spaced-list'> |
| <li> |
| When bean getters throws exceptions, the exception includes the object stack information |
| in order to determine how that method was invoked. |
| <li> |
| Enables <a href="../../../../../org/apache/juneau/BeanTraverseContext.html#BEANTRAVERSE_detectRecursions"><code>BeanTraverseContext.BEANTRAVERSE_detectRecursions</code></a>. |
| </ul> |
| |
| <p> |
| Enables the following additional information during parsing: |
| <ul class='spaced-list'> |
| <li> |
| When bean setters throws exceptions, the exception includes the object stack information |
| in order to determine how that method was invoked. |
| </ul> |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a serializer with debug enabled.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .debug() |
| .build(); |
| |
| <jc>// Same, but use property.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .set(<jsf>BEAN_debug</jsf>, <jk>true</jk>) |
| .build(); |
| |
| <jc>// Create a POJO model with a recursive loop.</jc> |
| <jk>public class</jk> A { |
| <jk>public</jk> Object <jf>f</jf>; |
| } |
| A a = <jk>new</jk> A(); |
| a.<jf>f</jf> = a; |
| |
| <jc>// Throws a SerializeException and not a StackOverflowError</jc> |
| String json = s.serialize(a); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/Context.html#CONTEXT_debug"><code>Context.CONTEXT_debug</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#debug--">debug</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="locale-java.util.Locale-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>locale</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.211">locale</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util">Locale</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/ContextBuilder.html#locale-java.util.Locale-">ContextBuilder</a></code></span></div> |
| <div class="block"><i><l>Context</l> configuration property: </i> Locale. |
| |
| <p> |
| Specifies the default locale for serializer and parser sessions when not specified via <a href="../../../../../org/apache/juneau/SessionArgs.html#locale-java.util.Locale-"><code>SessionArgs.locale(Locale)</code></a>. |
| Typically used for POJO swaps that need to deal with locales such as swaps that convert <l>Date</l> and <l>Calendar</l> |
| objects to strings by accessing it via the session passed into the <a href="../../../../../org/apache/juneau/transform/PojoSwap.html#swap-org.apache.juneau.BeanSession-T-"><code>PojoSwap.swap(BeanSession, Object)</code></a> and |
| <a href="../../../../../org/apache/juneau/transform/PojoSwap.html#unswap-org.apache.juneau.BeanSession-S-org.apache.juneau.ClassMeta-java.lang.String-"><code>PojoSwap.unswap(BeanSession, Object, ClassMeta, String)</code></a> methods. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Define a POJO swap that skips serializing beans if we're in the UK.</jc> |
| <jk>public class</jk> MyBeanSwap <jk>extends</jk> StringSwap<MyBean> { |
| <ja>@Override</ja> |
| public String swap(BeanSession session, MyBean o) throws Exception { |
| <jk>if</jk> (session.getLocale().equals(Locale.<jsf>UK</jsf>)) |
| <jk>return null</jk>; |
| <jk>return</jk> o.toString(); |
| } |
| } |
| |
| <jc>// Create a serializer that uses the specified locale if it's not passed in through session args.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .locale(Locale.<jsf>UK</jsf>) |
| .pojoSwaps(MyBeanSwap.<jk>class</jk>) |
| .build(); |
| |
| <jc>// Same, but use property.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .set(<jsf>CONTEXT_locale</jsf>, Locale.<jsf>UK</jsf>) |
| .addTo(<jsf>BEAN_pojoSwaps</jsf>, MyBeanSwap.<jk>class</jk>) |
| .build(); |
| |
| <jc>// Define on session-args instead.</jc> |
| SerializerSessionArgs sessionArgs = <jk>new</jk> SerializerSessionArgs().locale(Locale.<jsf>UK</jsf>); |
| <jk>try</jk> (WriterSerializerSession session = s.createSession(sessionArgs)) { |
| |
| <jc>// Produces "null" if in the UK.</jc> |
| String json = s.serialize(<jk>new</jk> MyBean()); |
| } |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/Context.html#CONTEXT_locale"><code>Context.CONTEXT_locale</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#locale-java.util.Locale-">locale</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new value for this property.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="mediaType-org.apache.juneau.http.MediaType-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>mediaType</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.217">mediaType</a>(<a href="../../../../../org/apache/juneau/http/MediaType.html" title="class in org.apache.juneau.http">MediaType</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/ContextBuilder.html#mediaType-org.apache.juneau.http.MediaType-">ContextBuilder</a></code></span></div> |
| <div class="block"><i><l>Context</l> configuration property: </i> Media type. |
| |
| <p> |
| Specifies the default media type for serializer and parser sessions when not specified via <a href="../../../../../org/apache/juneau/SessionArgs.html#mediaType-org.apache.juneau.http.MediaType-"><code>SessionArgs.mediaType(MediaType)</code></a>. |
| Typically used for POJO swaps that need to serialize the same POJO classes differently depending on |
| the specific requested media type. For example, a swap could handle a request for media types <js>"application/json"</js> |
| and <js>"application/json+foo"</js> slightly differently even though they're both being handled by the same JSON |
| serializer or parser. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Define a POJO swap that skips serializing beans if the media type is application/json.</jc> |
| <jk>public class</jk> MyBeanSwap <jk>extends</jk> StringSwap<MyBean> { |
| <ja>@Override</ja> |
| public String swap(BeanSession session, MyBean o) throws Exception { |
| <jk>if</jk> (session.getMediaType().equals(<js>"application/json"</js>)) |
| <jk>return null</jk>; |
| <jk>return</jk> o.toString(); |
| } |
| } |
| |
| <jc>// Create a serializer that uses the specified media type if it's not passed in through session args.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .mediaType(MediaType.<jsf>JSON</jsf>) |
| .build(); |
| |
| <jc>// Same, but use property.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .set(<jsf>CONTEXT_mediaType</jsf>, MediaType.<jsf>JSON</jsf>) |
| .build(); |
| |
| <jc>// Define on session-args instead.</jc> |
| SerializerSessionArgs sessionArgs = <jk>new</jk> SerializerSessionArgs().mediaType(MediaType.<jsf>JSON</jsf>); |
| <jk>try</jk> (WriterSerializerSession session = s.createSession(sessionArgs)) { |
| |
| <jc>// Produces "null" since it's JSON.</jc> |
| String json = s.serialize(<jk>new</jk> MyBean()); |
| } |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/Context.html#CONTEXT_mediaType"><code>Context.CONTEXT_mediaType</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#mediaType-org.apache.juneau.http.MediaType-">mediaType</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new value for this property.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="prependTo-java.lang.String-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>prependTo</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.223">prependTo</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/ContextBuilder.html#prependTo-java.lang.String-java.lang.Object-">ContextBuilder</a></code></span></div> |
| <div class="block">Adds a free-form value to the beginning of a LIST property. |
| |
| <p> |
| LIST properties are those properties with one of the following type parts: |
| <ul> |
| <li><js>"ls"</js> - <c>Linkedlist<String></c> |
| <li><js>"li"</js> - <c>Linkedlist<Integer></c> |
| <li><js>"lc"</js> - <c>Linkedlist<Class></c> |
| <li><js>"lo"</js> - <c>Linkedlist<Object></c> |
| </ul> |
| |
| <p> |
| For example, the <a href="../../../../../org/apache/juneau/BeanContext.html#BEAN_swaps"><code>BeanContext.BEAN_swaps</code></a> property which has the value <js>"BeanContext.swaps.lo"</js>. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a serializer that converts Temporal objects to Basic ISO date strings.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .swaps(TemoralCalendarSwap.BasicIsoDate.<jk>class</jk>) |
| .build(); |
| |
| <jc>// Same, but use generic prependTo() method.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .prependTo(<jsf>BEAN_swaps</jsf>, TemoralCalendarSwap.BasicIsoDate.<jk>class</jk>) |
| .build(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jc'><a href="../../../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau"><code>PropertyStore</code></a> |
| <li class='jm'><a href="../../../../../org/apache/juneau/ContextBuilder.html#set-java.lang.String-java.lang.Object-"><code>ContextBuilder.set(String, Object)</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#prependTo-java.lang.String-java.lang.Object-">prependTo</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - The property name.</dd> |
| <dd><code>value</code> - The new value to add to the LIST property. |
| <br>The valid value types depend on the property type: |
| <ul> |
| <li><js>"ls"</js> - Any <l>Object</l> converted to a <l>String</l> using <c>value.toString()</c>. |
| <li><js>"li"</js> - Any <l>Object</l> converted to an <l>Integer</l> using <c>Integer.<jsm>valueOf</jsm>(value.toString())</c>. |
| <li><js>"lc"</js> - Only <l>Class</l> objects are allowed. |
| <li><js>"lo"</js> - Left as-is. |
| </ul></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="putAllTo-java.lang.String-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>putAllTo</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.229">putAllTo</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/ContextBuilder.html#putAllTo-java.lang.String-java.lang.Object-">ContextBuilder</a></code></span></div> |
| <div class="block">Adds or overwrites multiple free-form entries in a MAP property. |
| |
| <p> |
| MAP properties are those properties with one of the following type parts: |
| <ul> |
| <li><js>"sms"</js> - <c>TreeMap<String,String></c> |
| <li><js>"smi"</js> - <c>TreeMap<String,Integer></c> |
| <li><js>"smc"</js> - <c>TreeMap<String,Class></c> |
| <li><js>"smo"</js> - <c>TreeMap<String,Object></c> |
| <li><js>"oms"</js> - <c>LinkedHashMap<String,String></c> |
| <li><js>"omi"</js> - <c>LinkedHashMap<String,Integer></c> |
| <li><js>"omc"</js> - <c>LinkedHashMap<String,Class></c> |
| <li><js>"omo"</js> - <c>LinkedHashMap<String,Object></c> |
| </ul> |
| |
| <p> |
| For example, the <a href="../../../../../org/apache/juneau/BeanContext.html#BEAN_implClasses"><code>BeanContext.BEAN_implClasses</code></a> property which has the value <js>"BeanContext.implClasses.smc"</js>. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a serializer that specifies the concrete implementation class for an interface.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .implClass(MyInterface.<jk>class</jk>, MyImplementation.<jk>class</jk>) |
| .build(); |
| |
| <jc>// Same, but use generic putAllTo() method.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .putAllTo(<jsf>BEAN_implClasses</jsf>, |
| AMap.<jsm>of</jsm>(MyInterface.<jk>class</jk>.getName(), MyImplementation.<jk>class</jk>) |
| ) |
| .build(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jc'><a href="../../../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau"><code>PropertyStore</code></a> |
| <li class='jm'><a href="../../../../../org/apache/juneau/ContextBuilder.html#set-java.lang.String-java.lang.Object-"><code>ContextBuilder.set(String, Object)</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#putAllTo-java.lang.String-java.lang.Object-">putAllTo</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - The property name.</dd> |
| <dd><code>value</code> - Either a JSON Object string or a <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><code>Map</code></a> whose valid value types depend on the property type: |
| <ul> |
| <li><js>"sms"</js>,<js>"oms"</js> - Any <l>Object</l> converted to a <l>String</l> using <c>value.toString()</c>. |
| <li><js>"smi"</js>,<js>"omi"</js> - Any <l>Object</l> converted to an <l>Integer</l> using <c>Integer.<jsm>valueOf</jsm>(value.toString())</c>. |
| <li><js>"smc"</js>,<js>"omc"</js> - Only <l>Class</l> objects are allowed. |
| <li><js>"smo"</js>,<js>"omo"</js> - Left as-is. |
| </ul></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="putTo-java.lang.String-java.lang.String-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>putTo</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.235">putTo</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/ContextBuilder.html#putTo-java.lang.String-java.lang.String-java.lang.Object-">ContextBuilder</a></code></span></div> |
| <div class="block">Adds or overwrites a free-form entry in a MAP property. |
| |
| <p> |
| MAP properties are those properties with one of the following type parts: |
| <ul> |
| <li><js>"sms"</js> - <c>TreeMap<String,String></c> |
| <li><js>"smi"</js> - <c>TreeMap<String,Integer></c> |
| <li><js>"smc"</js> - <c>TreeMap<String,Class></c> |
| <li><js>"smo"</js> - <c>TreeMap<String,Object></c> |
| <li><js>"oms"</js> - <c>LinkedHashMap<String,String></c> |
| <li><js>"omi"</js> - <c>LinkedHashMap<String,Integer></c> |
| <li><js>"omc"</js> - <c>LinkedHashMap<String,Class></c> |
| <li><js>"omo"</js> - <c>LinkedHashMap<String,Object></c> |
| </ul> |
| |
| <p> |
| For example, the <a href="../../../../../org/apache/juneau/BeanContext.html#BEAN_implClasses"><code>BeanContext.BEAN_implClasses</code></a> property which has the value <js>"BeanContext.implClasses.smc"</js>. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a serializer that specifies the concrete implementation class for an interface.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .implClass(MyInterface.<jk>class</jk>, MyImplementation.<jk>class</jk>) |
| .build(); |
| |
| <jc>// Same, but use generic putTo() method.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .putTo(<jsf>BEAN_implClasses</jsf>, MyInterface.<jk>class</jk>.getName(), MyImplementation.<jk>class</jk>) |
| .build(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jc'><a href="../../../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau"><code>PropertyStore</code></a> |
| <li class='jm'><a href="../../../../../org/apache/juneau/ContextBuilder.html#set-java.lang.String-java.lang.Object-"><code>ContextBuilder.set(String, Object)</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#putTo-java.lang.String-java.lang.String-java.lang.Object-">putTo</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - The property name.</dd> |
| <dd><code>key</code> - The property value map key.</dd> |
| <dd><code>value</code> - The property value map value. |
| <br>The valid value types depend on the property type: |
| <ul> |
| <li><js>"sms"</js>,<js>"oms"</js> - Any <l>Object</l> converted to a <l>String</l> using <c>value.toString()</c>. |
| <li><js>"smi"</js>,<js>"omi"</js> - Any <l>Object</l> converted to an <l>Integer</l> using <c>Integer.<jsm>valueOf</jsm>(value.toString())</c>. |
| <li><js>"smc"</js>,<js>"omc"</js> - Only <l>Class</l> objects are allowed. |
| <li><js>"smo"</js>,<js>"omo"</js> - Left as-is. |
| </ul></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="removeFrom-java.lang.String-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>removeFrom</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.241">removeFrom</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/ContextBuilder.html#removeFrom-java.lang.String-java.lang.Object-">ContextBuilder</a></code></span></div> |
| <div class="block">Removes a free-form value from a SET, LIST, or MAP property. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a serializer that specifies the concrete implementation class for an interface.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .swaps(TemoralCalendarSwap.BasicIsoDate.<jk>class</jk>) |
| .build(); |
| |
| <jc>// Clone the previous serializer but remove the swap.</jc> |
| s = s |
| .<jsm>builder</jsm>() |
| .removeFrom(<jsf>BEAN_swaps</jsf>, TemoralCalendarSwap.BasicIsoDate.<jk>class</jk>) |
| .build(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jc'><a href="../../../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau"><code>PropertyStore</code></a> |
| <li class='jm'><a href="../../../../../org/apache/juneau/ContextBuilder.html#set-java.lang.String-java.lang.Object-"><code>ContextBuilder.set(String, Object)</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#removeFrom-java.lang.String-java.lang.Object-">removeFrom</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - The property name.</dd> |
| <dd><code>value</code> - The property value in the SET/LIST/MAP property.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="set-java.util.Map-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>set</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.247">set</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>> properties)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/ContextBuilder.html#set-java.util.Map-">ContextBuilder</a></code></span></div> |
| <div class="block">Sets multiple free-form configuration properties on this object replacing all previous values. |
| |
| <p> |
| Identical in function to <a href="../../../../../org/apache/juneau/ContextBuilder.html#set-java.lang.String-java.lang.Object-"><code>ContextBuilder.set(String, Object)</code></a> but allows you to specify multiple values at once. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a serializer that sorts maps and bean properties.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .sortMaps() |
| .sortProperties() |
| .build(); |
| |
| <jc>// Same, but use generic set(Map) method.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .set( |
| AMap.<jsm>of</jsm>( |
| <jsf>BEAN_sortMaps</jsf>, <jk>true</jk>, |
| <jsf>BEAN_sortProperties</jsf>, <jk>true</jk> |
| ) |
| ) |
| .build(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jc'><a href="../../../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau"><code>PropertyStore</code></a> |
| <li class='jm'><a href="../../../../../org/apache/juneau/ContextBuilder.html#set-java.lang.String-java.lang.Object-"><code>ContextBuilder.set(String, Object)</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#set-java.util.Map-">set</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>properties</code> - The properties to set on this class. |
| <br>The keys must be strings. |
| <br>The valid value types depend on the property type: |
| <ul> |
| <li><js>"s"</js> - Any <l>Object</l> converted to a <l>String</l> using <c>value.toString()</c>. |
| <li><js>"b"</js> - Any <l>Object</l> converted to a <l>Boolean</l> using <c>Boolean.<jsm>parseBoolean</jsm>(value.toString())</c>. |
| <li><js>"i"</js> - Any <l>Object</l> converted to an <l>Integer</l> using <c>Integer.<jsm>valueOf</jsm>(value.toString())</c>. |
| <li><js>"c"</js> - Only <l>Class</l> objects are allowed. |
| <li><js>"o"</js> - Left as-is. |
| <li><js>"ss"</js>,<js>"si"</js>,<js>"sc"</js> - Any collection or array of any convertible <l>Objects</l> or a JSON Array string. |
| <li><js>"ls"</js>,<js>"li"</js>,<js>"lc"</js>,<js>"lo"</js> - Any collection or array of any convertible <l>Objects</l> or a JSON Array string. |
| <li><js>"sms"</js>,<js>"smi"</js>,<js>"smc"</js>,<js>"smo"</js> - Any sorted map of any convertible <l>Objects</l> or a JSON Object string. |
| <li><js>"oms"</js>,<js>"omi"</js>,<js>"omc"</js>,<js>"omo"</js> - Any ordered map of any convertible <l>Objects</l> or a JSON Object string. |
| </ul></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="set-java.lang.String-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>set</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.253">set</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/ContextBuilder.html#set-java.lang.String-java.lang.Object-">ContextBuilder</a></code></span></div> |
| <div class="block">Sets a free-form configuration property on this object. |
| |
| <p> |
| Provides the ability to specify configuration property values in a generic fashion. |
| |
| <p> |
| Property names must have the following format that identify their datatype... |
| <p class='bcode w800'> |
| <js>"{class}.{name}.{type}"</js> |
| </p> |
| <p> |
| ...where the parts consist of the following... |
| <ul> |
| <li><js>"{class}"</js> - The group name of the property (e.g. <js>"JsonSerializer"</js>). |
| <br>It's always going to be the simple class name of the class it's associated with. |
| <li><js>"{name}"</js> - The property name (e.g. <js>"useWhitespace"</js>). |
| <li><js>"{type}"</js> - The property data type. |
| <br>A 1 or 2 character string that identifies the data type of the property. |
| <br>Valid values are: |
| <ul> |
| <li><js>"s"</js> - <c>String</c> |
| <li><js>"b"</js> - <c>Boolean</c> |
| <li><js>"i"</js> - <c>Integer</c> |
| <li><js>"c"</js> - <c>Class</c> |
| <li><js>"o"</js> - <c>Object</c> |
| <li><js>"ss"</js> - <c>TreeSet<String></c> |
| <li><js>"si"</js> - <c>TreeSet<Integer></c> |
| <li><js>"sc"</js> - <c>TreeSet<Class></c> |
| <li><js>"ls"</js> - <c>Linkedlist<String></c> |
| <li><js>"li"</js> - <c>Linkedlist<Integer></c> |
| <li><js>"lc"</js> - <c>Linkedlist<Class></c> |
| <li><js>"lo"</js> - <c>Linkedlist<Object></c> |
| <li><js>"sms"</js> - <c>TreeMap<String,String></c> |
| <li><js>"smi"</js> - <c>TreeMap<String,Integer></c> |
| <li><js>"smc"</js> - <c>TreeMap<String,Class></c> |
| <li><js>"smo"</js> - <c>TreeMap<String,Object></c> |
| <li><js>"oms"</js> - <c>LinkedHashMap<String,String></c> |
| <li><js>"omi"</js> - <c>LinkedHashMap<String,Integer></c> |
| <li><js>"omc"</js> - <c>LinkedHashMap<String,Class></c> |
| <li><js>"omo"</js> - <c>LinkedHashMap<String,Object></c> |
| </ul> |
| </ul> |
| |
| <p> |
| For example, <js>"BeanContext.swaps.lc"</js> refers to a property on the <l>BeanContext</l> class |
| called <l>swaps</l> that has a data type of <l>List<Class></l>. |
| |
| <p> |
| Property values get 'normalized' when they get set. |
| For example, calling <c>set(<js>"BeanContext.debug.b"</js>, <js>"true"</js>)</c> will cause the property |
| value to be converted to a boolean. This allows the underlying <a href="../../../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau"><code>PropertyStore</code></a> class to be comparable |
| and useful in determining whether a cached instance of a context object can be returned. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a serializer that sorts maps and bean properties.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .sortMaps() |
| .sortProperties() |
| .build(); |
| |
| <jc>// Same, but use generic set() method.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .set(<jsf>BEAN_sortMaps</jsf>, <jk>true</jk>) |
| .set(<jsf>BEAN_sortProperties</jsf>, <jk>true</jk>) |
| .build(); |
| </p> |
| |
| <p> |
| As a general rule, builders don't typically have "unsetter" methods. For example, once you've set strict |
| mode on the <l>ParserBuilder</l> class, a method does not exist for unsetting it. |
| This method can be used in these rare cases where you need to unset a value by setting it to <jk>null</jk>. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Clone an existing serializer and unset the sort settings.</jc> |
| s = s.<jsm>builder</jsm>() |
| .set(<jsf>BEAN_sortMaps</jsf>, <jk>null</jk>) |
| .set(<jsf>BEAN_sortProperties</jsf>, <jk>null</jk>) |
| .build(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jc'><a href="../../../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau"><code>PropertyStore</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#set-java.lang.String-java.lang.Object-">set</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - The property name.</dd> |
| <dd><code>value</code> - The property value. |
| <br>The valid value types depend on the property type: |
| <ul> |
| <li><js>"s"</js> - Any <l>Object</l> converted to a <l>String</l> using <c>value.toString()</c>. |
| <li><js>"b"</js> - Any <l>Object</l> converted to a <l>Boolean</l> using <c>Boolean.<jsm>parseBoolean</jsm>(value.toString())</c>. |
| <li><js>"i"</js> - Any <l>Object</l> converted to an <l>Integer</l> using <c>Integer.<jsm>valueOf</jsm>(value.toString())</c>. |
| <li><js>"c"</js> - Only <l>Class</l> objects are allowed. |
| <li><js>"o"</js> - Left as-is. |
| <li><js>"ss"</js>,<js>"si"</js>,<js>"sc"</js> - Any collection or array of any convertible <l>Objects</l> or a JSON Array string. |
| <li><js>"ls"</js>,<js>"li"</js>,<js>"lc"</js>,<js>"lo"</js> - Any collection or array of any convertible <l>Objects</l> or a JSON Array string. |
| <li><js>"sms"</js>,<js>"smi"</js>,<js>"smc"</js>,<js>"smo"</js> - Any sorted map of any convertible <l>Objects</l> or a JSON Object string. |
| <li><js>"oms"</js>,<js>"omi"</js>,<js>"omc"</js>,<js>"omo"</js> - Any ordered map of any convertible <l>Objects</l> or a JSON Object string. |
| </ul></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="timeZone-java.util.TimeZone-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>timeZone</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.259">timeZone</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/TimeZone.html?is-external=true" title="class or interface in java.util">TimeZone</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/ContextBuilder.html#timeZone-java.util.TimeZone-">ContextBuilder</a></code></span></div> |
| <div class="block"><i><l>Context</l> configuration property: </i> TimeZone. |
| |
| <p> |
| Specifies the default time zone for serializer and parser sessions when not specified via <a href="../../../../../org/apache/juneau/SessionArgs.html#timeZone-java.util.TimeZone-"><code>SessionArgs.timeZone(TimeZone)</code></a>. |
| Typically used for POJO swaps that need to deal with timezones such as swaps that convert <l>Date</l> and <l>Calendar</l> |
| objects to strings by accessing it via the session passed into the <a href="../../../../../org/apache/juneau/transform/PojoSwap.html#swap-org.apache.juneau.BeanSession-T-"><code>PojoSwap.swap(BeanSession, Object)</code></a> and |
| <a href="../../../../../org/apache/juneau/transform/PojoSwap.html#unswap-org.apache.juneau.BeanSession-S-org.apache.juneau.ClassMeta-java.lang.String-"><code>PojoSwap.unswap(BeanSession, Object, ClassMeta, String)</code></a> methods. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Define a POJO swap that skips serializing beans if the time zone is GMT.</jc> |
| <jk>public class</jk> MyBeanSwap <jk>extends</jk> StringSwap<MyBean> { |
| <ja>@Override</ja> |
| public String swap(BeanSession session, MyBean o) throws Exception { |
| <jk>if</jk> (session.getTimeZone().equals(TimeZone.<jsf>GMT</jsf>)) |
| <jk>return null</jk>; |
| <jk>return</jk> o.toString(); |
| } |
| } |
| |
| <jc>// Create a serializer that uses GMT if the timezone is not specified in the session args.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .timeZone(TimeZone.<jsf>GMT</jsf>) |
| .build(); |
| |
| <jc>// Same, but use property.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .set(<jsf>CONTEXT_timeZone</jsf>, TimeZone.<jsf>GMT</jsf>) |
| .build(); |
| |
| <jc>// Define on session-args instead.</jc> |
| SerializerSessionArgs sessionArgs = <jk>new</jk> SerializerSessionArgs().timeZone(TimeZone.<jsf>GMT</jsf>); |
| <jk>try</jk> (WriterSerializerSession ss = JsonSerializer.<jsf>DEFAULT</jsf>.createSession(sessionArgs)) { |
| |
| <jc>// Produces "null" since the time zone is GMT.</jc> |
| String json = s.serialize(<jk>new</jk> MyBean()); |
| } |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/Context.html#CONTEXT_timeZone"><code>Context.CONTEXT_timeZone</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#timeZone-java.util.TimeZone-">timeZone</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new value for this property.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="annotations-java.lang.annotation.Annotation...-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>annotations</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.265">annotations</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Annotation.html?is-external=true" title="class or interface in java.lang.annotation">Annotation</a>... values)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#annotations-java.lang.annotation.Annotation...-">BeanContextBuilder</a></code></span></div> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Dynamically applied POJO annotations. |
| |
| <p> |
| Defines annotations to apply to specific classes and methods. |
| |
| <p> |
| Allows you to dynamically apply Juneau annotations typically applied directly to classes and methods. |
| Useful in cases where you want to use the functionality of the annotation on beans and bean properties but |
| do not have access to the code to do so. |
| |
| <p> |
| As a rule, any Juneau annotation with an <c>on()</c> method can be used with this property. |
| |
| <p> |
| The following example shows the equivalent methods for applying the <a href="../../../../../org/apache/juneau/annotation/Bean.html" title="annotation in org.apache.juneau.annotation"><code>@Bean</code></a> annotation: |
| <p class='bcode w800'> |
| <jc>// Class with explicit annotation.</jc> |
| <ja>@Bean</ja>(bpi=<js>"street,city,state"</js>) |
| <jk>public class</jk> A {...} |
| |
| <jc>// Class with annotation applied via @BeanConfig</jc> |
| <jk>public class</jk> B {...} |
| |
| <jc>// Java REST method with @BeanConfig annotation.</jc> |
| <ja>@RestMethod</ja>(...) |
| <ja>@BeanConfig</ja>( |
| annotations={ |
| <ja>@Bean</ja>(on=<js>"B"</js>, bpi=<js>"street,city,state"</js>) |
| } |
| ) |
| <jk>public void</jk> doFoo() {...} |
| </p> |
| |
| <p> |
| In general, the underlying framework uses this method when it finds dynamically applied annotations on |
| config annotations. However, concrete implementations of annotations are also provided that can be passed |
| directly into builder classes like so: |
| <p class='bcode w800'> |
| <jc>// Create a concrete @Bean annotation.</jc> |
| BeanAnnotation a = <jk>new</jk> BeanAnnotation(<js>"B"</js>).bpi(<js>"street,city,state"</js>); |
| |
| <jc>// Apply it to a serializer.</jc> |
| WriterSerializer ws = JsonSerializer.<jsm>create</jsm>().annotations(a).build(); |
| |
| <jc>// Serialize a bean with the dynamically applied annotation.</jc> |
| String json = ws.serialize(<jk>new</jk> B()); |
| </p> |
| |
| <p> |
| The following is the list of concrete annotations provided that can be constructed and passed into the builder |
| class: |
| <ul class='javatree'> |
| <li class='ja'><a href="../../../../../org/apache/juneau/annotation/BeanAnnotation.html" title="class in org.apache.juneau.annotation"><code>BeanAnnotation</code></a> |
| <li class='ja'><a href="../../../../../org/apache/juneau/annotation/BeancAnnotation.html" title="class in org.apache.juneau.annotation"><code>BeancAnnotation</code></a> |
| <li class='ja'><a href="../../../../../org/apache/juneau/annotation/BeanIgnoreAnnotation.html" title="class in org.apache.juneau.annotation"><code>BeanIgnoreAnnotation</code></a> |
| <li class='ja'><a href="../../../../../org/apache/juneau/annotation/BeanpAnnotation.html" title="class in org.apache.juneau.annotation"><code>BeanpAnnotation</code></a> |
| <li class='ja'><a href="../../../../../org/apache/juneau/annotation/ExampleAnnotation.html" title="class in org.apache.juneau.annotation"><code>ExampleAnnotation</code></a> |
| <li class='ja'><a href="../../../../../org/apache/juneau/annotation/NamePropertyAnnotation.html" title="class in org.apache.juneau.annotation"><code>NamePropertyAnnotation</code></a> |
| <li class='ja'><a href="../../../../../org/apache/juneau/annotation/ParentPropertyAnnotation.html" title="class in org.apache.juneau.annotation"><code>ParentPropertyAnnotation</code></a> |
| <li class='ja'><a href="../../../../../org/apache/juneau/annotation/SwapAnnotation.html" title="class in org.apache.juneau.annotation"><code>SwapAnnotation</code></a> |
| <li class='ja'><a href="../../../../../org/apache/juneau/annotation/UriAnnotation.html" title="class in org.apache.juneau.annotation"><code>UriAnnotation</code></a> |
| <li class='ja'><a href="../../../../../org/apache/juneau/csv/annotation/CsvAnnotation.html" title="class in org.apache.juneau.csv.annotation"><code>CsvAnnotation</code></a> |
| <li class='ja'><a href="../../../../../org/apache/juneau/html/annotation/HtmlAnnotation.html" title="class in org.apache.juneau.html.annotation"><code>HtmlAnnotation</code></a> |
| <li class='ja'><a href="../../../../../org/apache/juneau/jso/annotation/JsoAnnotation.html" title="class in org.apache.juneau.jso.annotation"><code>JsoAnnotation</code></a> |
| <li class='ja'><a href="../../../../../org/apache/juneau/json/annotation/JsonAnnotation.html" title="class in org.apache.juneau.json.annotation"><code>JsonAnnotation</code></a> |
| <li class='ja'><a href="../../../../../org/apache/juneau/jsonschema/annotation/SchemaAnnotation.html" title="class in org.apache.juneau.jsonschema.annotation"><code>SchemaAnnotation</code></a> |
| <li class='ja'><a href="../../../../../org/apache/juneau/msgpack/annotation/MsgPackAnnotation.html" title="class in org.apache.juneau.msgpack.annotation"><code>MsgPackAnnotation</code></a> |
| <li class='ja'><a href="../../../../../org/apache/juneau/oapi/annotation/OpenApiAnnotation.html" title="class in org.apache.juneau.oapi.annotation"><code>OpenApiAnnotation</code></a> |
| <li class='ja'><a href="../../../../../org/apache/juneau/plaintext/annotation/PlainTextAnnotation.html" title="class in org.apache.juneau.plaintext.annotation"><code>PlainTextAnnotation</code></a> |
| <li class='ja'><a href="../../../../../org/apache/juneau/soap/annotation/SoapXmlAnnotation.html" title="class in org.apache.juneau.soap.annotation"><code>SoapXmlAnnotation</code></a> |
| <li class='ja'><a href="../../../../../org/apache/juneau/uon/annotation/UonAnnotation.html" title="class in org.apache.juneau.uon.annotation"><code>UonAnnotation</code></a> |
| <li class='ja'><a href="../../../../../org/apache/juneau/urlencoding/annotation/UrlEncodingAnnotation.html" title="class in org.apache.juneau.urlencoding.annotation"><code>UrlEncodingAnnotation</code></a> |
| <li class='ja'><a href="../../../../../org/apache/juneau/xml/annotation/XmlAnnotation.html" title="class in org.apache.juneau.xml.annotation"><code>XmlAnnotation</code></a> |
| </ul> |
| |
| <p> |
| The syntax for the <l>on()</l> pattern match parameter depends on whether it applies to a class, method, field, or constructor. |
| The valid pattern matches are: |
| <ul class='spaced-list'> |
| <li>Classes: |
| <ul> |
| <li>Fully qualified: |
| <ul> |
| <li><js>"com.foo.MyClass"</js> |
| </ul> |
| <li>Fully qualified inner class: |
| <ul> |
| <li><js>"com.foo.MyClass$Inner1$Inner2"</js> |
| </ul> |
| <li>Simple: |
| <ul> |
| <li><js>"MyClass"</js> |
| </ul> |
| <li>Simple inner: |
| <ul> |
| <li><js>"MyClass$Inner1$Inner2"</js> |
| <li><js>"Inner1$Inner2"</js> |
| <li><js>"Inner2"</js> |
| </ul> |
| </ul> |
| <li>Methods: |
| <ul> |
| <li>Fully qualified with args: |
| <ul> |
| <li><js>"com.foo.MyClass.myMethod(String,int)"</js> |
| <li><js>"com.foo.MyClass.myMethod(java.lang.String,int)"</js> |
| <li><js>"com.foo.MyClass.myMethod()"</js> |
| </ul> |
| <li>Fully qualified: |
| <ul> |
| <li><js>"com.foo.MyClass.myMethod"</js> |
| </ul> |
| <li>Simple with args: |
| <ul> |
| <li><js>"MyClass.myMethod(String,int)"</js> |
| <li><js>"MyClass.myMethod(java.lang.String,int)"</js> |
| <li><js>"MyClass.myMethod()"</js> |
| </ul> |
| <li>Simple: |
| <ul> |
| <li><js>"MyClass.myMethod"</js> |
| </ul> |
| <li>Simple inner class: |
| <ul> |
| <li><js>"MyClass$Inner1$Inner2.myMethod"</js> |
| <li><js>"Inner1$Inner2.myMethod"</js> |
| <li><js>"Inner2.myMethod"</js> |
| </ul> |
| </ul> |
| <li>Fields: |
| <ul> |
| <li>Fully qualified: |
| <ul> |
| <li><js>"com.foo.MyClass.myField"</js> |
| </ul> |
| <li>Simple: |
| <ul> |
| <li><js>"MyClass.myField"</js> |
| </ul> |
| <li>Simple inner class: |
| <ul> |
| <li><js>"MyClass$Inner1$Inner2.myField"</js> |
| <li><js>"Inner1$Inner2.myField"</js> |
| <li><js>"Inner2.myField"</js> |
| </ul> |
| </ul> |
| <li>Constructors: |
| <ul> |
| <li>Fully qualified with args: |
| <ul> |
| <li><js>"com.foo.MyClass(String,int)"</js> |
| <li><js>"com.foo.MyClass(java.lang.String,int)"</js> |
| <li><js>"com.foo.MyClass()"</js> |
| </ul> |
| <li>Simple with args: |
| <ul> |
| <li><js>"MyClass(String,int)"</js> |
| <li><js>"MyClass(java.lang.String,int)"</js> |
| <li><js>"MyClass()"</js> |
| </ul> |
| <li>Simple inner class: |
| <ul> |
| <li><js>"MyClass$Inner1$Inner2()"</js> |
| <li><js>"Inner1$Inner2()"</js> |
| <li><js>"Inner2()"</js> |
| </ul> |
| </ul> |
| <li>A comma-delimited list of anything on this list. |
| </ul> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/BeanContext.html#BEAN_annotations"><code>BeanContext.BEAN_annotations</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#annotations-java.lang.annotation.Annotation...-">annotations</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>values</code> - The values to add to this property.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="beanClassVisibility-org.apache.juneau.Visibility-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>beanClassVisibility</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.271">beanClassVisibility</a>(<a href="../../../../../org/apache/juneau/Visibility.html" title="enum in org.apache.juneau">Visibility</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#beanClassVisibility-org.apache.juneau.Visibility-">BeanContextBuilder</a></code></span></div> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Minimum bean class visibility. |
| |
| <p> |
| Classes are not considered beans unless they meet the minimum visibility requirements. |
| For example, if the visibility is <jsf>PUBLIC</jsf> and the bean class is <jk>protected</jk>, then the class |
| will not be interpreted as a bean class and be serialized as a string. |
| Use this setting to reduce the visibility requirement. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// A bean with a protected class and one field.</jc> |
| <jk>protected class</jk> MyBean { |
| <jk>public</jk> String <jf>foo</jf> = <js>"bar"</js>; |
| } |
| |
| <jc>// Create a serializer that's capable of serializing the class.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .beanClassVisibility(<jsf>PROTECTED</jsf>) |
| .build(); |
| |
| <jc>// Same, but use property.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .set(<jsf>BEAN_beanClassVisibility</jsf>, <js>"PROTECTED"</js>) |
| .build(); |
| |
| <jc>// Produces: {"foo","bar"}</jc> |
| String json = w.serialize(<jk>new</jk> MyBean()); |
| </p> |
| |
| <ul class='notes'> |
| <li>The <a href="../../../../../org/apache/juneau/annotation/Bean.html" title="annotation in org.apache.juneau.annotation"><code>@Bean</code></a> annotation can be used on a non-public bean class to override this setting. |
| <li>The <a href="../../../../../org/apache/juneau/annotation/BeanIgnore.html" title="annotation in org.apache.juneau.annotation"><code>@BeanIgnore</code></a> annotation can also be used on a public bean class to ignore it as a bean. |
| </ul> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/BeanContext.html#BEAN_beanClassVisibility"><code>BeanContext.BEAN_beanClassVisibility</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#beanClassVisibility-org.apache.juneau.Visibility-">beanClassVisibility</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new value for this property. |
| <br>The default is <a href="../../../../../org/apache/juneau/Visibility.html#PUBLIC"><code>Visibility.PUBLIC</code></a>.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="beanConstructorVisibility-org.apache.juneau.Visibility-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>beanConstructorVisibility</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.277">beanConstructorVisibility</a>(<a href="../../../../../org/apache/juneau/Visibility.html" title="enum in org.apache.juneau">Visibility</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#beanConstructorVisibility-org.apache.juneau.Visibility-">BeanContextBuilder</a></code></span></div> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Minimum bean constructor visibility. |
| |
| <p> |
| Only look for constructors with the specified minimum visibility. |
| |
| <p> |
| This setting affects the logic for finding no-arg constructors for bean. Normally, only <jk>public</jk> no-arg |
| constructors are used. Use this setting if you want to reduce the visibility requirement. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// A bean with a protected constructor and one field.</jc> |
| <jk>public class</jk> MyBean { |
| <jk>public</jk> String <jf>foo</jf>; |
| |
| <jk>protected</jk> MyBean() {} |
| } |
| |
| <jc>// Create a parser capable of calling the protected constructor.</jc> |
| ReaderParser p = ReaderParser |
| .<jsm>create</jsm>() |
| .beanConstructorVisibility(<jsf>PROTECTED</jsf>) |
| .build(); |
| |
| <jc>// Same, but use property.</jc> |
| ReaderParser p = JsonParser |
| .<jsm>create</jsm>() |
| .set(<jsf>BEAN_beanConstructorVisibility</jsf>, <js>"PROTECTED"</js>) |
| .build(); |
| |
| <jc>// Use it.</jc> |
| MyBean c = r.parse(<js>"{foo:'bar'}"</js>, MyBean.<jk>class</jk>); |
| </p> |
| |
| <ul class='notes'> |
| <li>The <a href="../../../../../org/apache/juneau/annotation/Beanc.html" title="annotation in org.apache.juneau.annotation"><code>@Beanc</code></a> annotation can also be used to expose a non-public constructor. |
| <li>The <a href="../../../../../org/apache/juneau/annotation/BeanIgnore.html" title="annotation in org.apache.juneau.annotation"><code>@BeanIgnore</code></a> annotation can also be used on a public bean constructor to ignore it. |
| </ul> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/BeanContext.html#BEAN_beanConstructorVisibility"><code>BeanContext.BEAN_beanConstructorVisibility</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#beanConstructorVisibility-org.apache.juneau.Visibility-">beanConstructorVisibility</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new value for this property. |
| <br>The default is <a href="../../../../../org/apache/juneau/Visibility.html#PUBLIC"><code>Visibility.PUBLIC</code></a>.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="beanFieldVisibility-org.apache.juneau.Visibility-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>beanFieldVisibility</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.283">beanFieldVisibility</a>(<a href="../../../../../org/apache/juneau/Visibility.html" title="enum in org.apache.juneau">Visibility</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#beanFieldVisibility-org.apache.juneau.Visibility-">BeanContextBuilder</a></code></span></div> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Minimum bean field visibility. |
| |
| <p> |
| Only look for bean fields with the specified minimum visibility. |
| |
| <p> |
| This affects which fields on a bean class are considered bean properties. Normally only <jk>public</jk> fields are considered. |
| Use this setting if you want to reduce the visibility requirement. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// A bean with a protected field.</jc> |
| <jk>public class</jk> MyBean { |
| <jk>protected</jk> String <jf>foo</jf> = <js>"bar"</js>; |
| } |
| |
| <jc>// Create a serializer that recognizes the protected field.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .beanFieldVisibility(<jsf>PROTECTED</jsf>) |
| .build(); |
| |
| <jc>// Same, but use property.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .set(<jsf>BEAN_beanFieldVisibility</jsf>, <js>"PROTECTED"</js>) |
| .build(); |
| |
| <jc>// Produces: {"foo":"bar"}</jc> |
| String json = s.serialize(<jk>new</jk> MyBean()); |
| </p> |
| |
| <p> |
| Bean fields can be ignored as properties entirely by setting the value to <a href="../../../../../org/apache/juneau/Visibility.html#NONE"><code>Visibility.NONE</code></a> |
| |
| <p class='bcode w800'> |
| <jc>// Disable using fields as properties entirely.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .beanFieldVisibility(<jsf>NONE</jsf>) |
| .build(); |
| </p> |
| |
| <ul class='notes'> |
| <li>The <a href="../../../../../org/apache/juneau/annotation/Beanp.html" title="annotation in org.apache.juneau.annotation"><code>@Beanp</code></a> annotation can also be used to expose a non-public field. |
| <li>The <a href="../../../../../org/apache/juneau/annotation/BeanIgnore.html" title="annotation in org.apache.juneau.annotation"><code>@BeanIgnore</code></a> annotation can also be used on a public bean field to ignore it as a bean property. |
| </ul> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/BeanContext.html#BEAN_beanFieldVisibility"><code>BeanContext.BEAN_beanFieldVisibility</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#beanFieldVisibility-org.apache.juneau.Visibility-">beanFieldVisibility</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new value for this property. |
| <br>The default is <a href="../../../../../org/apache/juneau/Visibility.html#PUBLIC"><code>Visibility.PUBLIC</code></a>.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="beanInterceptor-java.lang.Class-java.lang.Class-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>beanInterceptor</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.289">beanInterceptor</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> on, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="../../../../../org/apache/juneau/transform/BeanInterceptor.html" title="class in org.apache.juneau.transform">BeanInterceptor</a><?>> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#beanInterceptor-java.lang.Class-java.lang.Class-">BeanContextBuilder</a></code></span></div> |
| <div class="block">Bean interceptor. |
| |
| <p> |
| Bean interceptors can be used to intercept calls to getters and setters and alter their values in transit. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Interceptor that strips out sensitive information.</jc> |
| <jk>public class</jk> AddressInterceptor <jk>extends</jk> BeanInterceptor<Address> { |
| |
| <jk>public</jk> Object readProperty(Address bean, String name, Object value) { |
| <jk>if</jk> (<js>"taxInfo"</js>.equals(name)) |
| <jk>return</jk> <js>"redacted"</js>; |
| <jk>return</jk> value; |
| } |
| |
| <jk>public</jk> Object writeProperty(Address bean, String name, Object value) { |
| <jk>if</jk> (<js>"taxInfo"</js>.equals(name) && <js>"redacted"</js>.equals(value)) |
| <jk>return</jk> TaxInfoUtils.<jsm>lookup</jsm>(bean.getStreet(), bean.getCity(), bean.getState()); |
| <jk>return</jk> value; |
| } |
| } |
| |
| <jc>// Our bean class.</jc> |
| <jk>public class</jk> Address { |
| <jk>public</jk> String getTaxInfo() {...} |
| <jk>public void</jk> setTaxInfo(String s) {...} |
| } |
| |
| <jc>// Register filter on serializer or parser.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .beanInterceptor(Address.<jk>class</jk>, AddressInterceptor.<jk>class</jk>) |
| .build(); |
| |
| <jc>// Produces: {"taxInfo":"redacted"}</jc> |
| String json = s.serialize(<jk>new</jk> Address()); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jc'><a href="../../../../../org/apache/juneau/transform/BeanInterceptor.html" title="class in org.apache.juneau.transform"><code>BeanInterceptor</code></a> |
| <li class='ja'><a href="../../../../../org/apache/juneau/annotation/Bean.html#interceptor--"><code>Bean(interceptor)</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#beanInterceptor-java.lang.Class-java.lang.Class-">beanInterceptor</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>on</code> - The bean that the filter applies to.</dd> |
| <dd><code>value</code> - The new value for this property.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="beanMethodVisibility-org.apache.juneau.Visibility-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>beanMethodVisibility</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.295">beanMethodVisibility</a>(<a href="../../../../../org/apache/juneau/Visibility.html" title="enum in org.apache.juneau">Visibility</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#beanMethodVisibility-org.apache.juneau.Visibility-">BeanContextBuilder</a></code></span></div> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Minimum bean method visibility. |
| |
| <p> |
| Only look for bean methods with the specified minimum visibility. |
| |
| <p> |
| This affects which methods are detected as getters and setters on a bean class. Normally only <jk>public</jk> getters and setters are considered. |
| Use this setting if you want to reduce the visibility requirement. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// A bean with a protected getter.</jc> |
| <jk>public class</jk> MyBean { |
| <jk>public</jk> String getFoo() { <jk>return</jk> <js>"foo"</js>; } |
| <jk>protected</jk> String getBar() { <jk>return</jk> <js>"bar"</js>; } |
| } |
| |
| <jc>// Create a serializer that looks for protected getters and setters.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .beanMethodVisibility(<jsf>PROTECTED</jsf>) |
| .build(); |
| |
| <jc>// Same, but use property.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .set(<jsf>BEAN_beanMethodVisibility</jsf>, <js>"PROTECTED"</js>) |
| .build(); |
| |
| <jc>// Produces: {"foo":"foo","bar":"bar"}</jc> |
| String json = s.serialize(<jk>new</jk> MyBean()); |
| </p> |
| |
| <ul class='notes'> |
| <li>The <a href="../../../../../org/apache/juneau/annotation/Beanp.html" title="annotation in org.apache.juneau.annotation"><code>@Beanp</code></a> annotation can also be used to expose a non-public method. |
| <li>The <a href="../../../../../org/apache/juneau/annotation/BeanIgnore.html" title="annotation in org.apache.juneau.annotation"><code>@BeanIgnore</code></a> annotation can also be used on a public bean getter/setter to ignore it as a bean property. |
| </ul> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/BeanContext.html#BEAN_beanMethodVisibility"><code>BeanContext.BEAN_beanMethodVisibility</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#beanMethodVisibility-org.apache.juneau.Visibility-">beanMethodVisibility</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new value for this property. |
| <br>The default is <a href="../../../../../org/apache/juneau/Visibility.html#PUBLIC"><code>Visibility.PUBLIC</code></a></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="beansDontRequireSomeProperties--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>beansDontRequireSomeProperties</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.301">beansDontRequireSomeProperties</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#beansDontRequireSomeProperties--">BeanContextBuilder</a></code></span></div> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Beans require at least one property. |
| |
| <p> |
| When enabled, then a Java class must contain at least 1 property to be considered a bean. |
| Otherwise, the bean will be serialized as a string using the <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang"><code>Object.toString()</code></a> method. |
| |
| <p> |
| The <a href="../../../../../org/apache/juneau/annotation/Bean.html" title="annotation in org.apache.juneau.annotation"><code>@Bean</code></a> annotation can be used on a class to override this setting when <jk>true</jk>. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// A bean with no properties.</jc> |
| <jk>public class</jk> MyBean { |
| } |
| |
| <jc>// Create a serializer that serializes beans even if they have zero properties.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .beansDontRequireSomeProperties() |
| .build(); |
| |
| <jc>// Same, but use property.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .set(<jsf>BEAN_beansRequireSomeProperties</jsf>, <jk>false</jk>) |
| .build(); |
| |
| <jc>// Produces: {}</jc> |
| String json = s.serialize(<jk>new</jk> MyBean()); |
| </p> |
| |
| <ul class='notes'> |
| <li>The <a href="../../../../../org/apache/juneau/annotation/Bean.html" title="annotation in org.apache.juneau.annotation"><code>@Bean</code></a> annotation can be used on the class to force it to be recognized as a bean class |
| even if it has no properties. |
| </ul> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/BeanContext.html#BEAN_beansRequireSomeProperties"><code>BeanContext.BEAN_beansRequireSomeProperties</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#beansDontRequireSomeProperties--">beansDontRequireSomeProperties</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="beansRequireDefaultConstructor--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>beansRequireDefaultConstructor</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.307">beansRequireDefaultConstructor</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#beansRequireDefaultConstructor--">BeanContextBuilder</a></code></span></div> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Beans require no-arg constructors. |
| |
| <p> |
| When enabled, a Java class must implement a default no-arg constructor to be considered a bean. |
| Otherwise, the bean will be serialized as a string using the <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang"><code>Object.toString()</code></a> method. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// A bean without a no-arg constructor.</jc> |
| <jk>public class</jk> MyBean { |
| |
| <jc>// A property method.</jc> |
| <jk>public</jk> String <jf>foo</jf> = <js>"bar"</js>; |
| |
| <jc>// A no-arg constructor</jc> |
| <jk>public</jk> MyBean(String foo) { |
| <jk>this</jk>.<jf>foo</jf> = foo; |
| } |
| |
| <ja>@Override</ja> |
| <jk>public</jk> String toString() { |
| <jk>return</jk> <js>"bar"</js>; |
| } |
| } |
| |
| <jc>// Create a serializer that ignores beans without default constructors.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .beansRequireDefaultConstructor() |
| .build(); |
| |
| <jc>// Same, but use property.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .set(<jsf>BEAN_beansRequireDefaultConstructor</jsf>, <jk>true</jk>) |
| .build(); |
| |
| <jc>// Produces: "bar"</jc> |
| String json = s.serialize(<jk>new</jk> MyBean()); |
| </p> |
| |
| <ul class='notes'> |
| <li>The <a href="../../../../../org/apache/juneau/annotation/Bean.html" title="annotation in org.apache.juneau.annotation"><code>@Bean</code></a> annotation can be used on a bean class to override this setting. |
| <li>The <a href="../../../../../org/apache/juneau/annotation/BeanIgnore.html" title="annotation in org.apache.juneau.annotation"><code>@BeanIgnore</code></a> annotation can also be used on a class to ignore it as a bean. |
| </ul> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/BeanContext.html#BEAN_beansRequireDefaultConstructor"><code>BeanContext.BEAN_beansRequireDefaultConstructor</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#beansRequireDefaultConstructor--">beansRequireDefaultConstructor</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="beansRequireSerializable--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>beansRequireSerializable</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.313">beansRequireSerializable</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#beansRequireSerializable--">BeanContextBuilder</a></code></span></div> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Beans require Serializable interface. |
| |
| <p> |
| When enabled, a Java class must implement the <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io"><code>Serializable</code></a> interface to be considered a bean. |
| Otherwise, the bean will be serialized as a string using the <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang"><code>Object.toString()</code></a> method. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// A bean without a Serializable interface.</jc> |
| <jk>public class</jk> MyBean { |
| |
| <jc>// A property method.</jc> |
| <jk>public</jk> String <jf>foo</jf> = <js>"bar"</js>; |
| |
| <ja>@Override</ja> |
| <jk>public</jk> String toString() { |
| <jk>return</jk> <js>"bar"</js>; |
| } |
| } |
| |
| <jc>// Create a serializer that ignores beans not implementing Serializable.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .beansRequireSerializable() |
| .build(); |
| |
| <jc>// Same, but use property.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .set(<jsf>BEAN_beansRequireSerializable</jsf>, <jk>true</jk>) |
| .build(); |
| |
| <jc>// Produces: "bar"</jc> |
| String json = s.serialize(<jk>new</jk> MyBean()); |
| </p> |
| |
| <ul class='notes'> |
| <li>The <a href="../../../../../org/apache/juneau/annotation/Bean.html" title="annotation in org.apache.juneau.annotation"><code>@Bean</code></a> annotation can be used on a bean class to override this setting. |
| <li>The <a href="../../../../../org/apache/juneau/annotation/BeanIgnore.html" title="annotation in org.apache.juneau.annotation"><code>@BeanIgnore</code></a> annotation can also be used on a class to ignore it as a bean. |
| </ul> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/BeanContext.html#BEAN_beansRequireSerializable"><code>BeanContext.BEAN_beansRequireSerializable</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#beansRequireSerializable--">beansRequireSerializable</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="beansRequireSettersForGetters--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>beansRequireSettersForGetters</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.319">beansRequireSettersForGetters</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#beansRequireSettersForGetters--">BeanContextBuilder</a></code></span></div> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Beans require setters for getters. |
| |
| <p> |
| When enabled, ignore read-only properties (properties with getters but not setters). |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// A bean without a Serializable interface.</jc> |
| <jk>public class</jk> MyBean { |
| |
| <jc>// A read/write property.</jc> |
| <jk>public</jk> String getFoo() { <jk>return</jk> <js>"foo"</js>; } |
| <jk>public void</jk> setFoo(String foo) { ... } |
| |
| <jc>// A read-only property.</jc> |
| <jk>public</jk> String getBar() { <jk>return</jk> <js>"bar"</js>; } |
| } |
| |
| <jc>// Create a serializer that ignores bean properties without setters.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .beansRequireSettersForGetters() |
| .build(); |
| |
| <jc>// Same, but use property.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .set(<jsf>BEAN_beansRequireSettersForGetters</jsf>, <jk>true</jk>) |
| .build(); |
| |
| <jc>// Produces: {"foo":"foo"}</jc> |
| String json = s.serialize(<jk>new</jk> MyBean()); |
| </p> |
| |
| <ul class='notes'> |
| <li>The <a href="../../../../../org/apache/juneau/annotation/Beanp.html" title="annotation in org.apache.juneau.annotation"><code>@Beanp</code></a> annotation can be used on the getter to override this setting. |
| <li>The <a href="../../../../../org/apache/juneau/annotation/BeanIgnore.html" title="annotation in org.apache.juneau.annotation"><code>@BeanIgnore</code></a> annotation can also be used on getters to ignore them as bean properties. |
| </ul> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/BeanContext.html#BEAN_beansRequireSettersForGetters"><code>BeanContext.BEAN_beansRequireSettersForGetters</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#beansRequireSettersForGetters--">beansRequireSettersForGetters</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="bpi-java.util.Map-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>bpi</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.325">bpi</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>> values)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#bpi-java.util.Map-">BeanContextBuilder</a></code></span></div> |
| <div class="block">Bean property includes. |
| |
| <p> |
| Specifies the set and order of names of properties associated with bean classes. |
| |
| <p> |
| For example, <c>bpi(AMap.<jsm>of</jsm>(<js>"MyBean"</js>, <js>"foo,bar"</js>))</c> means only serialize the <c>foo</c> and |
| <c>bar</c> properties on the specified bean. Likewise, parsing will ignore any bean properties not specified |
| and either throw an exception or silently ignore them depending on whether <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#ignoreUnknownBeanProperties--"><code>BeanContextBuilder.ignoreUnknownBeanProperties()</code></a> |
| has been called. |
| |
| <p> |
| This value is entirely optional if you simply want to expose all the getters and public fields on |
| a class as bean properties. However, it's useful if you want certain getters to be ignored or you want the properties to be |
| serialized in a particular order. Note that on IBM JREs, the property order is the same as the order in the source code, |
| whereas on Oracle JREs, the order is entirely random. |
| |
| <p> |
| Setting applies to specified class and all subclasses. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// A bean with 3 properties.</jc> |
| <jk>public class</jk> MyBean { |
| <jk>public</jk> String |
| <jf>foo</jf> = <js>"foo"</js>, |
| <jf>bar</jf> = <js>"bar"</js>, |
| <jf>baz</jf> = <js>"baz"</js>; |
| } |
| |
| <jc>// Create a serializer that includes only the 'foo' and 'bar' properties on the MyBean class.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .bpi(AMap.<jsm>of</jsm>(<js>"MyBean"</js>, <js>"foo,bar"</js>)) |
| .build(); |
| |
| <jc>// Produces: {"foo":"foo","bar":"bar"}</jc> |
| String json = s.serialize(<jk>new</jk> MyBean()); |
| </p> |
| |
| <p> |
| This method is functionally equivalent to the following code for each entry: |
| <p class='bcode w800'> |
| builder.annotations(<jk>new</jk> BeanAnnotation(key).bpi(value.toString())); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jm'><a href="../../../../../org/apache/juneau/annotation/Bean.html#bpi--"><code>Bean.bpi()</code></a> - On an annotation on the bean class itself. |
| <li class='jm'><a href="../../../../../org/apache/juneau/annotation/BeanConfig.html#bpi--"><code>BeanConfig.bpi()</code></a> - On a bean config annotation (see <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#annotations-java.lang.annotation.Annotation...-"><code>BeanContextBuilder.annotations(Annotation...)</code></a>). |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#bpi-java.util.Map-">bpi</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>values</code> - The values to add to this builder. |
| <br>Keys are bean class names which can be a simple name, fully-qualified name, or <js>"*"</js> for all beans. |
| <br>Values are comma-delimited lists of property names. Non-String objects are first converted to Strings.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="bpi-java.lang.Class-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>bpi</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.331">bpi</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> beanClass, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> properties)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#bpi-java.lang.Class-java.lang.String-">BeanContextBuilder</a></code></span></div> |
| <div class="block">Bean property includes. |
| |
| <p> |
| Specifies the set and order of names of properties associated with the bean class. |
| |
| <p> |
| For example, <c>bpi(MyBean.<jk>class</jk>, <js>"foo,bar"</js>)</c> means only serialize the <c>foo</c> and |
| <c>bar</c> properties on the specified bean. Likewise, parsing will ignore any bean properties not specified |
| and either throw an exception or silently ignore them depending on whether <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#ignoreUnknownBeanProperties--"><code>BeanContextBuilder.ignoreUnknownBeanProperties()</code></a> |
| has been called. |
| |
| <p> |
| This value is entirely optional if you simply want to expose all the getters and public fields on |
| a class as bean properties. However, it's useful if you want certain getters to be ignored or you want the properties to be |
| serialized in a particular order. Note that on IBM JREs, the property order is the same as the order in the source code, |
| whereas on Oracle JREs, the order is entirely random. |
| |
| <p> |
| Setting applies to specified class and all subclasses. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// A bean with 3 properties.</jc> |
| <jk>public class</jk> MyBean { |
| <jk>public</jk> String |
| <jf>foo</jf> = <js>"foo"</js>, |
| <jf>bar</jf> = <js>"bar"</js>, |
| <jf>baz</jf> = <js>"baz"</js>; |
| } |
| |
| <jc>// Create a serializer that includes only the 'foo' and 'bar' properties on the MyBean class.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .bpi(MyBean.<jk>class</jk>, <js>"foo,bar"</js>) |
| .build(); |
| |
| <jc>// Produces: {"foo":"foo","bar":"bar"}</jc> |
| String json = s.serialize(<jk>new</jk> MyBean()); |
| </p> |
| |
| <p> |
| This method is functionally equivalent to the following code: |
| <p class='bcode w800'> |
| builder.annotations(<jk>new</jk> BeanAnnotation(beanClass.getName()).bpi(properties)); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jm'><a href="../../../../../org/apache/juneau/annotation/Bean.html#bpi--"><code>Bean.bpi()</code></a> - On an annotation on the bean class itself. |
| <li class='jm'><a href="../../../../../org/apache/juneau/annotation/BeanConfig.html#bpi--"><code>BeanConfig.bpi()</code></a> - On a bean config annotation (see <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#annotations-java.lang.annotation.Annotation...-"><code>BeanContextBuilder.annotations(Annotation...)</code></a>). |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#bpi-java.lang.Class-java.lang.String-">bpi</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>beanClass</code> - The bean class.</dd> |
| <dd><code>properties</code> - Comma-delimited list of property names.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="bpi-java.lang.String-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>bpi</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.337">bpi</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> beanClassName, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> properties)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#bpi-java.lang.String-java.lang.String-">BeanContextBuilder</a></code></span></div> |
| <div class="block">Bean property includes. |
| |
| <p> |
| Specifies the set and order of names of properties associated with the bean class. |
| |
| <p> |
| For example, <c>bpi(<js>"MyBean"</js>, <js>"foo,bar"</js>)</c> means only serialize the <c>foo</c> and |
| <c>bar</c> properties on the specified bean. Likewise, parsing will ignore any bean properties not specified |
| and either throw an exception or silently ignore them depending on whether <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#ignoreUnknownBeanProperties--"><code>BeanContextBuilder.ignoreUnknownBeanProperties()</code></a> |
| has been called. |
| |
| <p> |
| This value is entirely optional if you simply want to expose all the getters and public fields on |
| a class as bean properties. However, it's useful if you want certain getters to be ignored or you want the properties to be |
| serialized in a particular order. Note that on IBM JREs, the property order is the same as the order in the source code, |
| whereas on Oracle JREs, the order is entirely random. |
| |
| <p> |
| Setting applies to specified class and all subclasses. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// A bean with 3 properties.</jc> |
| <jk>public class</jk> MyBean { |
| <jk>public</jk> String |
| <jf>foo</jf> = <js>"foo"</js>, |
| <jf>bar</jf> = <js>"bar"</js>, |
| <jf>baz</jf> = <js>"baz"</js>; |
| } |
| |
| <jc>// Create a serializer that includes only the 'foo' and 'bar' properties on the MyBean class.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .bpi(<js>"MyBean"</js>, <js>"foo,bar"</js>) |
| .build(); |
| |
| <jc>// Produces: {"foo":"foo","bar":"bar"}</jc> |
| String json = s.serialize(<jk>new</jk> MyBean()); |
| </p> |
| |
| <p> |
| This method is functionally equivalent to the following code: |
| <p class='bcode w800'> |
| builder.annotations(<jk>new</jk> BeanAnnotation(beanClassName).bpi(properties)); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jm'><a href="../../../../../org/apache/juneau/annotation/Bean.html#bpi--"><code>Bean.bpi()</code></a> - On an annotation on the bean class itself. |
| <li class='jm'><a href="../../../../../org/apache/juneau/annotation/BeanConfig.html#bpi--"><code>BeanConfig.bpi()</code></a> - On a bean config annotation (see <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#annotations-java.lang.annotation.Annotation...-"><code>BeanContextBuilder.annotations(Annotation...)</code></a>). |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#bpi-java.lang.String-java.lang.String-">bpi</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>beanClassName</code> - The bean class name. |
| <br>Can be a simple name, fully-qualified name, or <js>"*"</js> for all beans.</dd> |
| <dd><code>properties</code> - Comma-delimited list of property names.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="bpro-java.util.Map-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>bpro</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.343">bpro</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>> values)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#bpro-java.util.Map-">BeanContextBuilder</a></code></span></div> |
| <div class="block">Read-only bean properties. |
| |
| <p> |
| Specifies one or more properties on beans that are read-only despite having valid getters. |
| Serializers will serialize such properties as usual, but parsers will silently ignore them. |
| Note that this is different from the <l>bpi</l>/<l>bpx</l> settings which include or exclude properties |
| for both serializers and parsers. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// A bean with 3 properties.</jc> |
| <jk>public class</jk> MyBean { |
| <jk>public</jk> String <jf>foo</jf>, <jf>bar</jf>, <jf>baz</jf>; |
| } |
| |
| <jc>// Create a serializer with read-only property settings.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .bpro(AMap.<jsm>of</jsm>(<js>"MyBean"</js>, <js>"bar,baz"</js>)) |
| .build(); |
| |
| <jc>// All 3 properties will be serialized.</jc> |
| String json = s.serialize(<jk>new</jk> MyBean()); |
| |
| <jc>// Create a parser with read-only property settings.</jc> |
| ReaderParser p = JsonParser |
| .<jsm>create</jsm>() |
| .bpro(AMap.<jsm>of</jsm>(<js>"MyBean"</js>, <js>"bar,baz"</js>)) |
| .ignoreUnknownBeanProperties() |
| .build(); |
| |
| <jc>// Parser ignores bar and baz properties.</jc> |
| MyBean b = p.parse(<js>"{foo:'foo',bar:'bar',baz:'baz'}"</js>, MyBean.<jk>class</jk>); |
| </p> |
| |
| <p> |
| This method is functionally equivalent to the following code for each entry: |
| <p class='bcode w800'> |
| builder.annotations(<jk>new</jk> BeanAnnotation(key).bpro(value.toString())); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jm'><a href="../../../../../org/apache/juneau/annotation/BeanConfig.html#bpro--"><code>BeanConfig.bpro()</code></a> |
| <li class='jm'><a href="../../../../../org/apache/juneau/annotation/Bean.html#bpro--"><code>Bean.bpro()</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#bpro-java.util.Map-">bpro</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>values</code> - The values to add to this builder. |
| <br>Keys are bean class names which can be a simple name, fully-qualified name, or <js>"*"</js> for all beans. |
| <br>Values are comma-delimited lists of property names. Non-String objects are first converted to Strings.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="bpro-java.lang.Class-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>bpro</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.349">bpro</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> beanClass, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> properties)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#bpro-java.lang.Class-java.lang.String-">BeanContextBuilder</a></code></span></div> |
| <div class="block">Read-only bean properties. |
| |
| <p> |
| Specifies one or more properties on a bean that are read-only despite having valid getters. |
| Serializers will serialize such properties as usual, but parsers will silently ignore them. |
| Note that this is different from the <l>bpi</l>/<l>bpx</l> settings which include or exclude properties |
| for both serializers and parsers. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// A bean with 3 properties.</jc> |
| <jk>public class</jk> MyBean { |
| <jk>public</jk> String <jf>foo</jf>, <jf>bar</jf>, <jf>baz</jf>; |
| } |
| |
| <jc>// Create a serializer with read-only property settings.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .bpro(MyBean.<jk>class</jk>, <js>"bar,baz"</js>) |
| .build(); |
| |
| <jc>// All 3 properties will be serialized.</jc> |
| String json = s.serialize(<jk>new</jk> MyBean()); |
| |
| <jc>// Create a parser with read-only property settings.</jc> |
| ReaderParser p = JsonParser |
| .<jsm>create</jsm>() |
| .bpro(MyBean.<jk>class</jk>, <js>"bar,baz"</js>) |
| .ignoreUnknownBeanProperties() |
| .build(); |
| |
| <jc>// Parser ignores bar and baz properties.</jc> |
| MyBean b = p.parse(<js>"{foo:'foo',bar:'bar',baz:'baz'}"</js>, MyBean.<jk>class</jk>); |
| </p> |
| |
| <p> |
| This method is functionally equivalent to the following code: |
| <p class='bcode w800'> |
| builder.annotations(<jk>new</jk> BeanAnnotation(beanClass.getName()).bpro(properties)); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jm'><a href="../../../../../org/apache/juneau/annotation/BeanConfig.html#bpro--"><code>BeanConfig.bpro()</code></a> |
| <li class='jm'><a href="../../../../../org/apache/juneau/annotation/Bean.html#bpro--"><code>Bean.bpro()</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#bpro-java.lang.Class-java.lang.String-">bpro</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>beanClass</code> - The bean class.</dd> |
| <dd><code>properties</code> - Comma-delimited list of property names.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="bpro-java.lang.String-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>bpro</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.355">bpro</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> beanClassName, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> properties)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#bpro-java.lang.String-java.lang.String-">BeanContextBuilder</a></code></span></div> |
| <div class="block">Read-only bean properties. |
| |
| <p> |
| Specifies one or more properties on a bean that are read-only despite having valid getters. |
| Serializers will serialize such properties as usual, but parsers will silently ignore them. |
| Note that this is different from the <l>bpi</l>/<l>bpx</l> settings which include or exclude properties |
| for both serializers and parsers. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// A bean with 3 properties.</jc> |
| <jk>public class</jk> MyBean { |
| <jk>public</jk> String <jf>foo</jf>, <jf>bar</jf>, <jf>baz</jf>; |
| } |
| |
| <jc>// Create a serializer with read-only property settings.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .bpro(<js>"MyBean"</js>, <js>"bar,baz"</js>) |
| .build(); |
| |
| <jc>// All 3 properties will be serialized.</jc> |
| String json = s.serialize(<jk>new</jk> MyBean()); |
| |
| <jc>// Create a parser with read-only property settings.</jc> |
| ReaderParser p = JsonParser |
| .<jsm>create</jsm>() |
| .bpro(<js>"MyBean"</js>, <js>"bar,baz"</js>) |
| .ignoreUnknownBeanProperties() |
| .build(); |
| |
| <jc>// Parser ignores bar and baz properties.</jc> |
| MyBean b = p.parse(<js>"{foo:'foo',bar:'bar',baz:'baz'}"</js>, MyBean.<jk>class</jk>); |
| </p> |
| |
| <p> |
| This method is functionally equivalent to the following code: |
| <p class='bcode w800'> |
| builder.annotations(<jk>new</jk> BeanAnnotation(beanClass.getName).bpro(properties)); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jm'><a href="../../../../../org/apache/juneau/annotation/BeanConfig.html#bpro--"><code>BeanConfig.bpro()</code></a> |
| <li class='jm'><a href="../../../../../org/apache/juneau/annotation/Bean.html#bpro--"><code>Bean.bpro()</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#bpro-java.lang.String-java.lang.String-">bpro</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>beanClassName</code> - The bean class name. |
| <br>Can be a simple name, fully-qualified name, or <js>"*"</js> for all bean classes.</dd> |
| <dd><code>properties</code> - Comma-delimited list of property names.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="bpwo-java.util.Map-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>bpwo</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.361">bpwo</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>> values)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#bpwo-java.util.Map-">BeanContextBuilder</a></code></span></div> |
| <div class="block">Write-only bean properties. |
| |
| <p> |
| Specifies one or more properties on a bean that are write-only despite having valid setters. |
| Parsers will parse such properties as usual, but serializers will silently ignore them. |
| Note that this is different from the <l>bpi</l>/<l>bpx</l> settings which include or exclude properties |
| for both serializers and parsers. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// A bean with 3 properties.</jc> |
| <jk>public class</jk> MyBean { |
| <jk>public</jk> String <jf>foo</jf>, <jf>bar</jf>, <jf>baz</jf>; |
| } |
| |
| <jc>// Create a serializer with write-only property settings.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .bpwo(AMap.<jsm>of</jsm>(<js>"MyBean"</js>, <js>"bar,baz"</js>)) |
| .build(); |
| |
| <jc>// Only foo will be serialized.</jc> |
| String json = s.serialize(<jk>new</jk> MyBean()); |
| |
| <jc>// Create a parser with write-only property settings.</jc> |
| ReaderParser p = JsonParser |
| .<jsm>create</jsm>() |
| .bpwo(AMap.<jsm>of</jsm>(<js>"MyBean"</js>, <js>"bar,baz"</js>)) |
| .build(); |
| |
| <jc>// Parser parses all 3 properties.</jc> |
| MyBean b = p.parse(<js>"{foo:'foo',bar:'bar',baz:'baz'}"</js>, MyBean.<jk>class</jk>); |
| </p> |
| |
| <p> |
| This method is functionally equivalent to the following code for each entry: |
| <p class='bcode w800'> |
| builder.annotations(<jk>new</jk> BeanAnnotation(key).bpwo(value.toString())); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jm'><a href="../../../../../org/apache/juneau/annotation/BeanConfig.html#bpwo--"><code>BeanConfig.bpwo()</code></a> |
| <li class='jm'><a href="../../../../../org/apache/juneau/annotation/Bean.html#bpwo--"><code>Bean.bpwo()</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#bpwo-java.util.Map-">bpwo</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>values</code> - The values to add to this builder. |
| <br>Keys are bean class names which can be a simple name, fully-qualified name, or <js>"*"</js> for all beans. |
| <br>Values are comma-delimited lists of property names. Non-String objects are first converted to Strings.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="bpwo-java.lang.Class-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>bpwo</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.367">bpwo</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> beanClass, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> properties)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#bpwo-java.lang.Class-java.lang.String-">BeanContextBuilder</a></code></span></div> |
| <div class="block">Write-only bean properties. |
| |
| <p> |
| Specifies one or more properties on a bean that are write-only despite having valid setters. |
| Parsers will parse such properties as usual, but serializers will silently ignore them. |
| Note that this is different from the <l>bpi</l>/<l>bpx</l> settings which include or exclude properties |
| for both serializers and parsers. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// A bean with 3 properties.</jc> |
| <jk>public class</jk> MyBean { |
| <jk>public</jk> String <jf>foo</jf>, <jf>bar</jf>, <jf>baz</jf>; |
| } |
| |
| <jc>// Create a serializer with write-only property settings.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .bpwo(MyBean.<jk>class</jk>, <js>"bar,baz"</js>) |
| .build(); |
| |
| <jc>// Only foo will be serialized.</jc> |
| String json = s.serialize(<jk>new</jk> MyBean()); |
| |
| <jc>// Create a parser with write-only property settings.</jc> |
| ReaderParser p = JsonParser |
| .<jsm>create</jsm>() |
| .bpwo(MyBean.<jk>class</jk>, <js>"bar,baz"</js>) |
| .build(); |
| |
| <jc>// Parser parses all 3 properties.</jc> |
| MyBean b = p.parse(<js>"{foo:'foo',bar:'bar',baz:'baz'}"</js>, MyBean.<jk>class</jk>); |
| </p> |
| |
| <p> |
| This method is functionally equivalent to the following code: |
| <p class='bcode w800'> |
| builder.annotations(<jk>new</jk> BeanAnnotation(beanClass.getName).bpwo(properties)); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jm'><a href="../../../../../org/apache/juneau/annotation/BeanConfig.html#bpwo--"><code>BeanConfig.bpwo()</code></a> |
| <li class='jm'><a href="../../../../../org/apache/juneau/annotation/Bean.html#bpwo--"><code>Bean.bpwo()</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#bpwo-java.lang.Class-java.lang.String-">bpwo</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>beanClass</code> - The bean class.</dd> |
| <dd><code>properties</code> - Comma-delimited list of property names.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="bpwo-java.lang.String-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>bpwo</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.373">bpwo</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> beanClassName, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> properties)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#bpwo-java.lang.String-java.lang.String-">BeanContextBuilder</a></code></span></div> |
| <div class="block">Write-only bean properties. |
| |
| <p> |
| Specifies one or more properties on a bean that are write-only despite having valid setters. |
| Parsers will parse such properties as usual, but serializers will silently ignore them. |
| Note that this is different from the <l>bpi</l>/<l>bpx</l> settings which include or exclude properties |
| for both serializers and parsers. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// A bean with 3 properties.</jc> |
| <jk>public class</jk> MyBean { |
| <jk>public</jk> String <jf>foo</jf>, <jf>bar</jf>, <jf>baz</jf>; |
| } |
| |
| <jc>// Create a serializer with write-only property settings.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .bpwo(<js>"MyBean"</js>, <js>"bar,baz"</js>) |
| .build(); |
| |
| <jc>// Only foo will be serialized.</jc> |
| String json = s.serialize(<jk>new</jk> MyBean()); |
| |
| <jc>// Create a parser with write-only property settings.</jc> |
| ReaderParser p = JsonParser |
| .<jsm>create</jsm>() |
| .bpwo(<js>"MyBean"</js>, <js>"bar,baz"</js>) |
| .build(); |
| |
| <jc>// Parser parses all 3 properties.</jc> |
| MyBean b = p.parse(<js>"{foo:'foo',bar:'bar',baz:'baz'}"</js>, MyBean.<jk>class</jk>); |
| </p> |
| |
| <p> |
| This method is functionally equivalent to the following code: |
| <p class='bcode w800'> |
| builder.annotations(<jk>new</jk> BeanAnnotation(beanClassName).bpwo(properties)); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jm'><a href="../../../../../org/apache/juneau/annotation/BeanConfig.html#bpwo--"><code>BeanConfig.bpwo()</code></a> |
| <li class='jm'><a href="../../../../../org/apache/juneau/annotation/Bean.html#bpwo--"><code>Bean.bpwo()</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#bpwo-java.lang.String-java.lang.String-">bpwo</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>beanClassName</code> - The bean class name. |
| <br>Can be a simple name, fully-qualified name, or <js>"*"</js> for all bean classes.</dd> |
| <dd><code>properties</code> - Comma-delimited list of property names.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="bpx-java.util.Map-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>bpx</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.379">bpx</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>> values)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#bpx-java.util.Map-">BeanContextBuilder</a></code></span></div> |
| <div class="block">Bean property excludes. |
| |
| <p> |
| Specifies to exclude the specified list of properties for the specified bean classes. |
| |
| <p> |
| Same as <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#bpi-java.util.Map-"><code>BeanContextBuilder.bpi(Map)</code></a> except you specify a list of bean property names that you want to exclude from |
| serialization. |
| |
| <p> |
| Setting applies to specified class and all subclasses. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// A bean with 3 properties.</jc> |
| <jk>public class</jk> MyBean { |
| <jk>public</jk> String |
| <jf>foo</jf> = <js>"foo"</js>, |
| <jf>bar</jf> = <js>"bar"</js>, |
| <jf>baz</jf> = <js>"baz"</js>; |
| } |
| |
| <jc>// Create a serializer that excludes the "bar" and "baz" properties on the MyBean class.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .bpx(AMap.of(<js>"MyBean"</js>, <js>"bar,baz"</js>)) |
| .build(); |
| |
| <jc>// Produces: {"foo":"foo"}</jc> |
| String json = s.serialize(<jk>new</jk> MyBean()); |
| </p> |
| |
| <p> |
| This method is functionally equivalent to the following code for each entry: |
| <p class='bcode w800'> |
| builder.annotations(<jk>new</jk> BeanAnnotation(key).bpx(value.toString())); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jm'><a href="../../../../../org/apache/juneau/annotation/BeanConfig.html#bpx--"><code>BeanConfig.bpx()</code></a> |
| <li class='jm'><a href="../../../../../org/apache/juneau/annotation/Bean.html#bpx--"><code>Bean.bpx()</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#bpx-java.util.Map-">bpx</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>values</code> - The values to add to this builder. |
| <br>Keys are bean class names which can be a simple name, fully-qualified name, or <js>"*"</js> for all beans. |
| <br>Values are comma-delimited lists of property names. Non-String objects are first converted to Strings.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="bpx-java.lang.Class-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>bpx</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.385">bpx</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> beanClass, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> properties)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#bpx-java.lang.Class-java.lang.String-">BeanContextBuilder</a></code></span></div> |
| <div class="block">Bean property excludes. |
| |
| <p> |
| Specifies to exclude the specified list of properties for the specified bean class. |
| |
| <p> |
| Same as <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#bpi-java.lang.Class-java.lang.String-"><code>BeanContextBuilder.bpi(Class, String)</code></a> except you specify a list of bean property names that you want to exclude from |
| serialization. |
| |
| <p> |
| Setting applies to specified class and all subclasses. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// A bean with 3 properties.</jc> |
| <jk>public class</jk> MyBean { |
| <jk>public</jk> String |
| <jf>foo</jf> = <js>"foo"</js>, |
| <jf>bar</jf> = <js>"bar"</js>, |
| <jf>baz</jf> = <js>"baz"</js>; |
| } |
| |
| <jc>// Create a serializer that excludes the "bar" and "baz" properties on the MyBean class.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .bpx(MyBean.<jk>class</jk>, <js>"bar,baz"</js>) |
| .build(); |
| |
| <jc>// Produces: {"foo":"foo"}</jc> |
| String json = s.serialize(<jk>new</jk> MyBean()); |
| </p> |
| |
| <p> |
| This method is functionally equivalent to the following code: |
| <p class='bcode w800'> |
| builder.annotations(<jk>new</jk> BeanAnnotation(beanClass.getName()).bpx(properties)); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jm'><a href="../../../../../org/apache/juneau/annotation/BeanConfig.html#bpx--"><code>BeanConfig.bpx()</code></a> |
| <li class='jm'><a href="../../../../../org/apache/juneau/annotation/Bean.html#bpx--"><code>Bean.bpx()</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#bpx-java.lang.Class-java.lang.String-">bpx</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>beanClass</code> - The bean class.</dd> |
| <dd><code>properties</code> - Comma-delimited list of property names.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="bpx-java.lang.String-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>bpx</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.391">bpx</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> beanClassName, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> properties)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#bpx-java.lang.String-java.lang.String-">BeanContextBuilder</a></code></span></div> |
| <div class="block">Bean property excludes. |
| |
| <p> |
| Specifies to exclude the specified list of properties for the specified bean class. |
| |
| <p> |
| Same as <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#bpx-java.lang.String-java.lang.String-"><code>BeanContextBuilder.bpx(String, String)</code></a> except you specify a list of bean property names that you want to exclude from |
| serialization. |
| |
| <p> |
| Setting applies to specified class and all subclasses. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// A bean with 3 properties.</jc> |
| <jk>public class</jk> MyBean { |
| <jk>public</jk> String |
| <jf>foo</jf> = <js>"foo"</js>, |
| <jf>bar</jf> = <js>"bar"</js>, |
| <jf>baz</jf> = <js>"baz"</js>; |
| } |
| |
| <jc>// Create a serializer that excludes the "bar" and "baz" properties on the MyBean class.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .bpx(<js>"MyBean"</js>, <js>"bar,baz"</js>) |
| .build(); |
| |
| <jc>// Produces: {"foo":"foo"}</jc> |
| String json = s.serialize(<jk>new</jk> MyBean()); |
| </p> |
| |
| <p> |
| This method is functionally equivalent to the following code: |
| <p class='bcode w800'> |
| builder.annotations(<jk>new</jk> BeanAnnotation(beanClassName).bpx(properties)); |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#bpx-java.lang.String-java.lang.String-">bpx</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>beanClassName</code> - The bean class name. |
| <br>Can be a simple name, fully-qualified name, or <js>"*"</js> for all bean classes.</dd> |
| <dd><code>properties</code> - Comma-delimited list of property names.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="dictionary-java.lang.Object...-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>dictionary</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.397">dictionary</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>... values)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#dictionary-java.lang.Object...-">BeanContextBuilder</a></code></span></div> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Bean dictionary. |
| |
| <p> |
| The list of classes that make up the bean dictionary in this bean context. |
| |
| <p> |
| A dictionary is a name/class mapping used to find class types during parsing when they cannot be inferred |
| through reflection. The names are defined through the <a href="../../../../../org/apache/juneau/annotation/Bean.html#typeName--"><code>@Bean(typeName)</code></a> annotation defined |
| on the bean class. For example, if a class <c>Foo</c> has a type-name of <js>"myfoo"</js>, then it would end up |
| serialized as <js>"{_type:'myfoo',...}"</js> in JSON (depending on <l>addBeanTypes</l>/<l>addRootType</l> properties) |
| or <js>"<myfoo>...</myfoo>"</js> in XML. |
| |
| <p> |
| This setting tells the parsers which classes to look for when resolving <js>"_type"</js> attributes. |
| |
| <p> |
| Values can consist of any of the following types: |
| <ul> |
| <li>Any bean class that specifies a value for <a href="../../../../../org/apache/juneau/annotation/Bean.html#typeName--"><code>@Bean(typeName)</code></a>. |
| <li>Any subclass of <a href="../../../../../org/apache/juneau/BeanDictionaryList.html" title="class in org.apache.juneau"><code>BeanDictionaryList</code></a> containing a collection of bean classes with type name annotations. |
| <li>Any subclass of <a href="../../../../../org/apache/juneau/BeanDictionaryMap.html" title="class in org.apache.juneau"><code>BeanDictionaryMap</code></a> containing a mapping of type names to classes without type name annotations. |
| <li>Any array or collection of the objects above. |
| </ul> |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// POJOs with @Bean(name) annotations.</jc> |
| <ja>@Bean</ja>(typeName=<js>"foo"</js>) |
| <jk>public class</jk> Foo {...} |
| <ja>@Bean</ja>(typeName=<js>"bar"</js>) |
| <jk>public class</jk> Bar {...} |
| |
| <jc>// Create a parser and tell it which classes to try to resolve.</jc> |
| ReaderParser p = JsonParser |
| .<jsm>create</jsm>() |
| .dictionary(Foo.<jk>class</jk>, Bar.<jk>class</jk>) |
| .addBeanTypes() |
| .build(); |
| |
| <jc>// Same, but use property.</jc> |
| ReaderParser p = JsonParser |
| .<jsm>create</jsm>() |
| .addTo(<jsf>BEAN_beanDictionary</jsf>, Foo.<jk>class</jk>) |
| .addTo(<jsf>BEAN_beanDictionary</jsf>, Bar.<jk>class</jk>) |
| .set(<jsf>SERIALIZER_addBeanTypes</jsf>, <jk>true</jk>) |
| .build(); |
| |
| <jc>// A bean with a field with an indeterminate type.</jc> |
| <jk>public class</jk> MyBean { |
| <jk>public</jk> Object <jf>mySimpleField</jf>; |
| } |
| |
| <jc>// Parse bean.</jc> |
| MyBean b = p.parse(<js>"{mySimpleField:{_type:'foo',...}}"</js>, MyBean.<jk>class</jk>); |
| </p> |
| |
| <p> |
| Another option is to use the <a href="../../../../../org/apache/juneau/annotation/Bean.html#dictionary--"><code>Bean.dictionary()</code></a> annotation on the POJO class itself: |
| |
| <p class='bcode w800'> |
| <jc>// Instead of by parser, define a bean dictionary on a class through an annotation.</jc> |
| <jc>// This applies to all properties on this class and all subclasses.</jc> |
| <ja>@Bean</ja>(dictionary={Foo.<jk>class</jk>,Bar.<jk>class</jk>}) |
| <jk>public class</jk> MyBean { |
| <jk>public</jk> Object <jf>mySimpleField</jf>; <jc>// May contain Foo or Bar object.</jc> |
| <jk>public</jk> Map<String,Object> <jf>myMapField</jf>; <jc>// May contain Foo or Bar objects.</jc> |
| } |
| </p> |
| |
| <p> |
| A typical usage is to allow for HTML documents to be parsed back into HTML beans: |
| <p class='bcode w800'> |
| <jc>// Use the predefined HTML5 bean dictionary which is a BeanDictionaryList.</jc> |
| ReaderParser p = HtmlParser |
| .<jsm>create</jsm>() |
| .dictionary(HtmlBeanDictionary.<jk>class</jk>) |
| .build(); |
| |
| <jc>// Parse an HTML body into HTML beans.</jc> |
| Body body = p.parse(<js>"<body><ul><li>foo</li><li>bar</li></ul>"</js>, Body.<jk>class</jk>); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/BeanContext.html#BEAN_beanDictionary"><code>BeanContext.BEAN_beanDictionary</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#dictionary-java.lang.Object...-">dictionary</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>values</code> - The values to add to this property.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="dictionaryOn-java.lang.Class-java.lang.Class...-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>dictionaryOn</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.403">dictionaryOn</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> on, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?>... values)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#dictionaryOn-java.lang.Class-java.lang.Class...-">BeanContextBuilder</a></code></span></div> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Bean dictionary. |
| |
| <p> |
| This is identical to <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#dictionary-java.lang.Object...-"><code>BeanContextBuilder.dictionary(Object...)</code></a>, but specifies a dictionary within the context of |
| a single class as opposed to globally. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// POJOs with @Bean(name) annotations.</jc> |
| <ja>@Bean</ja>(typeName=<js>"foo"</js>) |
| <jk>public class</jk> Foo {...} |
| <ja>@Bean</ja>(typeName=<js>"bar"</js>) |
| <jk>public class</jk> Bar {...} |
| |
| <jc>// A bean with a field with an indeterminate type.</jc> |
| <jk>public class</jk> MyBean { |
| <jk>public</jk> Object <jf>mySimpleField</jf>; |
| } |
| |
| <jc>// Create a parser and tell it which classes to try to resolve.</jc> |
| ReaderParser p = JsonParser |
| .<jsm>create</jsm>() |
| .dictionaryOn(MyBean.class, Foo.<jk>class</jk>, Bar.<jk>class</jk>) |
| .build(); |
| |
| <jc>// Parse bean.</jc> |
| MyBean b = p.parse(<js>"{mySimpleField:{_type:'foo',...}}"</js>, MyBean.<jk>class</jk>); |
| </p> |
| |
| <p> |
| This is functionally equivalent to the <a href="../../../../../org/apache/juneau/annotation/Bean.html#dictionary--"><code>Bean.dictionary()</code></a> annotation. |
| |
| <ul class='seealso'> |
| <li class='ja'><a href="../../../../../org/apache/juneau/annotation/Bean.html#dictionary--"><code>Bean.dictionary()</code></a> |
| <li class='jf'><a href="../../../../../org/apache/juneau/BeanContext.html#BEAN_beanDictionary"><code>BeanContext.BEAN_beanDictionary</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#dictionaryOn-java.lang.Class-java.lang.Class...-">dictionaryOn</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>on</code> - The class that the dictionary values apply to.</dd> |
| <dd><code>values</code> - The new values for this property.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="dontIgnorePropertiesWithoutSetters--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>dontIgnorePropertiesWithoutSetters</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.409">dontIgnorePropertiesWithoutSetters</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#dontIgnorePropertiesWithoutSetters--">BeanContextBuilder</a></code></span></div> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Ignore properties without setters. |
| |
| <p> |
| When enabled, trying to set a value on a bean property without a setter will silently be ignored. |
| Otherwise, a <code>BeanRuntimeException</code> is thrown. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// A bean with a property with a getter but not a setter.</jc> |
| <jk>public class</jk> MyBean { |
| <jk>public void</jk> getFoo() { |
| <jk>return</jk> <js>"foo"</js>; |
| } |
| } |
| |
| <jc>// Create a parser that throws an exception if a setter is not found but a getter is.</jc> |
| ReaderParser p = JsonParser |
| .<jsm>create</jsm>() |
| .dontIgnorePropertiesWithoutSetters() |
| .build(); |
| |
| <jc>// Same, but use property.</jc> |
| ReaderParser p = JsonParser |
| .<jsm>create</jsm>() |
| .set(<jsf>BEAN_ignorePropertiesWithoutSetters</jsf>, <jk>false</jk>) |
| .build(); |
| |
| <jc>// Throws a ParseException.</jc> |
| MyBean b = p.parse(<js>"{foo:'bar'}"</js>, MyBean.<jk>class</jk>); |
| </p> |
| |
| <ul class='notes'> |
| <li>The <a href="../../../../../org/apache/juneau/annotation/BeanIgnore.html" title="annotation in org.apache.juneau.annotation"><code>@BeanIgnore</code></a> annotation can also be used on getters and fields to ignore them. |
| </ul> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/BeanContext.html#BEAN_ignorePropertiesWithoutSetters"><code>BeanContext.BEAN_ignorePropertiesWithoutSetters</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#dontIgnorePropertiesWithoutSetters--">dontIgnorePropertiesWithoutSetters</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="dontIgnoreTransientFields--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>dontIgnoreTransientFields</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.415">dontIgnoreTransientFields</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#dontIgnoreTransientFields--">BeanContextBuilder</a></code></span></div> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Ignore transient fields. |
| |
| <p> |
| When enabled, methods and fields marked as <jk>transient</jk> will be ignored as bean properties. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// A bean with a transient field.</jc> |
| <jk>public class</jk> MyBean { |
| <jk>public transient</jk> String <jf>foo</jf> = <js>"foo"</js>; |
| } |
| |
| <jc>// Create a parser that doesn't ignore transient fields.</jc> |
| ReaderParser p = JsonParser |
| .<jsm>create</jsm>() |
| .dontIgnoreTransientFields() |
| .build(); |
| |
| <jc>// Same, but use property.</jc> |
| ReaderParser p = JsonParser |
| .<jsm>create</jsm>() |
| .set(<jsf>BEAN_ignoreTransientFields</jsf>, <jk>false</jk>) |
| .build(); |
| |
| <jc>// Produces: {"foo":"foo"}</jc> |
| String json = s.serialize(<jk>new</jk> MyBean()); |
| </p> |
| |
| <ul class='notes'> |
| <li>The <a href="../../../../../org/apache/juneau/annotation/Beanp.html" title="annotation in org.apache.juneau.annotation"><code>@Beanp</code></a> annotation can also be used on transient fields to keep them from being ignored. |
| </ul> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/BeanContext.html#BEAN_ignoreTransientFields"><code>BeanContext.BEAN_ignoreTransientFields</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#dontIgnoreTransientFields--">dontIgnoreTransientFields</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="dontIgnoreUnknownNullBeanProperties--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>dontIgnoreUnknownNullBeanProperties</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.421">dontIgnoreUnknownNullBeanProperties</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#dontIgnoreUnknownNullBeanProperties--">BeanContextBuilder</a></code></span></div> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Ignore unknown properties with null values. |
| |
| <p> |
| When enabled, trying to set a <jk>null</jk> value on a non-existent bean property will silently be ignored. |
| Otherwise, a <code>BeanRuntimeException</code> is thrown. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// A bean with a single property.</jc> |
| <jk>public class</jk> MyBean { |
| <jk>public</jk> String <jf>foo</jf>; |
| } |
| |
| <jc>// Create a parser that throws an exception on an unknown property even if the value being set is null.</jc> |
| ReaderParser p = JsonParser |
| .<jsm>create</jsm>() |
| .dontIgnoreUnknownNullBeanProperties() |
| .build(); |
| |
| <jc>// Same, but use property.</jc> |
| ReaderParser p = JsonParser |
| .<jsm>create</jsm>() |
| .set(<jsf>BEAN_ignoreUnknownNullBeanProperties</jsf>, <jk>false</jk>) |
| .build(); |
| |
| <jc>// Throws a BeanRuntimeException wrapped in a ParseException on the unknown 'bar' property.</jc> |
| MyBean b = p.parse(<js>"{foo:'foo',bar:null}"</js>, MyBean.<jk>class</jk>); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/BeanContext.html#BEAN_ignoreUnknownNullBeanProperties"><code>BeanContext.BEAN_ignoreUnknownNullBeanProperties</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#dontIgnoreUnknownNullBeanProperties--">dontIgnoreUnknownNullBeanProperties</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="dontUseInterfaceProxies--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>dontUseInterfaceProxies</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.427">dontUseInterfaceProxies</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#dontUseInterfaceProxies--">BeanContextBuilder</a></code></span></div> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Use interface proxies. |
| |
| <p> |
| When enabled, interfaces will be instantiated as proxy classes through the use of an |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/InvocationHandler.html?is-external=true" title="class or interface in java.lang.reflect"><code>InvocationHandler</code></a> if there is no other way of instantiating them. |
| Otherwise, throws a <a href="../../../../../org/apache/juneau/BeanRuntimeException.html" title="class in org.apache.juneau"><code>BeanRuntimeException</code></a>. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// An interface with a single getter.</jc> |
| <jk>public interface</jk> MyBean { |
| String getFoo(); |
| <jk>void</jk> setFoo(String foo); |
| } |
| |
| <jc>// Create a parser that uses interface proxies.</jc> |
| ReaderParser p = JsonParser |
| .<jsm>create</jsm>() |
| .build(); |
| |
| <jc>// Same, but use property.</jc> |
| ReaderParser p = JsonParser |
| .<jsm>create</jsm>() |
| .set(<jsf>BEAN_useInterfaceProxies</jsf>, <jk>true</jk>) |
| .build(); |
| |
| <jc>// Creates a proxy implementation of a MyBean interface.</jc> |
| MyBean b = p.parse(<js>"{foo:'bar'}"</js>, MyBean.<jk>class</jk>); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/BeanContext.html#BEAN_useInterfaceProxies"><code>BeanContext.BEAN_useInterfaceProxies</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#dontUseInterfaceProxies--">dontUseInterfaceProxies</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="fluentSetters--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>fluentSetters</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.433">fluentSetters</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#fluentSetters--">BeanContextBuilder</a></code></span></div> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Find fluent setters. |
| |
| <p> |
| When enabled, fluent setters are detected on beans during parsing. |
| |
| <p> |
| Fluent setters must have the following attributes: |
| <ul> |
| <li>Public. |
| <li>Not static. |
| <li>Take in one parameter. |
| <li>Return the bean itself. |
| </ul> |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// A bean with a fluent setter.</jc> |
| <jk>public class</jk> MyBean { |
| <jk>public</jk> MyBean foo(String value) {...} |
| } |
| |
| <jc>// Create a parser that finds fluent setters.</jc> |
| ReaderParser p = JsonParser |
| .<jsm>create</jsm>() |
| .fluentSetters() |
| .build(); |
| |
| <jc>// Same, but use property.</jc> |
| ReaderParser p = JsonParser |
| .<jsm>create</jsm>() |
| .set(<jsf>BEAN_fluentSetters</jsf>, <jk>true</jk>) |
| .build(); |
| |
| <jc>// Parse into bean using fluent setter.</jc> |
| MyBean b = p.parse(<js>"{foo:'bar'}"</js>); |
| </p> |
| |
| <ul class='notes'> |
| <li>The <a href="../../../../../org/apache/juneau/annotation/Beanp.html" title="annotation in org.apache.juneau.annotation"><code>@Beanp</code></a> annotation can also be used on methods to individually identify them as fluent setters. |
| <li>The <a href="../../../../../org/apache/juneau/annotation/Bean.html#fluentSetters--"><code>@Bean.fluentSetters()</code></a> annotation can also be used on classes to specify to look for fluent setters. |
| </ul> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/BeanContext.html#BEAN_fluentSetters"><code>BeanContext.BEAN_fluentSetters</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#fluentSetters--">fluentSetters</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="fluentSetters-java.lang.Class-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>fluentSetters</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.439">fluentSetters</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> on)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#fluentSetters-java.lang.Class-">BeanContextBuilder</a></code></span></div> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Find fluent setters. |
| |
| <p> |
| Identical to <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#fluentSetters--"><code>BeanContextBuilder.fluentSetters()</code></a> but enables it on a specific class only. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// A bean with a fluent setter.</jc> |
| <jk>public class</jk> MyBean { |
| <jk>public</jk> MyBean foo(String value) {...} |
| } |
| |
| <jc>// Create a parser that finds fluent setters.</jc> |
| ReaderParser p = JsonParser |
| .<jsm>create</jsm>() |
| .fluentSetters(MyBean.<jk>class</jk>) |
| .build(); |
| |
| <jc>// Parse into bean using fluent setter.</jc> |
| MyBean b = p.parse(<js>"{foo:'bar'}"</js>); |
| </p> |
| |
| <ul class='notes'> |
| <li>This method is functionally equivalent to using the <a href="../../../../../org/apache/juneau/annotation/Bean.html#fluentSetters--"><code>Bean.fluentSetters()</code></a> annotation. |
| </ul> |
| |
| <ul class='seealso'> |
| <li class='ja'><a href="../../../../../org/apache/juneau/annotation/Bean.html#fluentSetters--"><code>Bean.fluentSetters()</code></a> |
| <li class='jf'><a href="../../../../../org/apache/juneau/BeanContext.html#BEAN_fluentSetters"><code>BeanContext.BEAN_fluentSetters</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#fluentSetters-java.lang.Class-">fluentSetters</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>on</code> - The class that this applies to.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="ignoreInvocationExceptionsOnGetters--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>ignoreInvocationExceptionsOnGetters</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.445">ignoreInvocationExceptionsOnGetters</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#ignoreInvocationExceptionsOnGetters--">BeanContextBuilder</a></code></span></div> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Ignore invocation errors on getters. |
| |
| <p> |
| When enabled, errors thrown when calling bean getter methods will silently be ignored. |
| Otherwise, a <code>BeanRuntimeException</code> is thrown. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// A bean with a property that throws an exception.</jc> |
| <jk>public class</jk> MyBean { |
| <jk>public</jk> String getFoo() { |
| <jk>throw new</jk> RuntimeException(<js>"foo"</js>); |
| } |
| } |
| |
| <jc>// Create a serializer that ignores bean getter exceptions.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .ingoreInvocationExceptionsOnGetters() |
| .build(); |
| |
| <jc>// Same, but use property.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .set(<jsf>BEAN_ignoreInvocationExceptionsOnGetters</jsf>, <jk>true</jk>) |
| .build(); |
| |
| <jc>// Exception is ignored.</jc> |
| String json = s.serialize(<jk>new</jk> MyBean()); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/BeanContext.html#BEAN_ignoreInvocationExceptionsOnGetters"><code>BeanContext.BEAN_ignoreInvocationExceptionsOnGetters</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#ignoreInvocationExceptionsOnGetters--">ignoreInvocationExceptionsOnGetters</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="ignoreInvocationExceptionsOnSetters--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>ignoreInvocationExceptionsOnSetters</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.451">ignoreInvocationExceptionsOnSetters</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#ignoreInvocationExceptionsOnSetters--">BeanContextBuilder</a></code></span></div> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Ignore invocation errors on setters. |
| |
| <p> |
| When enabled, errors thrown when calling bean setter methods will silently be ignored. |
| Otherwise, a <code>BeanRuntimeException</code> is thrown. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// A bean with a property that throws an exception.</jc> |
| <jk>public class</jk> MyBean { |
| <jk>public void</jk> setFoo(String foo) { |
| <jk>throw new</jk> RuntimeException(<js>"foo"</js>); |
| } |
| } |
| |
| <jc>// Create a parser that ignores bean setter exceptions.</jc> |
| ReaderParser p = JsonParser |
| .<jsm>create</jsm>() |
| .ignoreInvocationExceptionsOnSetters() |
| .build(); |
| |
| <jc>// Same, but use property.</jc> |
| ReaderParser p = JsonParser |
| .<jsm>create</jsm>() |
| .set(<jsf>BEAN_ignoreInvocationExceptionsOnSetters</jsf>, <jk>true</jk>) |
| .build(); |
| |
| <jc>// Exception is ignored.</jc> |
| MyBean b = p.parse(<js>"{foo:'bar'}"</js>, MyBean.<jk>class</jk>); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/BeanContext.html#BEAN_ignoreInvocationExceptionsOnSetters"><code>BeanContext.BEAN_ignoreInvocationExceptionsOnSetters</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#ignoreInvocationExceptionsOnSetters--">ignoreInvocationExceptionsOnSetters</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="ignoreUnknownBeanProperties--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>ignoreUnknownBeanProperties</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.457">ignoreUnknownBeanProperties</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#ignoreUnknownBeanProperties--">BeanContextBuilder</a></code></span></div> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Ignore unknown properties. |
| |
| <p> |
| When enabled, trying to set a value on a non-existent bean property will silently be ignored. |
| Otherwise, a <code>BeanRuntimeException</code> is thrown. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// A bean with a single property.</jc> |
| <jk>public class</jk> MyBean { |
| <jk>public</jk> String <jf>foo</jf>; |
| } |
| |
| <jc>// Create a parser that ignores missing bean properties.</jc> |
| ReaderParser p = JsonParser |
| .<jsm>create</jsm>() |
| .ignoreUnknownBeanProperties() |
| .build(); |
| |
| <jc>// Same, but use property.</jc> |
| ReaderParser p = JsonParser |
| .<jsm>create</jsm>() |
| .set(<jsf>BEAN_ignoreUnknownBeanProperties</jsf>, <jk>true</jk>) |
| .build(); |
| |
| <jc>// Doesn't throw an exception on unknown 'bar' property.</jc> |
| MyBean b = p.parse(<js>"{foo:'foo',bar:'bar'}"</js>, MyBean.<jk>class</jk>); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/BeanContext.html#BEAN_ignoreUnknownBeanProperties"><code>BeanContext.BEAN_ignoreUnknownBeanProperties</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#ignoreUnknownBeanProperties--">ignoreUnknownBeanProperties</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="implClass-java.lang.Class-java.lang.Class-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>implClass</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.463">implClass</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> interfaceClass, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> implClass)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#implClass-java.lang.Class-java.lang.Class-">BeanContextBuilder</a></code></span></div> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Implementation classes. |
| |
| <p> |
| For interfaces and abstract classes this method can be used to specify an implementation class for the |
| interface/abstract class so that instances of the implementation class are used when instantiated (e.g. during a |
| parse). |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// A bean interface.</jc> |
| <jk>public interface</jk> MyBean { |
| ... |
| } |
| |
| <jc>// A bean implementation.</jc> |
| <jk>public class</jk> MyBeanImpl <jk>implements</jk> MyBean { |
| ... |
| } |
| |
| <jc>// Create a parser that instantiates MyBeanImpls when parsing MyBeans.</jc> |
| ReaderParser p = JsonParser |
| .<jsm>create</jsm>() |
| .implClass(MyBean.<jk>class</jk>, MyBeanImpl.<jk>class</jk>) |
| .build(); |
| |
| <jc>// Same, but use property.</jc> |
| ReaderParser p = JsonParser |
| .<jsm>create</jsm>() |
| .addTo(<jsf>BEAN_implClasses</jsf>, MyBean.<jk>class</jk>.getName(), MyBeanImpl.<jk>class</jk>) |
| .build(); |
| |
| <jc>// Instantiates a MyBeanImpl,</jc> |
| MyBean b = p.parse(<js>"..."</js>, MyBean.<jk>class</jk>); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/BeanContext.html#BEAN_implClasses"><code>BeanContext.BEAN_implClasses</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#implClass-java.lang.Class-java.lang.Class-">implClass</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>interfaceClass</code> - The interface class.</dd> |
| <dd><code>implClass</code> - The implementation class.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="implClasses-java.util.Map-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>implClasses</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.469">implClasses</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?>> values)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#implClasses-java.util.Map-">BeanContextBuilder</a></code></span></div> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Implementation classes. |
| |
| <p> |
| For interfaces and abstract classes this method can be used to specify an implementation class for the |
| interface/abstract class so that instances of the implementation class are used when instantiated (e.g. during a |
| parse). |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// A bean with a single property.</jc> |
| <jk>public interface</jk> MyBean { |
| ... |
| } |
| |
| <jc>// A bean with a single property.</jc> |
| <jk>public class</jk> MyBeanImpl <jk>implements</jk> MyBean { |
| ... |
| } |
| |
| <jc>// Create a parser that instantiates MyBeanImpls when parsing MyBeans.</jc> |
| ReaderParser p = JsonParser |
| .<jsm>create</jsm>() |
| .implClasses(AMap.<jsm>of</jsm>(MyBean.<jk>class</jk>, MyBeanImpl.<jk>class</jk>)) |
| .build(); |
| |
| <jc>// Same, but use property.</jc> |
| ReaderParser p = JsonParser |
| .<jsm>create</jsm>() |
| .addTo(<jsf>BEAN_implClasses</jsf>, AMap.<jsm>of</jsm>(MyBean.<jk>class</jk>.getName(), MyBeanImpl.<jk>class</jk>)) |
| .build(); |
| |
| <jc>// Instantiates a MyBeanImpl,</jc> |
| MyBean b = p.parse(<js>"..."</js>, MyBean.<jk>class</jk>); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/BeanContext.html#BEAN_implClasses"><code>BeanContext.BEAN_implClasses</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#implClasses-java.util.Map-">implClasses</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>values</code> - The new value for this property.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="interfaceClass-java.lang.Class-java.lang.Class-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>interfaceClass</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.475">interfaceClass</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> on, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#interfaceClass-java.lang.Class-java.lang.Class-">BeanContextBuilder</a></code></span></div> |
| <div class="block">Identifies a class to be used as the interface class for the specified class and all subclasses. |
| |
| <p> |
| When specified, only the list of properties defined on the interface class will be used during serialization. |
| Additional properties on subclasses will be ignored. |
| |
| <p class='bcode w800'> |
| <jc>// Parent class or interface</jc> |
| <jk>public abstract class</jk> A { |
| <jk>public</jk> String <jf>foo</jf> = <js>"foo"</js>; |
| } |
| |
| <jc>// Sub class</jc> |
| <jk>public class</jk> A1 <jk>extends</jk> A { |
| <jk>public</jk> String <jf>bar</jf> = <js>"bar"</js>; |
| } |
| |
| <jc>// Create a serializer and define our interface class mapping.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .interfaceClass(A1.<jk>class</jk>, A.<jk>class</jk>) |
| .build(); |
| |
| <jc>// Produces "{"foo":"foo"}"</jc> |
| String json = s.serialize(<jk>new</jk> A1()); |
| </p> |
| |
| <p> |
| This annotation can be used on the parent class so that it filters to all child classes, or can be set |
| individually on the child classes. |
| |
| <ul class='notes'> |
| <li>The <a href="../../../../../org/apache/juneau/annotation/Bean.html#interfaceClass--"><code>@Bean(interfaceClass)</code></a> annotation is the equivalent annotation-based solution. |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#interfaceClass-java.lang.Class-java.lang.Class-">interfaceClass</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>on</code> - The class that the interface class applies to.</dd> |
| <dd><code>value</code> - The new value for this property.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="interfaces-java.lang.Class...-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>interfaces</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.481">interfaces</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?>... value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#interfaces-java.lang.Class...-">BeanContextBuilder</a></code></span></div> |
| <div class="block">Identifies a set of interfaces. |
| |
| <p> |
| When specified, only the list of properties defined on the interface class will be used during serialization |
| of implementation classes. Additional properties on subclasses will be ignored. |
| |
| <p class='bcode w800'> |
| <jc>// Parent class or interface</jc> |
| <jk>public abstract class</jk> A { |
| <jk>public</jk> String <jf>foo</jf> = <js>"foo"</js>; |
| } |
| |
| <jc>// Sub class</jc> |
| <jk>public class</jk> A1 <jk>extends</jk> A { |
| <jk>public</jk> String <jf>bar</jf> = <js>"bar"</js>; |
| } |
| |
| <jc>// Create a serializer and define our interface class mapping.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .interfaces(A.<jk>class</jk>) |
| .build(); |
| |
| <jc>// Produces "{"foo":"foo"}"</jc> |
| String json = s.serialize(<jk>new</jk> A1()); |
| </p> |
| |
| <p> |
| This annotation can be used on the parent class so that it filters to all child classes, or can be set |
| individually on the child classes. |
| |
| <ul class='notes'> |
| <li>The <a href="../../../../../org/apache/juneau/annotation/Bean.html#interfaceClass--"><code>@Bean(interfaceClass)</code></a> annotation is the equivalent annotation-based solution. |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#interfaces-java.lang.Class...-">interfaces</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new value for this property.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="notBeanClasses-java.lang.Object...-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>notBeanClasses</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.487">notBeanClasses</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>... values)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#notBeanClasses-java.lang.Object...-">BeanContextBuilder</a></code></span></div> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Bean class exclusions. |
| |
| <p> |
| List of classes that should not be treated as beans even if they appear to be bean-like. |
| Not-bean classes are converted to <c>Strings</c> during serialization. |
| |
| <p> |
| Values can consist of any of the following types: |
| <ul> |
| <li>Classes. |
| <li>Arrays and collections of classes. |
| </ul> |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// A bean with a single property.</jc> |
| <jk>public class</jk> MyBean { |
| <jk>public</jk> String <jf>foo</jf> = <js>"bar"</js>; |
| |
| <jk>public</jk> String toString() { |
| <jk>return</jk> <js>"baz"</js>; |
| } |
| } |
| |
| <jc>// Create a serializer that doesn't treat MyBean as a bean class.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .notBeanClasses(MyBean.<jk>class</jk>) |
| .build(); |
| |
| <jc>// Same, but use property.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .addTo(<jsf>BEAN_notBeanClasses</jsf>, MyBean.<jk>class</jk>) |
| .build(); |
| |
| <jc>// Produces "baz" instead of {"foo":"bar"}</jc> |
| String json = s.serialize(<jk>new</jk> MyBean()); |
| </p> |
| |
| <ul class='notes'> |
| <li>The <a href="../../../../../org/apache/juneau/annotation/BeanIgnore.html" title="annotation in org.apache.juneau.annotation"><code>@BeanIgnore</code></a> annotation can also be used on classes to prevent them from being recognized as beans. |
| </ul> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/BeanContext.html#BEAN_notBeanClasses"><code>BeanContext.BEAN_notBeanClasses</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#notBeanClasses-java.lang.Object...-">notBeanClasses</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>values</code> - The values to add to this property. |
| <br>Values can consist of any of the following types: |
| <ul> |
| <li>Classes. |
| <li>Arrays and collections of classes. |
| </ul></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="notBeanPackages-java.lang.Object...-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>notBeanPackages</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.493">notBeanPackages</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>... values)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#notBeanPackages-java.lang.Object...-">BeanContextBuilder</a></code></span></div> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Bean package exclusions. |
| |
| <p> |
| Used as a convenient way of defining the <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#notBeanClasses-java.lang.Object...-"><code>BeanContextBuilder.notBeanClasses(Object...)</code></a> property for entire packages. |
| Any classes within these packages will be serialized to strings using <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang"><code>Object.toString()</code></a>. |
| |
| <p> |
| Note that you can specify suffix patterns to include all subpackages. |
| |
| <p> |
| Values can consist of any of the following types: |
| <ul> |
| <li>Strings. |
| <li>Arrays and collections of strings. |
| </ul> |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a serializer that ignores beans in the specified packages.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .notBeanPackages(<js>"org.apache.foo"</js>, <js>"org.apache.bar.*"</js>) |
| .build(); |
| |
| <jc>// Same, but use property.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .addTo(<jsf>BEAN_notBeanPackages</jsf>, <js>"org.apache.foo"</js>) |
| .addTo(<jsf>BEAN_notBeanPackages</jsf>, <js>"org.apache.bar.*"</js>) |
| .build(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/BeanContext.html#BEAN_notBeanPackages"><code>BeanContext.BEAN_notBeanPackages</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#notBeanPackages-java.lang.Object...-">notBeanPackages</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>values</code> - The values to add to this property. |
| <br>Values can consist of any of the following types: |
| <ul> |
| <li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Package.html?is-external=true" title="class or interface in java.lang"><code>Package</code></a> objects. |
| <li>Strings. |
| <li>Arrays and collections of anything in this list. |
| </ul></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="propertyNamer-java.lang.Class-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>propertyNamer</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.499">propertyNamer</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="../../../../../org/apache/juneau/PropertyNamer.html" title="interface in org.apache.juneau">PropertyNamer</a>> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#propertyNamer-java.lang.Class-">BeanContextBuilder</a></code></span></div> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Bean property namer |
| |
| <p> |
| The class to use for calculating bean property names. |
| |
| <p> |
| Predefined classes: |
| <ul> |
| <li><a href="../../../../../org/apache/juneau/PropertyNamerDefault.html" title="class in org.apache.juneau"><code>PropertyNamerDefault</code></a> - Default. |
| <li><a href="../../../../../org/apache/juneau/PropertyNamerDLC.html" title="class in org.apache.juneau"><code>PropertyNamerDLC</code></a> - Dashed-lower-case names. |
| <li><a href="../../../../../org/apache/juneau/PropertyNamerULC.html" title="class in org.apache.juneau"><code>PropertyNamerULC</code></a> - Dashed-upper-case names. |
| </ul> |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// A bean with a single property.</jc> |
| <jk>public class</jk> MyBean { |
| <jk>public</jk> String <jf>fooBarBaz</jf> = <js>"fooBarBaz"</js>; |
| } |
| |
| <jc>// Create a serializer that uses Dashed-Lower-Case property names.</jc> |
| <jc>// (e.g. "foo-bar-baz" instead of "fooBarBaz")</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .propertyNamer(PropertyNamerDLC.<jk>class</jk>) |
| .build(); |
| |
| <jc>// Same, but use property.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .set(<jsf>BEAN_propertyNamer</jsf>, PropertyNamerDLC.<jk>class</jk>) |
| .build(); |
| |
| <jc>// Produces: {"foo-bar-baz":"fooBarBaz"}</jc> |
| String json = s.serialize(<jk>new</jk> MyBean()); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/BeanContext.html#BEAN_propertyNamer"><code>BeanContext.BEAN_propertyNamer</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#propertyNamer-java.lang.Class-">propertyNamer</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new value for this setting. |
| <br>The default is <a href="../../../../../org/apache/juneau/PropertyNamerDefault.html" title="class in org.apache.juneau"><code>PropertyNamerDefault</code></a>.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="propertyNamer-java.lang.Class-java.lang.Class-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>propertyNamer</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.505">propertyNamer</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> on, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="../../../../../org/apache/juneau/PropertyNamer.html" title="interface in org.apache.juneau">PropertyNamer</a>> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#propertyNamer-java.lang.Class-java.lang.Class-">BeanContextBuilder</a></code></span></div> |
| <div class="block">Bean property namer |
| |
| <p> |
| Same as <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#propertyNamer-java.lang.Class-"><code>BeanContextBuilder.propertyNamer(Class)</code></a> but allows you to specify a namer for a specific class. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// A bean with a single property.</jc> |
| <jk>public class</jk> MyBean { |
| <jk>public</jk> String <jf>fooBarBaz</jf> = <js>"fooBarBaz"</js>; |
| } |
| |
| <jc>// Create a serializer that uses Dashed-Lower-Case property names for the MyBean class only.</jc> |
| <jc>// (e.g. "foo-bar-baz" instead of "fooBarBaz")</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .propertyNamer(MyBean.<jk>class</jk>, PropertyNamerDLC.<jk>class</jk>) |
| .build(); |
| |
| <jc>// Produces: {"foo-bar-baz":"fooBarBaz"}</jc> |
| String json = s.serialize(<jk>new</jk> MyBean()); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='ja'><a href="../../../../../org/apache/juneau/annotation/Bean.html#propertyNamer--"><code>Bean(propertyNamer)</code></a> |
| <li class='jf'><a href="../../../../../org/apache/juneau/BeanContext.html#BEAN_propertyNamer"><code>BeanContext.BEAN_propertyNamer</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#propertyNamer-java.lang.Class-java.lang.Class-">propertyNamer</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>on</code> - The class that the namer applies to.</dd> |
| <dd><code>value</code> - The new value for this setting. |
| <br>The default is <a href="../../../../../org/apache/juneau/PropertyNamerDefault.html" title="class in org.apache.juneau"><code>PropertyNamerDefault</code></a>.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="sortProperties--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>sortProperties</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.511">sortProperties</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#sortProperties--">BeanContextBuilder</a></code></span></div> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Sort bean properties. |
| |
| <p> |
| When enabled, all bean properties will be serialized and access in alphabetical order. |
| Otherwise, the natural order of the bean properties is used which is dependent on the JVM vendor. |
| On IBM JVMs, the bean properties are ordered based on their ordering in the Java file. |
| On Oracle JVMs, the bean properties are not ordered (which follows the official JVM specs). |
| |
| <p> |
| This property is disabled by default so that IBM JVM users don't have to use <a href="../../../../../org/apache/juneau/annotation/Bean.html" title="annotation in org.apache.juneau.annotation"><code>@Bean</code></a> annotations |
| to force bean properties to be in a particular order and can just alter the order of the fields/methods |
| in the Java file. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// A bean with 3 properties.</jc> |
| <jk>public class</jk> MyBean { |
| <jk>public</jk> String <jf>c</jf> = <js>"1"</js>; |
| <jk>public</jk> String <jf>b</jf> = <js>"2"</js>; |
| <jk>public</jk> String <jf>a</jf> = <js>"3"</js>; |
| } |
| |
| <jc>// Create a serializer that sorts bean properties.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .sortProperties() |
| .build(); |
| |
| <jc>// Same, but use property.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .set(<jsf>BEAN_sortProperties</jsf>, <jk>true</jk>) |
| .build(); |
| |
| <jc>// Produces: {"a":"3","b":"2","c":"1"}</jc> |
| String json = s.serialize(<jk>new</jk> MyBean()); |
| </p> |
| |
| <ul class='notes'> |
| <li>The <a href="../../../../../org/apache/juneau/annotation/Bean.html#sort--"><code>@Bean.sort()</code></a> annotation can also be used to sort properties on just a single class. |
| </ul> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/BeanContext.html#BEAN_sortProperties"><code>BeanContext.BEAN_sortProperties</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#sortProperties--">sortProperties</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="sortProperties-java.lang.Class...-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>sortProperties</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.517">sortProperties</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?>... on)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#sortProperties-java.lang.Class...-">BeanContextBuilder</a></code></span></div> |
| <div class="block">Sort bean properties. |
| |
| <p> |
| Same as <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#sortProperties--"><code>BeanContextBuilder.sortProperties()</code></a> but allows you to specify individual bean classes instead of globally. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// A bean with 3 properties.</jc> |
| <jk>public class</jk> MyBean { |
| <jk>public</jk> String <jf>c</jf> = <js>"1"</js>; |
| <jk>public</jk> String <jf>b</jf> = <js>"2"</js>; |
| <jk>public</jk> String <jf>a</jf> = <js>"3"</js>; |
| } |
| |
| <jc>// Create a serializer that sorts properties on MyBean.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .sortProperties(MyBean.<jk>class</jk>) |
| .build(); |
| |
| <jc>// Produces: {"a":"3","b":"2","c":"1"}</jc> |
| String json = s.serialize(<jk>new</jk> MyBean()); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='ja'><a href="../../../../../org/apache/juneau/annotation/Bean.html#sort--"><code>Bean(sort)</code></a> |
| <li class='jf'><a href="../../../../../org/apache/juneau/BeanContext.html#BEAN_sortProperties"><code>BeanContext.BEAN_sortProperties</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#sortProperties-java.lang.Class...-">sortProperties</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>on</code> - The bean classes to sort properties on.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="stopClass-java.lang.Class-java.lang.Class-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>stopClass</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.523">stopClass</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> on, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#stopClass-java.lang.Class-java.lang.Class-">BeanContextBuilder</a></code></span></div> |
| <div class="block">Identifies a stop class for the annotated class. |
| |
| <p> |
| Identical in purpose to the stop class specified by <a href="https://docs.oracle.com/javase/8/docs/api/java/beans/Introspector.html?is-external=true#getBeanInfo-java.lang.Class-java.lang.Class-" title="class or interface in java.beans"><code>Introspector.getBeanInfo(Class, Class)</code></a>. |
| Any properties in the stop class or in its base classes will be ignored during analysis. |
| |
| <p> |
| For example, in the following class hierarchy, instances of <c>C3</c> will include property <c>p3</c>, |
| but not <c>p1</c> or <c>p2</c>. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jk>public class</jk> C1 { |
| <jk>public int</jk> getP1(); |
| } |
| |
| <jk>public class</jk> C2 <jk>extends</jk> C1 { |
| <jk>public int</jk> getP2(); |
| } |
| |
| <jk>public class</jk> C3 <jk>extends</jk> C2 { |
| <jk>public int</jk> getP3(); |
| } |
| |
| <jc>// Create a serializer specifies a stop class for C3.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .stopClass(C3.<jk>class</jk>, C2.<jk>class</jk>) |
| .build(); |
| |
| <jc>// Produces: {"p3":"..."}</jc> |
| String json = s.serialize(<jk>new</jk> C3()); |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#stopClass-java.lang.Class-java.lang.Class-">stopClass</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>on</code> - The class on which the stop class is being applied.</dd> |
| <dd><code>value</code> - The new value for this property.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="swaps-java.lang.Object...-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>swaps</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.529">swaps</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>... values)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#swaps-java.lang.Object...-">BeanContextBuilder</a></code></span></div> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Java object swaps. |
| |
| <p> |
| Swaps are used to "swap out" non-serializable classes with serializable equivalents during serialization, |
| and "swap in" the non-serializable class during parsing. |
| |
| <p> |
| An example of a swap would be a <c>Calendar</c> object that gets swapped out for an ISO8601 string. |
| |
| <p> |
| Multiple swaps can be associated with a single class. |
| When multiple swaps are applicable to the same class, the media type pattern defined by |
| <a href="../../../../../org/apache/juneau/transform/PojoSwap.html#forMediaTypes--"><code>PojoSwap.forMediaTypes()</code></a> or <a href="../../../../../org/apache/juneau/annotation/Swap.html#mediaTypes--"><code>@Swap(mediaTypes)</code></a> are used to come up with the best match. |
| |
| <p> |
| Values can consist of any of the following types: |
| <ul> |
| <li>Any subclass of <a href="../../../../../org/apache/juneau/transform/PojoSwap.html" title="class in org.apache.juneau.transform"><code>PojoSwap</code></a>. |
| <li>Any instance of <a href="../../../../../org/apache/juneau/transform/PojoSwap.html" title="class in org.apache.juneau.transform"><code>PojoSwap</code></a>. |
| <li>Any surrogate class. A shortcut for defining a <a href="../../../../../org/apache/juneau/transform/SurrogateSwap.html" title="class in org.apache.juneau.transform"><code>SurrogateSwap</code></a>. |
| <li>Any array or collection of the objects above. |
| </ul> |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Sample swap for converting Dates to ISO8601 strings.</jc> |
| <jk>public class</jk> MyDateSwap <jk>extends</jk> StringSwap<Date> { |
| <jc>// ISO8601 formatter.</jc> |
| <jk>private</jk> DateFormat <jf>format</jf> = <jk>new</jk> SimpleDateFormat(<js>"yyyy-MM-dd'T'HH:mm:ssZ"</js>); |
| |
| <ja>@Override</ja> |
| <jk>public</jk> String swap(BeanSession session, Date o) { |
| <jk>return</jk> <jf>format</jf>.format(o); |
| } |
| |
| <ja>@Override</ja> |
| <jk>public</jk> Date unswap(BeanSession session, String o, ClassMeta hint) <jk>throws</jk> Exception { |
| <jk>return</jk> <jf>format</jf>.parse(o); |
| } |
| } |
| |
| <jc>// Sample bean with a Date field.</jc> |
| <jk>public class</jk> MyBean { |
| <jk>public</jk> Date <jf>date</jf> = <jk>new</jk> Date(112, 2, 3, 4, 5, 6); |
| } |
| |
| <jc>// Create a serializer that uses our date swap.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .swaps(MyDateSwap.<jk>class</jk>) |
| .build(); |
| |
| <jc>// Same, but use property.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .addTo(<jsf>BEAN_swaps</jsf>, MyDateSwap.<jk>class</jk>) |
| .build(); |
| |
| <jc>// Produces: {"date":"2012-03-03T04:05:06-0500"}</jc> |
| String json = s.serialize(<jk>new</jk> MyBean()); |
| |
| <jc>// Create a serializer that uses our date swap.</jc> |
| ReaderParser p = JsonParser |
| .<jsm>create</jsm>() |
| .swaps(MyDateSwap.<jk>class</jk>) |
| .build(); |
| |
| <jc>// Use our parser to parse a bean.</jc> |
| MyBean bean = p.parse(json, MyBean.<jk>class</jk>); |
| </p> |
| |
| <ul class='notes'> |
| <li>The <a href="../../../../../org/apache/juneau/annotation/Swap.html" title="annotation in org.apache.juneau.annotation"><code>@Swap</code></a> annotation can also be used on classes to identify swaps for the class. |
| <li>The <a href="../../../../../org/apache/juneau/annotation/Swap.html" title="annotation in org.apache.juneau.annotation"><code>@Swap</code></a> annotation can also be used on bean methods and fields to identify swaps for values of those bean properties. |
| </ul> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/BeanContext.html#BEAN_swaps"><code>BeanContext.BEAN_swaps</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#swaps-java.lang.Object...-">swaps</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>values</code> - The values to add to this property. |
| <br>Values can consist of any of the following types: |
| <ul> |
| <li>Any subclass of <a href="../../../../../org/apache/juneau/transform/PojoSwap.html" title="class in org.apache.juneau.transform"><code>PojoSwap</code></a>. |
| <li>Any surrogate class. A shortcut for defining a <a href="../../../../../org/apache/juneau/transform/SurrogateSwap.html" title="class in org.apache.juneau.transform"><code>SurrogateSwap</code></a>. |
| <li>Any array or collection of the objects above. |
| </ul></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="typeName-java.lang.Class-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>typeName</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.535">typeName</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> on, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#typeName-java.lang.Class-java.lang.String-">BeanContextBuilder</a></code></span></div> |
| <div class="block">An identifying name for this class. |
| |
| <p> |
| The name is used to identify the class type during parsing when it cannot be inferred through reflection. |
| For example, if a bean property is of type <c>Object</c>, then the serializer will add the name to the |
| output so that the class can be determined during parsing. |
| |
| <p> |
| It is also used to specify element names in XML. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Use _type='mybean' to identify this bean.</jc> |
| <jk>public class</jk> MyBean {...} |
| |
| <jc>// Create a serializer and specify the type name..</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .typeName(MyBean.<jk>class</jk>, <js>"mybean"</js>) |
| .build(); |
| |
| <jc>// Produces: {"_type":"mybean",...}</jc> |
| String json = s.serialize(<jk>new</jk> MyBean()); |
| </p> |
| |
| <ul class='notes'> |
| <li>Equivalent to the <a href="../../../../../org/apache/juneau/annotation/Bean.html#typeName--"><code>Bean(typeName)</code></a> annotation. |
| </ul> |
| |
| <ul class='seealso'> |
| <li class='jc'><a href="../../../../../org/apache/juneau/annotation/Bean.html#typeName--"><code>Bean(typeName)</code></a> |
| <li class='jf'><a href="../../../../../org/apache/juneau/BeanContext.html#BEAN_beanDictionary"><code>BeanContext.BEAN_beanDictionary</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#typeName-java.lang.Class-java.lang.String-">typeName</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>on</code> - The class the type name is being defined on.</dd> |
| <dd><code>value</code> - The new value for this property.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="typePropertyName-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>typePropertyName</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.541">typePropertyName</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#typePropertyName-java.lang.String-">BeanContextBuilder</a></code></span></div> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Bean type property name. |
| |
| <p> |
| This specifies the name of the bean property used to store the dictionary name of a bean type so that the |
| parser knows the data type to reconstruct. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// POJOs with @Bean(name) annotations.</jc> |
| <ja>@Bean</ja>(typeName=<js>"foo"</js>) |
| <jk>public class</jk> Foo {...} |
| <ja>@Bean</ja>(typeName=<js>"bar"</js>) |
| <jk>public class</jk> Bar {...} |
| |
| <jc>// Create a serializer that uses 't' instead of '_type' for dictionary names.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .typePropertyName(<js>"t"</js>) |
| .dictionary(Foo.<jk>class</jk>, Bar.<jk>class</jk>) |
| .build(); |
| |
| <jc>// Same, but use property.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .set(<jsf>BEAN_typePropertyName</jsf>, <js>"t"</js>) |
| .addTo(<jsf>BEAN_beanDictionary</jsf>, Foo.<jk>class</jk>) |
| .addTo(<jsf>BEAN_beanDictionary</jsf>, Bar.<jk>class</jk>) |
| .build(); |
| |
| <jc>// A bean with a field with an indeterminate type.</jc> |
| <jk>public class</jk> MyBean { |
| <jk>public</jk> Object <jf>mySimpleField</jf>; |
| } |
| |
| <jc>// Parse bean.</jc> |
| MyBean b = p.parse(<js>"{mySimpleField:{t:'foo',...}}"</js>, MyBean.<jk>class</jk>); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/BeanContext.html#BEAN_typePropertyName"><code>BeanContext.BEAN_typePropertyName</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#typePropertyName-java.lang.String-">typePropertyName</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new value for this property. |
| <br>The default is <js>"_type"</js>.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="typePropertyName-java.lang.Class-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>typePropertyName</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.547">typePropertyName</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> on, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#typePropertyName-java.lang.Class-java.lang.String-">BeanContextBuilder</a></code></span></div> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Bean type property name. |
| |
| <p> |
| Same as <a href="../../../../../org/apache/juneau/BeanContextBuilder.html#typePropertyName-java.lang.String-"><code>BeanContextBuilder.typePropertyName(String)</code></a> except targets a specific bean class instead of globally. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// POJOs with @Bean(name) annotations.</jc> |
| <ja>@Bean</ja>(typeName=<js>"foo"</js>) |
| <jk>public class</jk> Foo {...} |
| <ja>@Bean</ja>(typeName=<js>"bar"</js>) |
| <jk>public class</jk> Bar {...} |
| |
| <jc>// A bean with a field with an indeterminate type.</jc> |
| <jk>public class</jk> MyBean { |
| <jk>public</jk> Object <jf>mySimpleField</jf>; |
| } |
| |
| <jc>// Create a serializer that uses 't' instead of '_type' for dictionary names.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .typePropertyName(MyBean.<jk>class</jk>, <js>"t"</js>) |
| .dictionary(Foo.<jk>class</jk>, Bar.<jk>class</jk>) |
| .build(); |
| |
| <jc>// Parse bean.</jc> |
| MyBean b = p.parse(<js>"{mySimpleField:{t:'foo',...}}"</js>, MyBean.<jk>class</jk>); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='ja'><a href="../../../../../org/apache/juneau/annotation/Bean.html#typePropertyName--"><code>Bean(typePropertyName)</code></a> |
| <li class='jf'><a href="../../../../../org/apache/juneau/BeanContext.html#BEAN_typePropertyName"><code>BeanContext.BEAN_typePropertyName</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#typePropertyName-java.lang.Class-java.lang.String-">typePropertyName</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>on</code> - The class the type property name applies to.</dd> |
| <dd><code>value</code> - The new value for this property. |
| <br>The default is <js>"_type"</js>.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="useEnumNames--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>useEnumNames</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.553">useEnumNames</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#useEnumNames--">BeanContextBuilder</a></code></span></div> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Use enum names. |
| |
| <p> |
| When enabled, enums are always serialized by name, not using <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang"><code>Object.toString()</code></a>. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a serializer with debug enabled.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .useEnumNames() |
| .build(); |
| |
| <jc>// Same, but use property.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .set(<jsf>BEAN_useEnumNames</jsf>, <jk>true</jk>) |
| .build(); |
| |
| <jc>// Enum with overridden toString().</jc> |
| <jc>// Will be serialized as ONE/TWO/THREE even though there's a toString() method.</jc> |
| <jk>public enum</jk> Option { |
| <jsf>ONE</jsf>(1), |
| <jsf>TWO</jsf>(2), |
| <jsf>THREE</jsf>(3); |
| |
| <jk>private int</jk> <jf>i</jf>; |
| |
| Option(<jk>int</jk> i) { |
| <jk>this</jk>.<jf>i</jf> = i; |
| } |
| |
| <ja>@Override</ja> |
| <jk>public</jk> String toString() { |
| <jk>return</jk> String.<jsm>valueOf</jsm>(<jf>i</jf>); |
| } |
| } |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/BeanContext.html#BEAN_useEnumNames"><code>BeanContext.BEAN_useEnumNames</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#useEnumNames--">useEnumNames</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="useJavaBeanIntrospector--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>useJavaBeanIntrospector</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.559">useJavaBeanIntrospector</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/BeanContextBuilder.html#useJavaBeanIntrospector--">BeanContextBuilder</a></code></span></div> |
| <div class="block"><i><l>BeanContext</l> configuration property: </i> Use Java Introspector. |
| |
| <p> |
| Using the built-in Java bean introspector will not pick up fields or non-standard getters/setters. |
| <br>Most <a href="../../../../../org/apache/juneau/annotation/Bean.html" title="annotation in org.apache.juneau.annotation"><code>@Bean</code></a> annotations will be ignored. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a serializer that only uses the built-in java bean introspector for finding properties.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .useJavaBeanIntrospector() |
| .build(); |
| |
| <jc>// Same, but use property.</jc> |
| WriterSerializer s = JsonSerializer |
| .<jsm>create</jsm>() |
| .set(<jsf>BEAN_useJavaBeanIntrospector</jsf>, <jk>true</jk>) |
| .build(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/BeanContext.html#BEAN_useJavaBeanIntrospector"><code>BeanContext.BEAN_useJavaBeanIntrospector</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#useJavaBeanIntrospector--">useJavaBeanIntrospector</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="accept-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>accept</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.565">accept</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#accept-java.lang.Object-">RestClientBuilder</a></code></span></div> |
| <div class="block">Sets the value for the <c>Accept</c> request header on all requests. |
| |
| <p> |
| This overrides the media type specified on the parser, but is overridden by calling |
| <code>header(<js>"Accept"</js>, value);</code></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#accept-java.lang.Object-">accept</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new header value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="acceptCharset-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>acceptCharset</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.571">acceptCharset</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#acceptCharset-java.lang.Object-">RestClientBuilder</a></code></span></div> |
| <div class="block">Sets the value for the <c>Accept-Charset</c> request header on all requests. |
| |
| <p> |
| This is a shortcut for calling <code>header(<js>"Accept-Charset"</js>, value);</code></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#acceptCharset-java.lang.Object-">acceptCharset</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new header value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="acceptEncoding-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>acceptEncoding</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.577">acceptEncoding</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#acceptEncoding-java.lang.Object-">RestClientBuilder</a></code></span></div> |
| <div class="block">Sets the value for the <c>Accept-Encoding</c> request header on all requests. |
| |
| <p> |
| This is a shortcut for calling <code>header(<js>"Accept-Encoding"</js>, value);</code></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#acceptEncoding-java.lang.Object-">acceptEncoding</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new header value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="acceptLanguage-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>acceptLanguage</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.583">acceptLanguage</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#acceptLanguage-java.lang.Object-">RestClientBuilder</a></code></span></div> |
| <div class="block">Sets the value for the <c>Accept-Language</c> request header on all requests. |
| |
| <p> |
| This is a shortcut for calling <code>header(<js>"Accept-Language"</js>, value);</code></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#acceptLanguage-java.lang.Object-">acceptLanguage</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new header value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="addBeanTypes--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addBeanTypes</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.589">addBeanTypes</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#addBeanTypes--">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>Serializer</l> configuration property: </i> Add <js>"_type"</js> properties when needed. |
| |
| <p> |
| When enabled, <js>"_type"</js> properties will be added to beans if their type cannot be inferred |
| through reflection. |
| |
| <p> |
| This is used to recreate the correct objects during parsing if the object types cannot be inferred. |
| <br>For example, when serializing a <c>Map<String,Object></c> field where the bean class cannot be determined from |
| the type of the values. |
| |
| <p> |
| Note the differences between the following settings: |
| <ul class='javatree'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#addRootType--"><code>RestClientBuilder.addRootType()</code></a> - Affects whether <js>'_type'</js> is added to root node. |
| <li class='jf'><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#addBeanTypes--"><code>RestClientBuilder.addBeanTypes()</code></a> - Affects whether <js>'_type'</js> is added to any nodes. |
| </ul> |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a JSON client that adds _type to nodes in the request body.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .json() |
| .addBeanTypes() |
| .build(); |
| |
| <jc>// Our map of beans to serialize.</jc> |
| <ja>@Bean</ja>(typeName=<js>"mybean"</js>) |
| <jk>public class</jk> MyBean { |
| <jk>public</jk> String <jf>foo</jf> = <js>"bar"</js>; |
| } |
| |
| AMap <jv>map</jv> = AMap.of(<js>"foo"</js>, <jk>new</jk> MyBean()); |
| |
| <jc>// Request body will contain: {"foo":{"_type":"mybean","foo":"bar"}}</jc> |
| <jv>client</jv> |
| .doPost(<js>"http://localhost:10000/foo"</js>, <jv>map</jv>) |
| .run(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/serializer/Serializer.html#SERIALIZER_addBeanTypes"><code>Serializer.SERIALIZER_addBeanTypes</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#addBeanTypes--">addBeanTypes</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="addInterceptorFirst-org.apache.http.HttpRequestInterceptor-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addInterceptorFirst</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.595">addInterceptorFirst</a>(<a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/HttpRequestInterceptor.html?is-external=true" title="class or interface in org.apache.http">HttpRequestInterceptor</a> itcp)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#addInterceptorFirst-org.apache.http.HttpRequestInterceptor-">RestClientBuilder</a></code></span></div> |
| <div class="block">Adds this protocol interceptor to the head of the protocol processing list. |
| |
| <ul class='notes'> |
| <li>This value can be overridden by the <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#httpProcessor-org.apache.http.protocol.HttpProcessor-"><code>RestClientBuilder.httpProcessor(HttpProcessor)</code></a> method. |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#addInterceptorFirst-org.apache.http.HttpRequestInterceptor-">addInterceptorFirst</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>itcp</code> - New property value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true#addInterceptorFirst-org.apache.http.HttpRequestInterceptor-" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder.addInterceptorFirst(HttpRequestInterceptor)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="addInterceptorFirst-org.apache.http.HttpResponseInterceptor-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addInterceptorFirst</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.601">addInterceptorFirst</a>(<a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/HttpResponseInterceptor.html?is-external=true" title="class or interface in org.apache.http">HttpResponseInterceptor</a> itcp)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#addInterceptorFirst-org.apache.http.HttpResponseInterceptor-">RestClientBuilder</a></code></span></div> |
| <div class="block">Adds this protocol interceptor to the head of the protocol processing list. |
| |
| <ul class='notes'> |
| <li>This value can be overridden by the <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#httpProcessor-org.apache.http.protocol.HttpProcessor-"><code>RestClientBuilder.httpProcessor(HttpProcessor)</code></a> method. |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#addInterceptorFirst-org.apache.http.HttpResponseInterceptor-">addInterceptorFirst</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>itcp</code> - New property value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true#addInterceptorFirst-org.apache.http.HttpResponseInterceptor-" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder.addInterceptorFirst(HttpResponseInterceptor)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="addInterceptorLast-org.apache.http.HttpRequestInterceptor-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addInterceptorLast</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.607">addInterceptorLast</a>(<a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/HttpRequestInterceptor.html?is-external=true" title="class or interface in org.apache.http">HttpRequestInterceptor</a> itcp)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#addInterceptorLast-org.apache.http.HttpRequestInterceptor-">RestClientBuilder</a></code></span></div> |
| <div class="block">Adds this protocol interceptor to the tail of the protocol processing list. |
| |
| <ul class='notes'> |
| <li>This value can be overridden by the <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#httpProcessor-org.apache.http.protocol.HttpProcessor-"><code>RestClientBuilder.httpProcessor(HttpProcessor)</code></a> method. |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#addInterceptorLast-org.apache.http.HttpRequestInterceptor-">addInterceptorLast</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>itcp</code> - New property value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true#addInterceptorLast-org.apache.http.HttpRequestInterceptor-" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder.addInterceptorLast(HttpRequestInterceptor)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="addInterceptorLast-org.apache.http.HttpResponseInterceptor-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addInterceptorLast</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.613">addInterceptorLast</a>(<a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/HttpResponseInterceptor.html?is-external=true" title="class or interface in org.apache.http">HttpResponseInterceptor</a> itcp)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#addInterceptorLast-org.apache.http.HttpResponseInterceptor-">RestClientBuilder</a></code></span></div> |
| <div class="block">Adds this protocol interceptor to the tail of the protocol processing list. |
| |
| <ul class='notes'> |
| <li>This value can be overridden by the <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#httpProcessor-org.apache.http.protocol.HttpProcessor-"><code>RestClientBuilder.httpProcessor(HttpProcessor)</code></a> method. |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#addInterceptorLast-org.apache.http.HttpResponseInterceptor-">addInterceptorLast</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>itcp</code> - New property value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true#addInterceptorLast-org.apache.http.HttpResponseInterceptor-" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder.addInterceptorLast(HttpResponseInterceptor)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="addRootType--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addRootType</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.619">addRootType</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#addRootType--">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>Serializer</l> configuration property: </i> Add type attribute to root nodes. |
| |
| <p> |
| When enabled, <js>"_type"</js> properties will be added to top-level beans. |
| |
| <p> |
| When disabled, 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 top-level POJO with a <a href="../../../../../org/apache/juneau/annotation/Bean.html#typeName--"><code>@Bean(typeName)</code></a> value, a |
| <js>'_type'</js> attribute will only be added when this setting is enabled. |
| |
| <p> |
| Note the differences between the following settings: |
| <ul class='javatree'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#addRootType--"><code>RestClientBuilder.addRootType()</code></a> - Affects whether <js>'_type'</js> is added to root node. |
| <li class='jf'><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#addBeanTypes--"><code>RestClientBuilder.addBeanTypes()</code></a> - Affects whether <js>'_type'</js> is added to any nodes. |
| </ul> |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a JSON client that adds _type to root node.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .json() |
| .addRootType() |
| .build(); |
| |
| <jc>// Our bean to serialize.</jc> |
| <ja>@Bean</ja>(typeName=<js>"mybean"</js>) |
| <jk>public class</jk> MyBean { |
| <jk>public</jk> String <jf>foo</jf> = <js>"bar"</js>; |
| } |
| |
| <jc>// Request body will contain: {"_type":"mybean","foo":"bar"}</jc> |
| <jv>client</jv> |
| .doPost(<js>"http://localhost:10000/foo"</js>, <jk>new</jk> MyBean()) |
| .run(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/serializer/Serializer.html#SERIALIZER_addRootType"><code>Serializer.SERIALIZER_addRootType</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#addRootType--">addRootType</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="authorization-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>authorization</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.625">authorization</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#authorization-java.lang.Object-">RestClientBuilder</a></code></span></div> |
| <div class="block">Sets the value for the <c>Authorization</c> request header on all requests. |
| |
| <p> |
| This is a shortcut for calling <code>header(<js>"Authorization"</js>, value);</code></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#authorization-java.lang.Object-">authorization</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new header value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="backoffManager-org.apache.http.client.BackoffManager-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>backoffManager</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.631">backoffManager</a>(<a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/BackoffManager.html?is-external=true" title="class or interface in org.apache.http.client">BackoffManager</a> backoffManager)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#backoffManager-org.apache.http.client.BackoffManager-">RestClientBuilder</a></code></span></div> |
| <div class="block">Assigns <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/BackoffManager.html?is-external=true" title="class or interface in org.apache.http.client"><code>BackoffManager</code></a> instance.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#backoffManager-org.apache.http.client.BackoffManager-">backoffManager</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>backoffManager</code> - New property value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true#setBackoffManager-org.apache.http.client.BackoffManager-" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder.setBackoffManager(BackoffManager)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="basicAuth-java.lang.String-int-java.lang.String-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>basicAuth</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.637">basicAuth</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> host, |
| int port, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> user, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> pw)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#basicAuth-java.lang.String-int-java.lang.String-java.lang.String-">RestClientBuilder</a></code></span></div> |
| <div class="block">Set up this client to use BASIC auth. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Construct a client that uses BASIC authentication.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .basicAuth(<js>"http://localhost"</js>, 80, <js>"me"</js>, <js>"mypassword"</js>) |
| .build(); |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#basicAuth-java.lang.String-int-java.lang.String-java.lang.String-">basicAuth</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>host</code> - The auth scope hostname.</dd> |
| <dd><code>port</code> - The auth scope port.</dd> |
| <dd><code>user</code> - The username.</dd> |
| <dd><code>pw</code> - The password.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="cacheControl-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>cacheControl</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.643">cacheControl</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#cacheControl-java.lang.Object-">RestClientBuilder</a></code></span></div> |
| <div class="block">Sets the value for the <c>Cache-Control</c> request header on all requests. |
| |
| <p> |
| This is a shortcut for calling <code>header(<js>"Cache-Control"</js>, value);</code></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#cacheControl-java.lang.Object-">cacheControl</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new header value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="callHandler-java.lang.Class-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>callHandler</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.649">callHandler</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="../../../../../org/apache/juneau/rest/client2/RestCallHandler.html" title="interface in org.apache.juneau.rest.client2">RestCallHandler</a>> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#callHandler-java.lang.Class-">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> REST call handler. |
| |
| <p> |
| Allows you to provide a custom handler for making HTTP calls. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a client that handles processing of requests using a custom handler.</jc> |
| <jk>public class</jk> MyRestCallHandler <jk>implements</jk> RestCallHandler { |
| |
| <ja>@Override</ja> |
| <jk>public</jk> HttpResponse run(HttpHost <jv>target</jv>, HttpRequest <jv>request</jv>, HttpContext <jv>context</jv>) <jk>throws</jk> IOException { |
| <jc>// Custom handle requests.</jc> |
| } |
| } |
| |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .callHandler(MyRestCallHandler.<jk>class</jk>) |
| .build(); |
| </p> |
| |
| <ul class='notes'> |
| <li>The <a href="../../../../../org/apache/juneau/rest/client2/RestClient.html#run-org.apache.http.HttpHost-org.apache.http.HttpRequest-org.apache.http.protocol.HttpContext-"><code>RestClient.run(HttpHost, HttpRequest, HttpContext)</code></a> method can also be overridden to produce the same results. |
| </ul> |
| |
| <ul class='seealso'> |
| <li class='jic'><a href="../../../../../org/apache/juneau/rest/client2/RestCallHandler.html" title="interface in org.apache.juneau.rest.client2"><code>RestCallHandler</code></a> |
| <li class='jf'><a href="../../../../../org/apache/juneau/rest/client2/RestClient.html#RESTCLIENT_callHandler"><code>RestClient.RESTCLIENT_callHandler</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#callHandler-java.lang.Class-">callHandler</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new value for this setting. |
| <br>The default value is <jk>null</jk>.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="callHandler-org.apache.juneau.rest.client2.RestCallHandler-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>callHandler</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.655">callHandler</a>(<a href="../../../../../org/apache/juneau/rest/client2/RestCallHandler.html" title="interface in org.apache.juneau.rest.client2">RestCallHandler</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#callHandler-org.apache.juneau.rest.client2.RestCallHandler-">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> REST call handler. |
| |
| <p> |
| Allows you to provide a custom handler for making HTTP calls. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a client that handles processing of requests using a custom handler.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .callHandler( |
| <jk>new</jk> RestCallHandler() { |
| <ja>@Override</ja> |
| <jk>public</jk> HttpResponse run(HttpHost <jv>target</jv>, HttpRequest <jv>request</jv>, HttpContext <jv>context</jv>) <jk>throws</jk> IOException { |
| <jc>// Custom handle requests.</jc> |
| } |
| } |
| ) |
| .build(); |
| </p> |
| |
| <ul class='notes'> |
| <li>The <a href="../../../../../org/apache/juneau/rest/client2/RestClient.html#run-org.apache.http.HttpHost-org.apache.http.HttpRequest-org.apache.http.protocol.HttpContext-"><code>RestClient.run(HttpHost, HttpRequest, HttpContext)</code></a> method can also be overridden to produce the same results. |
| </ul> |
| |
| <ul class='seealso'> |
| <li class='jic'><a href="../../../../../org/apache/juneau/rest/client2/RestCallHandler.html" title="interface in org.apache.juneau.rest.client2"><code>RestCallHandler</code></a> |
| <li class='jf'><a href="../../../../../org/apache/juneau/rest/client2/RestClient.html#RESTCLIENT_callHandler"><code>RestClient.RESTCLIENT_callHandler</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#callHandler-org.apache.juneau.rest.client2.RestCallHandler-">callHandler</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new value for this setting. |
| <br>The default value is <jk>null</jk>.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="clientVersion-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>clientVersion</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.661">clientVersion</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#clientVersion-java.lang.Object-">RestClientBuilder</a></code></span></div> |
| <div class="block">Sets the client version by setting the value for the <js>"X-Client-Version"</js> header.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#clientVersion-java.lang.Object-">clientVersion</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The version string (e.g. <js>"1.2.3"</js>)</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="connection-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>connection</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.667">connection</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#connection-java.lang.Object-">RestClientBuilder</a></code></span></div> |
| <div class="block">Sets the value for the <c>Connection</c> request header on all requests. |
| |
| <p> |
| This is a shortcut for calling <code>header(<js>"Connection"</js>, value);</code></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#connection-java.lang.Object-">connection</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new header value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="connectionBackoffStrategy-org.apache.http.client.ConnectionBackoffStrategy-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>connectionBackoffStrategy</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.673">connectionBackoffStrategy</a>(<a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/ConnectionBackoffStrategy.html?is-external=true" title="class or interface in org.apache.http.client">ConnectionBackoffStrategy</a> connectionBackoffStrategy)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#connectionBackoffStrategy-org.apache.http.client.ConnectionBackoffStrategy-">RestClientBuilder</a></code></span></div> |
| <div class="block">Assigns <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/ConnectionBackoffStrategy.html?is-external=true" title="class or interface in org.apache.http.client"><code>ConnectionBackoffStrategy</code></a> instance.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#connectionBackoffStrategy-org.apache.http.client.ConnectionBackoffStrategy-">connectionBackoffStrategy</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>connectionBackoffStrategy</code> - New property value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true#setConnectionBackoffStrategy-org.apache.http.client.ConnectionBackoffStrategy-" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder.setConnectionBackoffStrategy(ConnectionBackoffStrategy)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="connectionManager-org.apache.http.conn.HttpClientConnectionManager-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>connectionManager</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.679">connectionManager</a>(<a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/conn/HttpClientConnectionManager.html?is-external=true" title="class or interface in org.apache.http.conn">HttpClientConnectionManager</a> connManager)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#connectionManager-org.apache.http.conn.HttpClientConnectionManager-">RestClientBuilder</a></code></span></div> |
| <div class="block">Assigns <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/conn/HttpClientConnectionManager.html?is-external=true" title="class or interface in org.apache.http.conn"><code>HttpClientConnectionManager</code></a> instance.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#connectionManager-org.apache.http.conn.HttpClientConnectionManager-">connectionManager</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>connManager</code> - New property value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true#setConnectionManager-org.apache.http.conn.HttpClientConnectionManager-" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder.setConnectionManager(HttpClientConnectionManager)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="connectionManagerShared-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>connectionManagerShared</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.685">connectionManagerShared</a>(boolean shared)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#connectionManagerShared-boolean-">RestClientBuilder</a></code></span></div> |
| <div class="block">Defines the connection manager is to be shared by multiple client instances. |
| |
| <ul class='notes'> |
| <li>If the connection manager is shared its life-cycle is expected to be managed by the caller and it will not be shut down if the client is closed. |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#connectionManagerShared-boolean-">connectionManagerShared</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>shared</code> - New property value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true#setConnectionManagerShared-boolean-" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder.setConnectionManagerShared(boolean)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="connectionReuseStrategy-org.apache.http.ConnectionReuseStrategy-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>connectionReuseStrategy</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.691">connectionReuseStrategy</a>(<a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/ConnectionReuseStrategy.html?is-external=true" title="class or interface in org.apache.http">ConnectionReuseStrategy</a> reuseStrategy)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#connectionReuseStrategy-org.apache.http.ConnectionReuseStrategy-">RestClientBuilder</a></code></span></div> |
| <div class="block">Assigns <a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/ConnectionReuseStrategy.html?is-external=true" title="class or interface in org.apache.http"><code>ConnectionReuseStrategy</code></a> instance.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#connectionReuseStrategy-org.apache.http.ConnectionReuseStrategy-">connectionReuseStrategy</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>reuseStrategy</code> - New property value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true#setConnectionReuseStrategy-org.apache.http.ConnectionReuseStrategy-" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder.setConnectionReuseStrategy(ConnectionReuseStrategy)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="connectionTimeToLive-long-java.util.concurrent.TimeUnit-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>connectionTimeToLive</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.697">connectionTimeToLive</a>(long connTimeToLive, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent">TimeUnit</a> connTimeToLiveTimeUnit)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#connectionTimeToLive-long-java.util.concurrent.TimeUnit-">RestClientBuilder</a></code></span></div> |
| <div class="block">Sets maximum time to live for persistent connections. |
| |
| <ul class='notes'> |
| <li>This value can be overridden by the <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#connectionManager-org.apache.http.conn.HttpClientConnectionManager-"><code>RestClientBuilder.connectionManager(HttpClientConnectionManager)</code></a> method. |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#connectionTimeToLive-long-java.util.concurrent.TimeUnit-">connectionTimeToLive</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>connTimeToLive</code> - New property value.</dd> |
| <dd><code>connTimeToLiveTimeUnit</code> - New property value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true#setConnectionTimeToLive-long-java.util.concurrent.TimeUnit-" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder.setConnectionTimeToLive(long,TimeUnit)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="console-java.io.PrintStream-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>console</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.703">console</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/PrintStream.html?is-external=true" title="class or interface in java.io">PrintStream</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#console-java.io.PrintStream-">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Console print stream |
| |
| <p> |
| Allows you to redirect the console output to a different print stream. |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/rest/client2/RestClient.html#RESTCLIENT_console"><code>RestClient.RESTCLIENT_console</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#console-java.io.PrintStream-">console</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new value for this setting.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="console-java.lang.Class-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>console</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.709">console</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="https://docs.oracle.com/javase/8/docs/api/java/io/PrintStream.html?is-external=true" title="class or interface in java.io">PrintStream</a>> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#console-java.lang.Class-">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Console print stream |
| |
| <p> |
| Allows you to redirect the console output to a different print stream. |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/rest/client2/RestClient.html#RESTCLIENT_console"><code>RestClient.RESTCLIENT_console</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#console-java.lang.Class-">console</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new value for this setting.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="contentDecoderRegistry-java.util.Map-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>contentDecoderRegistry</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.715">contentDecoderRegistry</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/entity/InputStreamFactory.html?is-external=true" title="class or interface in org.apache.http.client.entity">InputStreamFactory</a>> contentDecoderMap)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#contentDecoderRegistry-java.util.Map-">RestClientBuilder</a></code></span></div> |
| <div class="block">Assigns a map of <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/entity/InputStreamFactory.html?is-external=true" title="class or interface in org.apache.http.client.entity"><code>InputStreamFactories</code></a> to be used for automatic content decompression.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#contentDecoderRegistry-java.util.Map-">contentDecoderRegistry</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>contentDecoderMap</code> - New property value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true#setContentDecoderRegistry-java.util.Map-" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder.setContentDecoderRegistry(Map)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="contentEncoding-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>contentEncoding</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.721">contentEncoding</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#contentEncoding-java.lang.Object-">RestClientBuilder</a></code></span></div> |
| <div class="block">Sets the value for the <c>Content-Encoding</c> request header on all requests. |
| |
| <p> |
| This is a shortcut for calling <code>header(<js>"Content-Encoding"</js>, value);</code></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#contentEncoding-java.lang.Object-">contentEncoding</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new header value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="contentLength-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>contentLength</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.727">contentLength</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#contentLength-java.lang.Object-">RestClientBuilder</a></code></span></div> |
| <div class="block">Sets the value for the <c>Content-Length</c> request header on all requests. |
| |
| <p> |
| This is a shortcut for calling <code>header(<js>"Content-Length"</js>, value);</code></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#contentLength-java.lang.Object-">contentLength</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new header value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="contentType-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>contentType</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.733">contentType</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#contentType-java.lang.Object-">RestClientBuilder</a></code></span></div> |
| <div class="block">Sets the value for the <c>Content-Type</c> request header on all requests. |
| |
| <p> |
| This overrides the media type specified on the serializer, but is overridden by calling |
| <code>header(<js>"Content-Type"</js>, value);</code></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#contentType-java.lang.Object-">contentType</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new header value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="date-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>date</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.739">date</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#date-java.lang.Object-">RestClientBuilder</a></code></span></div> |
| <div class="block">Sets the value for the <c>Date</c> request header on all requests. |
| |
| <p> |
| This is a shortcut for calling <code>header(<js>"Date"</js>, value);</code></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#date-java.lang.Object-">date</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new header value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="debugOutputLines-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>debugOutputLines</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.745">debugOutputLines</a>(int value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#debugOutputLines-int-">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>Parser</l> configuration property: </i> Debug output lines. |
| |
| <p> |
| When parse errors occur, this specifies the number of lines of input before and after the |
| error location to be printed as part of the exception message. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a parser whose exceptions print out 100 lines before and after the parse error location.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .json() |
| .debug() <jc>// Enable debug mode to capture Reader contents as strings.</jc> |
| .debugOuputLines(100) |
| .build(); |
| |
| <jc>// Try to parse some bad JSON.</jc> |
| <jk>try</jk> { |
| <jv>client</jv> |
| .get(<js>"/pathToBadJson"</js>) |
| .run() |
| .getBody().as(Object.<jk>class</jk>); <jc>// Try to parse it.</jc> |
| } <jk>catch</jk> (RestCallException <jv>e</jv>) { |
| System.<jsf>err</jsf>.println(<jv>e</jv>.getMessage()); <jc>// Will display 200 lines of the output.</jc> |
| } |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/parser/Parser.html#PARSER_debugOutputLines"><code>Parser.PARSER_debugOutputLines</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#debugOutputLines-int-">debugOutputLines</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new value for this property. |
| <br>The default value is <c>5</c>.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="defaultAuthSchemeRegistry-org.apache.http.config.Lookup-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>defaultAuthSchemeRegistry</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.751">defaultAuthSchemeRegistry</a>(<a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/config/Lookup.html?is-external=true" title="class or interface in org.apache.http.config">Lookup</a><<a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/auth/AuthSchemeProvider.html?is-external=true" title="class or interface in org.apache.http.auth">AuthSchemeProvider</a>> authSchemeRegistry)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#defaultAuthSchemeRegistry-org.apache.http.config.Lookup-">RestClientBuilder</a></code></span></div> |
| <div class="block">Assigns default <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/auth/AuthScheme.html?is-external=true" title="class or interface in org.apache.http.auth"><code>AuthScheme</code></a> registry which will be used for request execution if not explicitly set in the client execution context.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#defaultAuthSchemeRegistry-org.apache.http.config.Lookup-">defaultAuthSchemeRegistry</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>authSchemeRegistry</code> - New property value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true#setDefaultAuthSchemeRegistry-org.apache.http.config.Lookup-" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder.setDefaultAuthSchemeRegistry(Lookup)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="defaultConnectionConfig-org.apache.http.config.ConnectionConfig-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>defaultConnectionConfig</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.757">defaultConnectionConfig</a>(<a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/config/ConnectionConfig.html?is-external=true" title="class or interface in org.apache.http.config">ConnectionConfig</a> config)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#defaultConnectionConfig-org.apache.http.config.ConnectionConfig-">RestClientBuilder</a></code></span></div> |
| <div class="block">Assigns default <a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/config/ConnectionConfig.html?is-external=true" title="class or interface in org.apache.http.config"><code>ConnectionConfig</code></a>. |
| |
| <ul class='notes'> |
| <li>This value can be overridden by the <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#connectionManager-org.apache.http.conn.HttpClientConnectionManager-"><code>RestClientBuilder.connectionManager(HttpClientConnectionManager)</code></a> method. |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#defaultConnectionConfig-org.apache.http.config.ConnectionConfig-">defaultConnectionConfig</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>config</code> - New property value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true#setDefaultConnectionConfig-org.apache.http.config.ConnectionConfig-" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder.setDefaultConnectionConfig(ConnectionConfig)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="defaultCookieSpecRegistry-org.apache.http.config.Lookup-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>defaultCookieSpecRegistry</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.763">defaultCookieSpecRegistry</a>(<a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/config/Lookup.html?is-external=true" title="class or interface in org.apache.http.config">Lookup</a><<a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/cookie/CookieSpecProvider.html?is-external=true" title="class or interface in org.apache.http.cookie">CookieSpecProvider</a>> cookieSpecRegistry)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#defaultCookieSpecRegistry-org.apache.http.config.Lookup-">RestClientBuilder</a></code></span></div> |
| <div class="block">Assigns default <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/cookie/CookieSpec.html?is-external=true" title="class or interface in org.apache.http.cookie"><code>CookieSpec</code></a> registry which will be used for request execution if not explicitly set in the client execution context.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#defaultCookieSpecRegistry-org.apache.http.config.Lookup-">defaultCookieSpecRegistry</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>cookieSpecRegistry</code> - New property value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true#setDefaultCookieSpecRegistry-org.apache.http.config.Lookup-" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder.setDefaultCookieSpecRegistry(Lookup)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="defaultCookieStore-org.apache.http.client.CookieStore-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>defaultCookieStore</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.769">defaultCookieStore</a>(<a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/CookieStore.html?is-external=true" title="class or interface in org.apache.http.client">CookieStore</a> cookieStore)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#defaultCookieStore-org.apache.http.client.CookieStore-">RestClientBuilder</a></code></span></div> |
| <div class="block">Assigns default <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/CookieStore.html?is-external=true" title="class or interface in org.apache.http.client"><code>CookieStore</code></a> instance which will be used for request execution if not explicitly set in the client execution context.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#defaultCookieStore-org.apache.http.client.CookieStore-">defaultCookieStore</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>cookieStore</code> - New property value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true#setDefaultCookieStore-org.apache.http.client.CookieStore-" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder.setDefaultCookieStore(CookieStore)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="defaultCredentialsProvider-org.apache.http.client.CredentialsProvider-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>defaultCredentialsProvider</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.775">defaultCredentialsProvider</a>(<a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/CredentialsProvider.html?is-external=true" title="class or interface in org.apache.http.client">CredentialsProvider</a> credentialsProvider)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#defaultCredentialsProvider-org.apache.http.client.CredentialsProvider-">RestClientBuilder</a></code></span></div> |
| <div class="block">Assigns default <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/CredentialsProvider.html?is-external=true" title="class or interface in org.apache.http.client"><code>CredentialsProvider</code></a> instance which will be used for request execution if not explicitly set in the client execution context.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#defaultCredentialsProvider-org.apache.http.client.CredentialsProvider-">defaultCredentialsProvider</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>credentialsProvider</code> - New property value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true#setDefaultCredentialsProvider-org.apache.http.client.CredentialsProvider-" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder.setDefaultCredentialsProvider(CredentialsProvider)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="defaultHeaders-java.util.Collection-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>defaultHeaders</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.781">defaultHeaders</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a><? extends <a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/Header.html?is-external=true" title="class or interface in org.apache.http">Header</a>> defaultHeaders)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#defaultHeaders-java.util.Collection-">RestClientBuilder</a></code></span></div> |
| <div class="block">Assigns default request header values. |
| |
| <ul class='notes'> |
| <li>This value can be overridden by the <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#httpProcessor-org.apache.http.protocol.HttpProcessor-"><code>RestClientBuilder.httpProcessor(HttpProcessor)</code></a> method. |
| <li><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#headers-java.lang.Object...-"><code>RestClientBuilder.headers(Object...)</code></a> is an equivalent method. |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#defaultHeaders-java.util.Collection-">defaultHeaders</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>defaultHeaders</code> - New property value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true#setDefaultHeaders-java.util.Collection-" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder.setDefaultHeaders(Collection)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="defaultRequestConfig-org.apache.http.client.config.RequestConfig-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>defaultRequestConfig</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.787">defaultRequestConfig</a>(<a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/config/RequestConfig.html?is-external=true" title="class or interface in org.apache.http.client.config">RequestConfig</a> config)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#defaultRequestConfig-org.apache.http.client.config.RequestConfig-">RestClientBuilder</a></code></span></div> |
| <div class="block">Assigns default <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/config/RequestConfig.html?is-external=true" title="class or interface in org.apache.http.client.config"><code>RequestConfig</code></a> instance which will be used for request execution if not explicitly set in the client execution context.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#defaultRequestConfig-org.apache.http.client.config.RequestConfig-">defaultRequestConfig</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>config</code> - New property value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true#setDefaultRequestConfig-org.apache.http.client.config.RequestConfig-" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder.setDefaultRequestConfig(RequestConfig)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="defaultSocketConfig-org.apache.http.config.SocketConfig-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>defaultSocketConfig</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.793">defaultSocketConfig</a>(<a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/config/SocketConfig.html?is-external=true" title="class or interface in org.apache.http.config">SocketConfig</a> config)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#defaultSocketConfig-org.apache.http.config.SocketConfig-">RestClientBuilder</a></code></span></div> |
| <div class="block">Assigns default <a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/config/SocketConfig.html?is-external=true" title="class or interface in org.apache.http.config"><code>SocketConfig</code></a>. |
| |
| <ul class='notes'> |
| <li>This value can be overridden by the <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#connectionManager-org.apache.http.conn.HttpClientConnectionManager-"><code>RestClientBuilder.connectionManager(HttpClientConnectionManager)</code></a> method. |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#defaultSocketConfig-org.apache.http.config.SocketConfig-">defaultSocketConfig</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>config</code> - New property value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true#setDefaultSocketConfig-org.apache.http.config.SocketConfig-" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder.setDefaultSocketConfig(SocketConfig)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="detectRecursions--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>detectRecursions</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.799">detectRecursions</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#detectRecursions--">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>BeanTraverse</l> configuration property: </i> Automatically detect POJO recursions. |
| |
| <p> |
| When enabled, specifies that recursions should be checked for during traversal. |
| |
| <p> |
| Recursions can occur when traversing models that aren't true trees but rather contain loops. |
| <br>In general, unchecked recursions cause stack-overflow-errors. |
| <br>These show up as <a href="../../../../../org/apache/juneau/BeanRecursionException.html" title="class in org.apache.juneau"><code>BeanRecursionException</code></a> with the message <js>"Depth too deep. Stack overflow occurred."</js>. |
| |
| <ul class='notes'> |
| <li> |
| Checking for recursion can cause a small performance penalty. |
| </ul> |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a JSON client that automatically checks for recursions.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .json() |
| .detectRecursions() |
| .build(); |
| |
| <jc>// Create a POJO model with a recursive loop.</jc> |
| <jk>public class</jk> A { |
| <jk>public</jk> Object <jf>f</jf>; |
| } |
| A <jv>a</jv> = <jk>new</jk> A(); |
| <jv>a</jv>.<jf>f</jf> = <jv>a</jv>; |
| |
| <jk>try</jk> { |
| <jc>// Throws a RestCallException with an inner SerializeException and not a StackOverflowError</jc> |
| <jv>client</jv> |
| .doPost(<js>"http://localhost:10000/foo"</js>, <jv>a</jv>) |
| .run(); |
| } <jk>catch</jk> (RestCallException <jv>e</jv>} { |
| <jc>// Handle exception.</jc> |
| } |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/BeanTraverseContext.html#BEANTRAVERSE_detectRecursions"><code>BeanTraverseContext.BEANTRAVERSE_detectRecursions</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#detectRecursions--">detectRecursions</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="disableAuthCaching--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>disableAuthCaching</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.805">disableAuthCaching</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#disableAuthCaching--">RestClientBuilder</a></code></span></div> |
| <div class="block">Disables authentication scheme caching. |
| |
| <ul class='notes'> |
| <li>This value can be overridden by the <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#httpProcessor-org.apache.http.protocol.HttpProcessor-"><code>RestClientBuilder.httpProcessor(HttpProcessor)</code></a> method. |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#disableAuthCaching--">disableAuthCaching</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true#disableAuthCaching--" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder.disableAuthCaching()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="disableAutomaticRetries--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>disableAutomaticRetries</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.811">disableAutomaticRetries</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#disableAutomaticRetries--">RestClientBuilder</a></code></span></div> |
| <div class="block">Disables automatic request recovery and re-execution.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#disableAutomaticRetries--">disableAutomaticRetries</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true#disableAutomaticRetries--" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder.disableAutomaticRetries()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="disableConnectionState--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>disableConnectionState</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.817">disableConnectionState</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#disableConnectionState--">RestClientBuilder</a></code></span></div> |
| <div class="block">Disables connection state tracking.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#disableConnectionState--">disableConnectionState</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true#disableConnectionState--" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder.disableConnectionState()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="disableContentCompression--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>disableContentCompression</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.823">disableContentCompression</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#disableContentCompression--">RestClientBuilder</a></code></span></div> |
| <div class="block">Disables automatic content decompression. |
| |
| <ul class='notes'> |
| <li>This value can be overridden by the <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#httpProcessor-org.apache.http.protocol.HttpProcessor-"><code>RestClientBuilder.httpProcessor(HttpProcessor)</code></a> method. |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#disableContentCompression--">disableContentCompression</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true#disableContentCompression--" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder.disableContentCompression()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="disableCookieManagement--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>disableCookieManagement</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.829">disableCookieManagement</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#disableCookieManagement--">RestClientBuilder</a></code></span></div> |
| <div class="block">Disables state (cookie) management. |
| |
| <ul class='notes'> |
| <li>This value can be overridden by the <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#httpProcessor-org.apache.http.protocol.HttpProcessor-"><code>RestClientBuilder.httpProcessor(HttpProcessor)</code></a> method. |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#disableCookieManagement--">disableCookieManagement</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true#disableCookieManagement--" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder.disableCookieManagement()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="disableRedirectHandling--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>disableRedirectHandling</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.835">disableRedirectHandling</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#disableRedirectHandling--">RestClientBuilder</a></code></span></div> |
| <div class="block">Disables automatic redirect handling.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#disableRedirectHandling--">disableRedirectHandling</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true#disableRedirectHandling--" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder.disableRedirectHandling()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="errorCodes-java.util.function.Predicate-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>errorCodes</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.841">errorCodes</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Predicate.html?is-external=true" title="class or interface in java.util.function">Predicate</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a>> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#errorCodes-java.util.function.Predicate-">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Errors codes predicate. |
| |
| <p> |
| Defines a predicate to test for error codes. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a client that considers any 300+ responses to be errors.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .errorCodes(<jv>x</jv> -> <jv>x</jv>>=300) |
| .build(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/rest/client2/RestClient.html#RESTCLIENT_errorCodes"><code>RestClient.RESTCLIENT_errorCodes</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#errorCodes-java.util.function.Predicate-">errorCodes</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new value for this setting. |
| <br>The default value is <code>x -> x >= 400</code>.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="evictExpiredConnections--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>evictExpiredConnections</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.847">evictExpiredConnections</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#evictExpiredConnections--">RestClientBuilder</a></code></span></div> |
| <div class="block">Makes this instance of <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/HttpClient.html?is-external=true" title="class or interface in org.apache.http.client"><code>HttpClient</code></a> proactively evict expired connections from the connection pool using a background thread. |
| |
| <ul class='notes'> |
| <li>One MUST explicitly close HttpClient with <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Closeable.html?is-external=true#close--" title="class or interface in java.io"><code>Closeable.close()</code></a> in order to stop and release the background thread. |
| <li>This method has no effect if the instance of <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/HttpClient.html?is-external=true" title="class or interface in org.apache.http.client"><code>HttpClient</code></a> is configured to use a shared connection manager. |
| <li>This method may not be used when the instance of <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/HttpClient.html?is-external=true" title="class or interface in org.apache.http.client"><code>HttpClient</code></a> is created inside an EJB container. |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#evictExpiredConnections--">evictExpiredConnections</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true#evictExpiredConnections--" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder.evictExpiredConnections()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="evictIdleConnections-long-java.util.concurrent.TimeUnit-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>evictIdleConnections</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.853">evictIdleConnections</a>(long maxIdleTime, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent">TimeUnit</a> maxIdleTimeUnit)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#evictIdleConnections-long-java.util.concurrent.TimeUnit-">RestClientBuilder</a></code></span></div> |
| <div class="block">Makes this instance of <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/HttpClient.html?is-external=true" title="class or interface in org.apache.http.client"><code>HttpClient</code></a> proactively evict idle connections from the connection pool using a background thread. |
| |
| <ul class='notes'> |
| <li>One MUST explicitly close HttpClient with <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Closeable.html?is-external=true#close--" title="class or interface in java.io"><code>Closeable.close()</code></a> in order to stop and release the background thread. |
| <li>This method has no effect if the instance of <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/HttpClient.html?is-external=true" title="class or interface in org.apache.http.client"><code>HttpClient</code></a> is configured to use a shared connection manager. |
| <li>This method may not be used when the instance of <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/HttpClient.html?is-external=true" title="class or interface in org.apache.http.client"><code>HttpClient</code></a> is created inside an EJB container. |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#evictIdleConnections-long-java.util.concurrent.TimeUnit-">evictIdleConnections</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>maxIdleTime</code> - New property value.</dd> |
| <dd><code>maxIdleTimeUnit</code> - New property value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true#evictIdleConnections-long-java.util.concurrent.TimeUnit-" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder.evictIdleConnections(long,TimeUnit)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="executorService-java.util.concurrent.ExecutorService-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>executorService</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.859">executorService</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutorService.html?is-external=true" title="class or interface in java.util.concurrent">ExecutorService</a> executorService, |
| boolean shutdownOnClose)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#executorService-java.util.concurrent.ExecutorService-boolean-">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Executor service. |
| |
| <p> |
| Defines the executor service to use when calling future methods on the <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html" title="class in org.apache.juneau.rest.client2"><code>RestRequest</code></a> class. |
| |
| <p> |
| This executor service is used to create <a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Future.html?is-external=true" title="class or interface in java.util.concurrent"><code>Future</code></a> objects on the following methods: |
| <ul> |
| <li class='jm'><a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#runFuture--"><code>RestRequest.runFuture()</code></a> |
| <li class='jm'><a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#completeFuture--"><code>RestRequest.completeFuture()</code></a> |
| <li class='jm'><a href="../../../../../org/apache/juneau/rest/client2/RestResponseBody.html#asFuture-java.lang.Class-"><code>RestResponseBody.asFuture(Class)</code></a> (and similar methods) |
| </ul> |
| |
| <p> |
| The default executor service is a single-threaded <a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ThreadPoolExecutor.html?is-external=true" title="class or interface in java.util.concurrent"><code>ThreadPoolExecutor</code></a> with a 30 second timeout |
| and a queue size of 10. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a client with a customized executor service.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .executorService(<jk>new</jk> ThreadPoolExecutor(1, 1, 30, TimeUnit.<jsf>SECONDS</jsf>, <jk>new</jk> ArrayBlockingQueue<Runnable>(10)), <jk>true</jk>) |
| .build(); |
| |
| <jc>// Use it to asynchronously run a request.</jc> |
| Future<RestResponse> <jv>responseFuture</jv> = <jv>client</jv>.get(<jsf>URI</jsf>).runFuture(); |
| |
| <jc>// Do some other stuff.</jc> |
| |
| <jc>// Now read the response.</jc> |
| String <jv>body</jv> = <jv>responseFuture</jv>.get().getBody().asString(); |
| |
| <jc>// Use it to asynchronously retrieve a response.</jc> |
| Future<MyBean> <jv>myBeanFuture</jv> = <jv>client</jv> |
| .get(<jsf>URI</jsf>) |
| .run() |
| .getBody().asFuture(MyBean.<jk>class</jk>); |
| |
| <jc>// Do some other stuff.</jc> |
| |
| <jc>// Now read the response.</jc> |
| MyBean <jv>bean</jv> = <jv>myBeanFuture</jv>.get(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/rest/client2/RestClient.html#RESTCLIENT_executorService"><code>RestClient.RESTCLIENT_executorService</code></a> |
| <li class='jf'><a href="../../../../../org/apache/juneau/rest/client2/RestClient.html#RESTCLIENT_executorServiceShutdownOnClose"><code>RestClient.RESTCLIENT_executorServiceShutdownOnClose</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#executorService-java.util.concurrent.ExecutorService-boolean-">executorService</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>executorService</code> - The executor service.</dd> |
| <dd><code>shutdownOnClose</code> - Call <a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutorService.html?is-external=true#shutdown--" title="class or interface in java.util.concurrent"><code>ExecutorService.shutdown()</code></a> when <a href="../../../../../org/apache/juneau/rest/client2/RestClient.html#close--"><code>RestClient.close()</code></a> is called.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="expect-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>expect</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.865">expect</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#expect-java.lang.Object-">RestClientBuilder</a></code></span></div> |
| <div class="block">Sets the value for the <c>Expect</c> request header on all requests. |
| |
| <p> |
| This is a shortcut for calling <code>header(<js>"Expect"</js>, value);</code></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#expect-java.lang.Object-">expect</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new header value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="formData-org.apache.http.NameValuePair-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>formData</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.871">formData</a>(<a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/NameValuePair.html?is-external=true" title="class or interface in org.apache.http">NameValuePair</a> pair)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#formData-org.apache.http.NameValuePair-">RestClientBuilder</a></code></span></div> |
| <div class="block">Adds a form-data parameter to all request bodies. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .formData(BasicNameValuePair.<jsm>of</jsm>(<js>"foo"</js>, <js>"bar"</js>)) |
| .build(); |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#formData-org.apache.http.NameValuePair-">formData</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>pair</code> - The form data parameter.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="formData-java.lang.String-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>formData</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.877">formData</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#formData-java.lang.String-java.lang.Object-">RestClientBuilder</a></code></span></div> |
| <div class="block">Adds a form-data parameter to all request bodies. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .formData(<js>"foo"</js>, <js>"bar"</js>) |
| .build(); |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#formData-java.lang.String-java.lang.Object-">formData</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - The parameter name.</dd> |
| <dd><code>value</code> - The parameter value. |
| <ul> |
| <li>Can be any POJO. |
| <li>Converted to a string using the specified part serializer. |
| </ul></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="formData-java.lang.String-java.util.function.Supplier-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>formData</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.883">formData</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function">Supplier</a><?> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#formData-java.lang.String-java.util.function.Supplier-">RestClientBuilder</a></code></span></div> |
| <div class="block">Adds a form-data parameter with a dynamic value to all request bodies. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .formData(<js>"foo"</js>, ()-><js>"bar"</js>) |
| .build(); |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#formData-java.lang.String-java.util.function.Supplier-">formData</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - The parameter name.</dd> |
| <dd><code>value</code> - The parameter value supplier. |
| <ul> |
| <li>Can be any POJO. |
| <li>Converted to a string using the specified part serializer. |
| </ul></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="formData-java.lang.String-java.lang.Object-org.apache.juneau.httppart.HttpPartSchema-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>formData</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.889">formData</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value, |
| <a href="../../../../../org/apache/juneau/httppart/HttpPartSchema.html" title="class in org.apache.juneau.httppart">HttpPartSchema</a> schema)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#formData-java.lang.String-java.lang.Object-org.apache.juneau.httppart.HttpPartSchema-">RestClientBuilder</a></code></span></div> |
| <div class="block">Adds a form-data parameter to all request bodies. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| String[] <jv>value</jv> = {<js>"foo"</js>,<js>"bar"</js>}; |
| |
| <jc>// Adds form data parameter "foo=foo|bar" to all requests.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .formData(<js>"foo"</js>, <jv>value</jv>, HttpPartSchema.<jsf>T_ARRAY_PIPES</jsf>); |
| .build(); |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#formData-java.lang.String-java.lang.Object-org.apache.juneau.httppart.HttpPartSchema-">formData</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - The parameter name.</dd> |
| <dd><code>value</code> - The parameter value. |
| <ul> |
| <li>Can be any POJO. |
| <li>Converted to a string using the specified part serializer. |
| </ul></dd> |
| <dd><code>schema</code> - The schema object that defines the format of the output. |
| <ul> |
| <li>If <jk>null</jk>, defaults to <a href="../../../../../org/apache/juneau/httppart/HttpPartSchema.html#DEFAULT"><code>HttpPartSchema.DEFAULT</code></a>. |
| <li>Only used if serializer is schema-aware (e.g. <a href="../../../../../org/apache/juneau/oapi/OpenApiSerializer.html" title="class in org.apache.juneau.oapi"><code>OpenApiSerializer</code></a>). |
| </ul></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="formData-java.lang.String-java.util.function.Supplier-org.apache.juneau.httppart.HttpPartSchema-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>formData</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.895">formData</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function">Supplier</a><?> value, |
| <a href="../../../../../org/apache/juneau/httppart/HttpPartSchema.html" title="class in org.apache.juneau.httppart">HttpPartSchema</a> schema)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#formData-java.lang.String-java.util.function.Supplier-org.apache.juneau.httppart.HttpPartSchema-">RestClientBuilder</a></code></span></div> |
| <div class="block">Adds a form-data parameter with a dynamic value to all request bodies. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| String[] <jv>value</jv> = {<js>"foo"</js>,<js>"bar"</js>}; |
| |
| <jc>// Adds form data parameter "foo=foo|bar" to all requests.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .formData(<js>"foo"</js>, ()-><jv>value</jv>, HttpPartSchema.<jsf>T_ARRAY_PIPES</jsf>); |
| .build(); |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#formData-java.lang.String-java.util.function.Supplier-org.apache.juneau.httppart.HttpPartSchema-">formData</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - The parameter name.</dd> |
| <dd><code>value</code> - The parameter value supplier. |
| <ul> |
| <li>Can be any POJO. |
| <li>Converted to a string using the specified part serializer. |
| </ul></dd> |
| <dd><code>schema</code> - The schema object that defines the format of the output. |
| <ul> |
| <li>If <jk>null</jk>, defaults to <a href="../../../../../org/apache/juneau/httppart/HttpPartSchema.html#DEFAULT"><code>HttpPartSchema.DEFAULT</code></a>. |
| <li>Only used if serializer is schema-aware (e.g. <a href="../../../../../org/apache/juneau/oapi/OpenApiSerializer.html" title="class in org.apache.juneau.oapi"><code>OpenApiSerializer</code></a>). |
| </ul></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="formData-java.lang.String-java.lang.Object-org.apache.juneau.httppart.HttpPartSchema-org.apache.juneau.httppart.HttpPartSerializer-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>formData</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.901">formData</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value, |
| <a href="../../../../../org/apache/juneau/httppart/HttpPartSchema.html" title="class in org.apache.juneau.httppart">HttpPartSchema</a> schema, |
| <a href="../../../../../org/apache/juneau/httppart/HttpPartSerializer.html" title="interface in org.apache.juneau.httppart">HttpPartSerializer</a> serializer)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#formData-java.lang.String-java.lang.Object-org.apache.juneau.httppart.HttpPartSchema-org.apache.juneau.httppart.HttpPartSerializer-">RestClientBuilder</a></code></span></div> |
| <div class="block">Adds a form-data parameter to all request bodies. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| String[] <jv>value</jv> = {<js>"foo"</js>,<js>"bar"</js>}; |
| |
| <jc>// Adds form data parameter "foo=foo|bar" to all requests.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .formData(<js>"foo"</js>, <jv>value</jv>, HttpPartSchema.<jsf>T_ARRAY_PIPES</jsf>, <jv>myPartSerializer</jv>); |
| .build(); |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#formData-java.lang.String-java.lang.Object-org.apache.juneau.httppart.HttpPartSchema-org.apache.juneau.httppart.HttpPartSerializer-">formData</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - The parameter name.</dd> |
| <dd><code>value</code> - The parameter value. |
| <ul> |
| <li>Can be any POJO. |
| <li>Converted to a string using the specified part serializer. |
| </ul></dd> |
| <dd><code>schema</code> - The schema object that defines the format of the output. |
| <ul> |
| <li>If <jk>null</jk>, defaults to <a href="../../../../../org/apache/juneau/httppart/HttpPartSchema.html#DEFAULT"><code>HttpPartSchema.DEFAULT</code></a>. |
| <li>Only used if serializer is schema-aware (e.g. <a href="../../../../../org/apache/juneau/oapi/OpenApiSerializer.html" title="class in org.apache.juneau.oapi"><code>OpenApiSerializer</code></a>). |
| </ul></dd> |
| <dd><code>serializer</code> - The serializer to use for serializing the value to a string. |
| <ul> |
| <li>If <jk>null</jk>, then the <a href="../../../../../org/apache/juneau/httppart/HttpPartSerializer.html" title="interface in org.apache.juneau.httppart"><code>HttpPartSerializer</code></a> defined on the client is used (<a href="../../../../../org/apache/juneau/oapi/OpenApiSerializer.html" title="class in org.apache.juneau.oapi"><code>OpenApiSerializer</code></a> by default). |
| </ul></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="formData-java.lang.String-java.util.function.Supplier-org.apache.juneau.httppart.HttpPartSchema-org.apache.juneau.httppart.HttpPartSerializer-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>formData</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.907">formData</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function">Supplier</a><?> value, |
| <a href="../../../../../org/apache/juneau/httppart/HttpPartSchema.html" title="class in org.apache.juneau.httppart">HttpPartSchema</a> schema, |
| <a href="../../../../../org/apache/juneau/httppart/HttpPartSerializer.html" title="interface in org.apache.juneau.httppart">HttpPartSerializer</a> serializer)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#formData-java.lang.String-java.util.function.Supplier-org.apache.juneau.httppart.HttpPartSchema-org.apache.juneau.httppart.HttpPartSerializer-">RestClientBuilder</a></code></span></div> |
| <div class="block">Adds a form-data parameter with a dynamic value to all request bodies. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| String[] <jv>value</jv> = {<js>"foo"</js>,<js>"bar"</js>}; |
| |
| <jc>// Adds form data parameter "foo=foo|bar" to all requests.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .formData(<js>"foo"</js>, ()-><jv>value</jv>, HttpPartSchema.<jsf>T_ARRAY_PIPES</jsf>, <jv>myPartSerializer</jv>); |
| .build(); |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#formData-java.lang.String-java.util.function.Supplier-org.apache.juneau.httppart.HttpPartSchema-org.apache.juneau.httppart.HttpPartSerializer-">formData</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - The parameter name.</dd> |
| <dd><code>value</code> - The parameter value supplier. |
| <ul> |
| <li>Can be any POJO. |
| <li>Converted to a string using the specified part serializer. |
| </ul></dd> |
| <dd><code>schema</code> - The schema object that defines the format of the output. |
| <ul> |
| <li>If <jk>null</jk>, defaults to <a href="../../../../../org/apache/juneau/httppart/HttpPartSchema.html#DEFAULT"><code>HttpPartSchema.DEFAULT</code></a>. |
| <li>Only used if serializer is schema-aware (e.g. <a href="../../../../../org/apache/juneau/oapi/OpenApiSerializer.html" title="class in org.apache.juneau.oapi"><code>OpenApiSerializer</code></a>). |
| </ul></dd> |
| <dd><code>serializer</code> - The serializer to use for serializing the value to a string. |
| <ul> |
| <li>If <jk>null</jk>, then the <a href="../../../../../org/apache/juneau/httppart/HttpPartSerializer.html" title="interface in org.apache.juneau.httppart"><code>HttpPartSerializer</code></a> defined on the client is used (<a href="../../../../../org/apache/juneau/oapi/OpenApiSerializer.html" title="class in org.apache.juneau.oapi"><code>OpenApiSerializer</code></a> by default). |
| </ul></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="formDataPairs-java.lang.Object...-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>formDataPairs</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.913">formDataPairs</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>... pairs)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#formDataPairs-java.lang.Object...-">RestClientBuilder</a></code></span></div> |
| <div class="block">Adds form-data parameters to all request bodies using free-form key/value pairs. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .formDataPairs(<js>"key1"</js>,<js>"val1"</js>,<js>"key2"</js>,<js>"val2"</js>) |
| .build(); |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#formDataPairs-java.lang.Object...-">formDataPairs</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>pairs</code> - The form-data key/value pairs. |
| <ul> |
| <li>Values can be any POJO. |
| <li>Values converted to a string using the configured part serializer. |
| </ul></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="formDatas-java.lang.Object...-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>formDatas</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.919">formDatas</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>... params)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#formDatas-java.lang.Object...-">RestClientBuilder</a></code></span></div> |
| <div class="block">Adds a form-data parameter to all request bodies. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .formData(BasicNameValuePair.<jsm>of</jsm>(<js>"foo"</js>, <js>"bar"</js>)) |
| .build(); |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#formDatas-java.lang.Object...-">formDatas</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>params</code> - The form-data parameters. |
| <br>Can be any of the following types: |
| <ul> |
| <li><a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/NameValuePair.html?is-external=true" title="class or interface in org.apache.http"><code>NameValuePair</code></a> |
| <li><a href="../../../../../org/apache/juneau/http/NameValuePairable.html" title="interface in org.apache.juneau.http"><code>NameValuePairable</code></a> |
| <li><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.Entry.html?is-external=true" title="class or interface in java.util"><code>Map.Entry</code></a> |
| <li><a href="../../../../../org/apache/juneau/http/NameValuePairSupplier.html" title="class in org.apache.juneau.http"><code>NameValuePairSupplier</code></a> |
| <li><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><code>Map</code></a> |
| <ul> |
| <li>Values can be any POJO. |
| <li>Values converted to a string using the configured part serializer. |
| </ul> |
| <li>A collection or array of anything on this list. |
| </ul></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="forwarded-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>forwarded</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.925">forwarded</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#forwarded-java.lang.Object-">RestClientBuilder</a></code></span></div> |
| <div class="block">Sets the value for the <c>Forwarded</c> request header on all requests. |
| |
| <p> |
| This is a shortcut for calling <code>header(<js>"Forwarded"</js>, value);</code></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#forwarded-java.lang.Object-">forwarded</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new header value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="from-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>from</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.931">from</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#from-java.lang.Object-">RestClientBuilder</a></code></span></div> |
| <div class="block">Sets the value for the <c>From</c> request header on all requests. |
| |
| <p> |
| This is a shortcut for calling <code>header(<js>"From"</js>, value);</code></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#from-java.lang.Object-">from</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new header value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="header-org.apache.http.Header-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>header</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.937">header</a>(<a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/Header.html?is-external=true" title="class or interface in org.apache.http">Header</a> header)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#header-org.apache.http.Header-">RestClientBuilder</a></code></span></div> |
| <div class="block">Sets a header on all requests. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .header(BasicHeader.<jsm>of</jsm>(<js>"Foo"</js>, <js>"bar"</js>)) |
| .build(); |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#header-org.apache.http.Header-">header</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>header</code> - The header to set.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="header-java.lang.String-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>header</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.943">header</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#header-java.lang.String-java.lang.Object-">RestClientBuilder</a></code></span></div> |
| <div class="block">Sets a header on all requests. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .header(<js>"Foo"</js>, <js>"bar"</js>); |
| .build(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/rest/client2/RestClient.html#RESTCLIENT_headers"><code>RestClient.RESTCLIENT_headers</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#header-java.lang.String-java.lang.Object-">header</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - The header name.</dd> |
| <dd><code>value</code> - The header value. |
| <ul> |
| <li>Can be any POJO. |
| <li>Converted to a string using the specified part serializer. |
| </ul></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="header-java.lang.String-java.util.function.Supplier-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>header</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.949">header</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function">Supplier</a><?> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#header-java.lang.String-java.util.function.Supplier-">RestClientBuilder</a></code></span></div> |
| <div class="block">Sets a header with a dynamic value on all requests. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .header(<js>"Foo"</js>, ()-><js>"bar"</js>); |
| .build(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/rest/client2/RestClient.html#RESTCLIENT_headers"><code>RestClient.RESTCLIENT_headers</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#header-java.lang.String-java.util.function.Supplier-">header</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - The header name.</dd> |
| <dd><code>value</code> - The header value supplier. |
| <ul> |
| <li>Can be any POJO. |
| <li>Converted to a string using the specified part serializer. |
| </ul></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="header-java.lang.String-java.lang.Object-org.apache.juneau.httppart.HttpPartSchema-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>header</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.955">header</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value, |
| <a href="../../../../../org/apache/juneau/httppart/HttpPartSchema.html" title="class in org.apache.juneau.httppart">HttpPartSchema</a> schema)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#header-java.lang.String-java.lang.Object-org.apache.juneau.httppart.HttpPartSchema-">RestClientBuilder</a></code></span></div> |
| <div class="block">Sets a header on all requests. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| String[] <jv>value</jv> = {<js>"foo"</js>,<js>"bar"</js>}; |
| |
| <jc>// Adds header "Foo: foo|bar" to all requests.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .header(<js>"Foo"</js>, <jv>value</jv>, HttpPartSchema.<jsf>T_ARRAY_PIPES</jsf>); |
| .build(); |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#header-java.lang.String-java.lang.Object-org.apache.juneau.httppart.HttpPartSchema-">header</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - The header name.</dd> |
| <dd><code>value</code> - The header value. |
| <ul> |
| <li>Can be any POJO. |
| <li>Converted to a string using the specified part serializer. |
| </ul></dd> |
| <dd><code>schema</code> - The schema object that defines the format of the output. |
| <ul> |
| <li>If <jk>null</jk>, defaults to <a href="../../../../../org/apache/juneau/httppart/HttpPartSchema.html#DEFAULT"><code>HttpPartSchema.DEFAULT</code></a>. |
| <li>Only used if serializer is schema-aware (e.g. <a href="../../../../../org/apache/juneau/oapi/OpenApiSerializer.html" title="class in org.apache.juneau.oapi"><code>OpenApiSerializer</code></a>). |
| </ul></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="header-java.lang.String-java.util.function.Supplier-org.apache.juneau.httppart.HttpPartSchema-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>header</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.961">header</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function">Supplier</a><?> value, |
| <a href="../../../../../org/apache/juneau/httppart/HttpPartSchema.html" title="class in org.apache.juneau.httppart">HttpPartSchema</a> schema)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#header-java.lang.String-java.util.function.Supplier-org.apache.juneau.httppart.HttpPartSchema-">RestClientBuilder</a></code></span></div> |
| <div class="block">Sets a header with a dynamic value on all requests. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| String[] <jv>value</jv> = {<js>"foo"</js>,<js>"bar"</js>}; |
| |
| <jc>// Adds header "Foo: foo|bar" to all requests.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .header(<js>"Foo"</js>, ()-><jv>value</jv>, HttpPartSchema.<jsf>T_ARRAY_PIPES</jsf>); |
| .build(); |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#header-java.lang.String-java.util.function.Supplier-org.apache.juneau.httppart.HttpPartSchema-">header</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - The header name.</dd> |
| <dd><code>value</code> - The header value supplier. |
| <ul> |
| <li>Can be any POJO. |
| <li>Converted to a string using the specified part serializer. |
| </ul></dd> |
| <dd><code>schema</code> - The schema object that defines the format of the output. |
| <ul> |
| <li>If <jk>null</jk>, defaults to <a href="../../../../../org/apache/juneau/httppart/HttpPartSchema.html#DEFAULT"><code>HttpPartSchema.DEFAULT</code></a>. |
| <li>Only used if serializer is schema-aware (e.g. <a href="../../../../../org/apache/juneau/oapi/OpenApiSerializer.html" title="class in org.apache.juneau.oapi"><code>OpenApiSerializer</code></a>). |
| </ul></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="header-java.lang.String-java.lang.Object-org.apache.juneau.httppart.HttpPartSchema-org.apache.juneau.httppart.HttpPartSerializer-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>header</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.967">header</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value, |
| <a href="../../../../../org/apache/juneau/httppart/HttpPartSchema.html" title="class in org.apache.juneau.httppart">HttpPartSchema</a> schema, |
| <a href="../../../../../org/apache/juneau/httppart/HttpPartSerializer.html" title="interface in org.apache.juneau.httppart">HttpPartSerializer</a> serializer)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#header-java.lang.String-java.lang.Object-org.apache.juneau.httppart.HttpPartSchema-org.apache.juneau.httppart.HttpPartSerializer-">RestClientBuilder</a></code></span></div> |
| <div class="block">Sets a header on all requests. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| String[] <jv>value</jv> = {<js>"foo"</js>,<js>"bar"</js>}; |
| |
| <jc>// Adds header "Foo: foo|bar" to all requests.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .header(<js>"Foo"</js>, <jv>value</jv>, HttpPartSchema.<jsf>T_ARRAY_PIPES</jsf>, <jv>myPartSerializer</jv>); |
| .build(); |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#header-java.lang.String-java.lang.Object-org.apache.juneau.httppart.HttpPartSchema-org.apache.juneau.httppart.HttpPartSerializer-">header</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - The header name.</dd> |
| <dd><code>value</code> - The header value. |
| <ul> |
| <li>Can be any POJO. |
| <li>Converted to a string using the specified part serializer. |
| </ul></dd> |
| <dd><code>schema</code> - The schema object that defines the format of the output. |
| <ul> |
| <li>If <jk>null</jk>, defaults to <a href="../../../../../org/apache/juneau/httppart/HttpPartSchema.html#DEFAULT"><code>HttpPartSchema.DEFAULT</code></a>. |
| <li>Only used if serializer is schema-aware (e.g. <a href="../../../../../org/apache/juneau/oapi/OpenApiSerializer.html" title="class in org.apache.juneau.oapi"><code>OpenApiSerializer</code></a>). |
| </ul></dd> |
| <dd><code>serializer</code> - The serializer to use for serializing the value to a string. |
| <ul> |
| <li>If <jk>null</jk>, then the <a href="../../../../../org/apache/juneau/httppart/HttpPartSerializer.html" title="interface in org.apache.juneau.httppart"><code>HttpPartSerializer</code></a> defined on the client is used (<a href="../../../../../org/apache/juneau/oapi/OpenApiSerializer.html" title="class in org.apache.juneau.oapi"><code>OpenApiSerializer</code></a> by default). |
| </ul></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="header-java.lang.String-java.util.function.Supplier-org.apache.juneau.httppart.HttpPartSchema-org.apache.juneau.httppart.HttpPartSerializer-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>header</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.973">header</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function">Supplier</a><?> value, |
| <a href="../../../../../org/apache/juneau/httppart/HttpPartSchema.html" title="class in org.apache.juneau.httppart">HttpPartSchema</a> schema, |
| <a href="../../../../../org/apache/juneau/httppart/HttpPartSerializer.html" title="interface in org.apache.juneau.httppart">HttpPartSerializer</a> serializer)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#header-java.lang.String-java.util.function.Supplier-org.apache.juneau.httppart.HttpPartSchema-org.apache.juneau.httppart.HttpPartSerializer-">RestClientBuilder</a></code></span></div> |
| <div class="block">Sets a header with a dynamic value on all requests. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| String[] <jv>value</jv> = {<js>"foo"</js>,<js>"bar"</js>}; |
| |
| <jc>// Adds header "Foo: foo|bar" to all requests.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .header(<js>"Foo"</js>, ()-><jv>value</jv>, HttpPartSchema.<jsf>T_ARRAY_PIPES</jsf>, <jv>myPartSerializer</jv>); |
| .build(); |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#header-java.lang.String-java.util.function.Supplier-org.apache.juneau.httppart.HttpPartSchema-org.apache.juneau.httppart.HttpPartSerializer-">header</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - The header name.</dd> |
| <dd><code>value</code> - The header value supplier. |
| <ul> |
| <li>Can be any POJO. |
| <li>Converted to a string using the specified part serializer. |
| </ul></dd> |
| <dd><code>schema</code> - The schema object that defines the format of the output. |
| <ul> |
| <li>If <jk>null</jk>, defaults to <a href="../../../../../org/apache/juneau/httppart/HttpPartSchema.html#DEFAULT"><code>HttpPartSchema.DEFAULT</code></a>. |
| <li>Only used if serializer is schema-aware (e.g. <a href="../../../../../org/apache/juneau/oapi/OpenApiSerializer.html" title="class in org.apache.juneau.oapi"><code>OpenApiSerializer</code></a>). |
| </ul></dd> |
| <dd><code>serializer</code> - The serializer to use for serializing the value to a string. |
| <ul> |
| <li>If <jk>null</jk>, then the <a href="../../../../../org/apache/juneau/httppart/HttpPartSerializer.html" title="interface in org.apache.juneau.httppart"><code>HttpPartSerializer</code></a> defined on the client is used (<a href="../../../../../org/apache/juneau/oapi/OpenApiSerializer.html" title="class in org.apache.juneau.oapi"><code>OpenApiSerializer</code></a> by default). |
| </ul></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="headerPairs-java.lang.Object...-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>headerPairs</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.979">headerPairs</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>... pairs)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#headerPairs-java.lang.Object...-">RestClientBuilder</a></code></span></div> |
| <div class="block">Sets multiple headers on all requests using freeform key/value pairs. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .headerPairs(<js>"Header1"</js>,<js>"val1"</js>,<js>"Header2"</js>,<js>"val2"</js>) |
| .build(); |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#headerPairs-java.lang.Object...-">headerPairs</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>pairs</code> - The header key/value pairs. |
| <ul> |
| <li>Values can be any POJO. |
| <li>Values converted to a string using the configured part serializer. |
| </ul></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="headers-java.lang.Object...-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>headers</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.985">headers</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>... headers)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#headers-java.lang.Object...-">RestClientBuilder</a></code></span></div> |
| <div class="block">Sets multiple headers on all requests. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .headers(BasicHeader.<jsm>of</jsm>(<js>"Foo"</js>, <js>"bar"</js>)) |
| .build(); |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#headers-java.lang.Object...-">headers</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>headers</code> - The header to set. |
| <br>Can be any of the following types: |
| <ul> |
| <li><a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/Header.html?is-external=true" title="class or interface in org.apache.http"><code>Header</code></a> (including any subclasses such as <a href="../../../../../org/apache/juneau/http/header/Accept.html" title="class in org.apache.juneau.http.header"><code>Accept</code></a>) |
| <li><a href="../../../../../org/apache/juneau/http/Headerable.html" title="interface in org.apache.juneau.http"><code>Headerable</code></a> |
| <li><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.Entry.html?is-external=true" title="class or interface in java.util"><code>Map.Entry</code></a> |
| <li><a href="../../../../../org/apache/juneau/http/HeaderSupplier.html" title="class in org.apache.juneau.http"><code>HeaderSupplier</code></a> |
| <li><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><code>Map</code></a> |
| <ul> |
| <li>Values can be any POJO. |
| <li>Values converted to a string using the configured part serializer. |
| </ul> |
| <li>A collection or array of anything on this list. |
| </ul></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="host-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>host</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.991">host</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#host-java.lang.Object-">RestClientBuilder</a></code></span></div> |
| <div class="block">Sets the value for the <c>Host</c> request header on all requests. |
| |
| <p> |
| This is a shortcut for calling <code>header(<js>"Host"</js>, value);</code></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#host-java.lang.Object-">host</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new header value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="html--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>html</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.997">html</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#html--">RestClientBuilder</a></code></span></div> |
| <div class="block">Convenience method for specifying HTML as the marshalling transmission media type. |
| |
| <p> |
| POJOs are converted to HTML without any sort of doc wrappers. |
| |
| <p> |
| <a href="../../../../../org/apache/juneau/html/HtmlSerializer.html" title="class in org.apache.juneau.html"><code>HtmlSerializer</code></a> will be used to serialize POJOs to request bodies unless overridden per request via <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#serializer-org.apache.juneau.serializer.Serializer-"><code>RestRequest.serializer(Serializer)</code></a>. |
| <ul> |
| <li>The serializer can be configured using any of the serializer property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#sortCollections--"><code>RestClientBuilder.sortCollections()</code></a>), |
| bean context property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#swaps-java.lang.Object...-"><code>RestClientBuilder.swaps(Object...)</code></a>), or generic property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#set-java.lang.String-java.lang.Object-"><code>RestClientBuilder.set(String, Object)</code></a>) defined on this builder class. |
| </ul> |
| <p> |
| <a href="../../../../../org/apache/juneau/html/HtmlParser.html" title="class in org.apache.juneau.html"><code>HtmlParser</code></a> will be used to parse POJOs from response bodies unless overridden per request via <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#parser-org.apache.juneau.parser.Parser-"><code>RestRequest.parser(Parser)</code></a>. |
| <ul> |
| <li>The parser can be configured using any of the parser property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#strict--"><code>RestClientBuilder.strict()</code></a>), |
| bean context property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#swaps-java.lang.Object...-"><code>RestClientBuilder.swaps(Object...)</code></a>), or generic property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#set-java.lang.String-java.lang.Object-"><code>RestClientBuilder.set(String, Object)</code></a>) defined on this builder class. |
| </ul> |
| <p> |
| <c>Accept</c> request header will be set to <js>"text/html"</js> unless overridden |
| by <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#header-java.lang.String-java.lang.Object-"><code>RestClientBuilder.header(String,Object)</code></a> or <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#accept-java.lang.Object-"><code>RestClientBuilder.accept(Object)</code></a>, or per-request via <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#header-java.lang.String-java.lang.Object-"><code>RestRequest.header(String,Object)</code></a> or <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#accept-java.lang.Object-"><code>RestRequest.accept(Object)</code></a>. |
| <p> |
| <c>Content-Type</c> request header will be set to <js>"text/html"</js> unless overridden |
| by <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#header-java.lang.String-java.lang.Object-"><code>RestClientBuilder.header(String,Object)</code></a> or <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#contentType-java.lang.Object-"><code>RestClientBuilder.contentType(Object)</code></a>, or per-request via <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#header-java.lang.String-java.lang.Object-"><code>RestRequest.header(String,Object)</code></a> or <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#contentType-java.lang.Object-"><code>RestRequest.contentType(Object)</code></a>. |
| <p> |
| Can be combined with other marshaller setters such as <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#json--"><code>RestClientBuilder.json()</code></a> to provide support for multiple languages. |
| <ul> |
| <li>When multiple languages are supported, the <c>Accept</c> and <c>Content-Type</c> headers control which marshallers are used, or uses the |
| last-enabled language if the headers are not set. |
| </ul> |
| <p> |
| Identical to calling <c>serializer(HtmlSerializer.<jk>class</jk>).parser(HtmlParser.<jk>class</jk>)</c>. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Construct a client that uses HTML marshalling.</jc> |
| RestClient <jv>client</jv> = RestClient.<jsm>create</jsm>().html().build(); |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#html--">html</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="htmlDoc--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>htmlDoc</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1003">htmlDoc</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#htmlDoc--">RestClientBuilder</a></code></span></div> |
| <div class="block">Convenience method for specifying HTML DOC as the marshalling transmission media type. |
| |
| <p> |
| POJOs are converted to fully renderable HTML pages. |
| |
| <p> |
| <a href="../../../../../org/apache/juneau/html/HtmlDocSerializer.html" title="class in org.apache.juneau.html"><code>HtmlDocSerializer</code></a> will be used to serialize POJOs to request bodies unless overridden per request via <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#serializer-org.apache.juneau.serializer.Serializer-"><code>RestRequest.serializer(Serializer)</code></a>. |
| <ul> |
| <li>The serializer can be configured using any of the serializer property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#sortCollections--"><code>RestClientBuilder.sortCollections()</code></a>), |
| bean context property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#swaps-java.lang.Object...-"><code>RestClientBuilder.swaps(Object...)</code></a>), or generic property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#set-java.lang.String-java.lang.Object-"><code>RestClientBuilder.set(String, Object)</code></a>) defined on this builder class. |
| </ul> |
| <p> |
| <a href="../../../../../org/apache/juneau/html/HtmlParser.html" title="class in org.apache.juneau.html"><code>HtmlParser</code></a> will be used to parse POJOs from response bodies unless overridden per request via <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#parser-org.apache.juneau.parser.Parser-"><code>RestRequest.parser(Parser)</code></a>. |
| <ul> |
| <li>The parser can be configured using any of the parser property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#strict--"><code>RestClientBuilder.strict()</code></a>), |
| bean context property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#swaps-java.lang.Object...-"><code>RestClientBuilder.swaps(Object...)</code></a>), or generic property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#set-java.lang.String-java.lang.Object-"><code>RestClientBuilder.set(String, Object)</code></a>) defined on this builder class. |
| </ul> |
| <p> |
| <c>Accept</c> request header will be set to <js>"text/html"</js> unless overridden |
| by <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#header-java.lang.String-java.lang.Object-"><code>RestClientBuilder.header(String,Object)</code></a> or <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#accept-java.lang.Object-"><code>RestClientBuilder.accept(Object)</code></a>, or per-request via <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#header-java.lang.String-java.lang.Object-"><code>RestRequest.header(String,Object)</code></a> or <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#accept-java.lang.Object-"><code>RestRequest.accept(Object)</code></a>. |
| <p> |
| <c>Content-Type</c> request header will be set to <js>"text/html"</js> unless overridden |
| by <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#header-java.lang.String-java.lang.Object-"><code>RestClientBuilder.header(String,Object)</code></a> or <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#contentType-java.lang.Object-"><code>RestClientBuilder.contentType(Object)</code></a>, or per-request via <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#header-java.lang.String-java.lang.Object-"><code>RestRequest.header(String,Object)</code></a> or <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#contentType-java.lang.Object-"><code>RestRequest.contentType(Object)</code></a>. |
| <p> |
| Can be combined with other marshaller setters such as <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#json--"><code>RestClientBuilder.json()</code></a> to provide support for multiple languages. |
| <ul> |
| <li>When multiple languages are supported, the <c>Accept</c> and <c>Content-Type</c> headers control which marshallers are used, or uses the |
| last-enabled language if the headers are not set. |
| </ul> |
| <p> |
| Identical to calling <c>serializer(HtmlDocSerializer.<jk>class</jk>).parser(HtmlParser.<jk>class</jk>)</c>. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Construct a client that uses HTML Doc marshalling.</jc> |
| RestClient <jv>client</jv> = RestClient.<jsm>create</jsm>().htmlDoc().build(); |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#htmlDoc--">htmlDoc</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="htmlStrippedDoc--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>htmlStrippedDoc</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1009">htmlStrippedDoc</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#htmlStrippedDoc--">RestClientBuilder</a></code></span></div> |
| <div class="block">Convenience method for specifying Stripped HTML DOC as the marshalling transmission media type. |
| |
| <p> |
| Same as <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#htmlDoc--"><code>RestClientBuilder.htmlDoc()</code></a> but without the header and body tags and page title and description. |
| |
| <p> |
| <a href="../../../../../org/apache/juneau/html/HtmlStrippedDocSerializer.html" title="class in org.apache.juneau.html"><code>HtmlStrippedDocSerializer</code></a> will be used to serialize POJOs to request bodies unless overridden per request via <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#serializer-org.apache.juneau.serializer.Serializer-"><code>RestRequest.serializer(Serializer)</code></a>. |
| <ul> |
| <li>The serializer can be configured using any of the serializer property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#sortCollections--"><code>RestClientBuilder.sortCollections()</code></a>), |
| bean context property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#swaps-java.lang.Object...-"><code>RestClientBuilder.swaps(Object...)</code></a>), or generic property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#set-java.lang.String-java.lang.Object-"><code>RestClientBuilder.set(String, Object)</code></a>) defined on this builder class. |
| </ul> |
| <p> |
| <a href="../../../../../org/apache/juneau/html/HtmlParser.html" title="class in org.apache.juneau.html"><code>HtmlParser</code></a> will be used to parse POJOs from response bodies unless overridden per request via <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#parser-org.apache.juneau.parser.Parser-"><code>RestRequest.parser(Parser)</code></a>. |
| <ul> |
| <li>The parser can be configured using any of the parser property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#strict--"><code>RestClientBuilder.strict()</code></a>), |
| bean context property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#swaps-java.lang.Object...-"><code>RestClientBuilder.swaps(Object...)</code></a>), or generic property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#set-java.lang.String-java.lang.Object-"><code>RestClientBuilder.set(String, Object)</code></a>) defined on this builder class. |
| </ul> |
| <p> |
| <c>Accept</c> request header will be set to <js>"text/html+stripped"</js> unless overridden |
| by <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#header-java.lang.String-java.lang.Object-"><code>RestClientBuilder.header(String,Object)</code></a> or <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#accept-java.lang.Object-"><code>RestClientBuilder.accept(Object)</code></a>, or per-request via <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#header-java.lang.String-java.lang.Object-"><code>RestRequest.header(String,Object)</code></a> or <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#accept-java.lang.Object-"><code>RestRequest.accept(Object)</code></a>. |
| <p> |
| <c>Content-Type</c> request header will be set to <js>"text/html+stripped"</js> unless overridden |
| by <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#header-java.lang.String-java.lang.Object-"><code>RestClientBuilder.header(String,Object)</code></a> or <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#contentType-java.lang.Object-"><code>RestClientBuilder.contentType(Object)</code></a>, or per-request via <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#header-java.lang.String-java.lang.Object-"><code>RestRequest.header(String,Object)</code></a> or <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#contentType-java.lang.Object-"><code>RestRequest.contentType(Object)</code></a>. |
| <p> |
| Can be combined with other marshaller setters such as <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#json--"><code>RestClientBuilder.json()</code></a> to provide support for multiple languages. |
| <ul> |
| <li>When multiple languages are supported, the <c>Accept</c> and <c>Content-Type</c> headers control which marshallers are used, or uses the |
| last-enabled language if the headers are not set. |
| </ul> |
| <p> |
| Identical to calling <c>serializer(HtmlStrippedDocSerializer.<jk>class</jk>).parser(HtmlParser.<jk>class</jk>)</c>. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Construct a client that uses HTML Stripped Doc marshalling.</jc> |
| RestClient <jv>client</jv> = RestClient.<jsm>create</jsm>().htmlStrippedDoc().build(); |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#htmlStrippedDoc--">htmlStrippedDoc</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="httpClient-org.apache.http.impl.client.CloseableHttpClient-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>httpClient</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1015">httpClient</a>(<a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/CloseableHttpClient.html?is-external=true" title="class or interface in org.apache.http.impl.client">CloseableHttpClient</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#httpClient-org.apache.http.impl.client.CloseableHttpClient-">RestClientBuilder</a></code></span></div> |
| <div class="block">Sets the <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/HttpClient.html?is-external=true" title="class or interface in org.apache.http.client"><code>HttpClient</code></a> to be used to handle all HTTP communications with the target server. |
| |
| <p> |
| This can be used to bypass the client created by <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#createHttpClient--"><code>RestClientBuilder.createHttpClient()</code></a> method. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Construct a client that uses a customized HttpClient.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .httpClient(HttpClientBuilder.<jsm>create</jsm>().build()) |
| .build(); |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#httpClient-org.apache.http.impl.client.CloseableHttpClient-">httpClient</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/HttpClient.html?is-external=true" title="class or interface in org.apache.http.client"><code>HttpClient</code></a> to be used to handle all HTTP communications with the target server.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="httpClientBuilder-org.apache.http.impl.client.HttpClientBuilder-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>httpClientBuilder</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1021">httpClientBuilder</a>(<a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true" title="class or interface in org.apache.http.impl.client">HttpClientBuilder</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#httpClientBuilder-org.apache.http.impl.client.HttpClientBuilder-">RestClientBuilder</a></code></span></div> |
| <div class="block">Sets the <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder</code></a> that will be used to create the <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/HttpClient.html?is-external=true" title="class or interface in org.apache.http.client"><code>HttpClient</code></a> used by <a href="../../../../../org/apache/juneau/rest/client2/RestClient.html" title="class in org.apache.juneau.rest.client2"><code>RestClient</code></a>. |
| |
| <p> |
| This can be used to bypass the builder created by <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#createHttpClientBuilder--"><code>RestClientBuilder.createHttpClientBuilder()</code></a> method. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Construct a client that uses a customized HttpClientBuilder.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .httpClientBuilder(HttpClientBuilder.<jsm>create</jsm>()) |
| .build(); |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#httpClientBuilder-org.apache.http.impl.client.HttpClientBuilder-">httpClientBuilder</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder</code></a> that will be used to create the <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/HttpClient.html?is-external=true" title="class or interface in org.apache.http.client"><code>HttpClient</code></a> used by <a href="../../../../../org/apache/juneau/rest/client2/RestClient.html" title="class in org.apache.juneau.rest.client2"><code>RestClient</code></a>.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="httpProcessor-org.apache.http.protocol.HttpProcessor-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>httpProcessor</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1027">httpProcessor</a>(<a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/protocol/HttpProcessor.html?is-external=true" title="class or interface in org.apache.http.protocol">HttpProcessor</a> httpprocessor)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#httpProcessor-org.apache.http.protocol.HttpProcessor-">RestClientBuilder</a></code></span></div> |
| <div class="block">Assigns <a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/protocol/HttpProcessor.html?is-external=true" title="class or interface in org.apache.http.protocol"><code>HttpProcessor</code></a> instance.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#httpProcessor-org.apache.http.protocol.HttpProcessor-">httpProcessor</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>httpprocessor</code> - New property value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true#setHttpProcessor-org.apache.http.protocol.HttpProcessor-" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder.setHttpProcessor(HttpProcessor)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="ifMatch-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>ifMatch</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1033">ifMatch</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#ifMatch-java.lang.Object-">RestClientBuilder</a></code></span></div> |
| <div class="block">Sets the value for the <c>If-Match</c> request header on all requests. |
| |
| <p> |
| This is a shortcut for calling <code>header(<js>"If-Match"</js>, value);</code></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#ifMatch-java.lang.Object-">ifMatch</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new header value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="ifModifiedSince-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>ifModifiedSince</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1039">ifModifiedSince</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#ifModifiedSince-java.lang.Object-">RestClientBuilder</a></code></span></div> |
| <div class="block">Sets the value for the <c>If-Modified-Since</c> request header on all requests. |
| |
| <p> |
| This is a shortcut for calling <code>header(<js>"If-Modified-Since"</js>, value);</code></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#ifModifiedSince-java.lang.Object-">ifModifiedSince</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new header value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="ifNoneMatch-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>ifNoneMatch</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1045">ifNoneMatch</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#ifNoneMatch-java.lang.Object-">RestClientBuilder</a></code></span></div> |
| <div class="block">Sets the value for the <c>If-None-Match</c> request header on all requests. |
| |
| <p> |
| This is a shortcut for calling <code>header(<js>"If-None-Match"</js>, value);</code></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#ifNoneMatch-java.lang.Object-">ifNoneMatch</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new header value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="ifRange-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>ifRange</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1051">ifRange</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#ifRange-java.lang.Object-">RestClientBuilder</a></code></span></div> |
| <div class="block">Sets the value for the <c>If-Range</c> request header on all requests. |
| |
| <p> |
| This is a shortcut for calling <code>header(<js>"If-Range"</js>, value);</code></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#ifRange-java.lang.Object-">ifRange</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new header value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="ifUnmodifiedSince-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>ifUnmodifiedSince</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1057">ifUnmodifiedSince</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#ifUnmodifiedSince-java.lang.Object-">RestClientBuilder</a></code></span></div> |
| <div class="block">Sets the value for the <c>If-Unmodified-Since</c> request header on all requests. |
| |
| <p> |
| This is a shortcut for calling <code>header(<js>"If-Unmodified-Since"</js>, value);</code></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#ifUnmodifiedSince-java.lang.Object-">ifUnmodifiedSince</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new header value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="ignoreErrors--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>ignoreErrors</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1063">ignoreErrors</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#ignoreErrors--">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Ignore errors. |
| |
| <p> |
| When enabled, HTTP error response codes (e.g. <l>>=400</l>) will not cause a <a href="../../../../../org/apache/juneau/rest/client2/RestCallException.html" title="class in org.apache.juneau.rest.client2"><code>RestCallException</code></a> to |
| be thrown. |
| <p> |
| Note that this is equivalent to <c>builder.errorCodes(x -> <jk>false</jk>);</c> |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a client that doesn't throws a RestCallException when a 500 error occurs.</jc> |
| RestClient |
| .<jsm>create</jsm>() |
| .ignoreErrors() |
| .build() |
| .get(<js>"/error"</js>) <jc>// Throws a 500 error</jc> |
| .run() |
| .assertStatus().is(500); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/rest/client2/RestClient.html#RESTCLIENT_ignoreErrors"><code>RestClient.RESTCLIENT_ignoreErrors</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#ignoreErrors--">ignoreErrors</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="ignoreErrors-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>ignoreErrors</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1069">ignoreErrors</a>(boolean value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#ignoreErrors-boolean-">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Ignore errors. |
| |
| <p> |
| When enabled, HTTP error response codes (e.g. <l>>=400</l>) will not cause a <a href="../../../../../org/apache/juneau/rest/client2/RestCallException.html" title="class in org.apache.juneau.rest.client2"><code>RestCallException</code></a> to |
| be thrown. |
| <p> |
| Note that this is equivalent to <c>builder.errorCodes(x -> <jk>false</jk>);</c> |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a client that doesn't throws a RestCallException when a 500 error occurs.</jc> |
| RestClient |
| .<jsm>create</jsm>() |
| .ignoreErrors(<jk>true</jk>) |
| .build() |
| .get(<js>"/error"</js>) <jc>// Throws a 500 error</jc> |
| .run() |
| .assertStatus().is(500); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/rest/client2/RestClient.html#RESTCLIENT_ignoreErrors"><code>RestClient.RESTCLIENT_ignoreErrors</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#ignoreErrors-boolean-">ignoreErrors</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new value for this property.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="ignoreRecursions--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>ignoreRecursions</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1075">ignoreRecursions</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#ignoreRecursions--">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>BeanTraverse</l> configuration property: </i> Ignore recursion errors. |
| |
| <p> |
| When enabled, when we encounter the same object when traversing a tree, we set the value to <jk>null</jk>. |
| |
| <p> |
| For example, if a model contains the links A->B->C->A, then the JSON generated will look like |
| the following when <jsf>BEANTRAVERSE_ignoreRecursions</jsf> is <jk>true</jk>... |
| |
| <p class='bcode w800'> |
| {A:{B:{C:<jk>null</jk>}}} |
| </p> |
| |
| <ul class='notes'> |
| <li> |
| Checking for recursion can cause a small performance penalty. |
| </ul> |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a JSON client that ignores recursions.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .json() |
| .ignoreRecursions() |
| .build(); |
| |
| <jc>// Create a POJO model with a recursive loop.</jc> |
| <jk>public class</jk> A { |
| <jk>public</jk> Object <jf>f</jf>; |
| } |
| A <jv>a</jv> = <jk>new</jk> A(); |
| <jv>a</jv>.<jf>f</jf> = <jv>a</jv>; |
| |
| <jc>// Produces request body "{f:null}"</jc> |
| <jv>client</jv> |
| .doPost(<js>"http://localhost:10000/foo"</js>, <jv>a</jv>) |
| .run(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/BeanTraverseContext.html#BEANTRAVERSE_ignoreRecursions"><code>BeanTraverseContext.BEANTRAVERSE_ignoreRecursions</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#ignoreRecursions--">ignoreRecursions</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="initialDepth-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>initialDepth</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1081">initialDepth</a>(int value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#initialDepth-int-">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>BeanTraverse</l> configuration property: </i> Initial depth. |
| |
| <p> |
| The initial indentation level at the root. |
| |
| <p> |
| Useful when constructing document fragments that need to be indented at a certain level when whitespace is enabled. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a REST client with JSON serializer with whitespace enabled and an initial depth of 2.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .json() |
| .ws() |
| .initialDepth(2) |
| .build(); |
| |
| <jc>// Our bean to serialize.</jc> |
| <jk>public class</jk> MyBean { |
| <jk>public</jk> String <jf>foo</jf> = <jk>null</jk>; |
| } |
| |
| <jc>// Produces request body "\t\t{\n\t\t\t'foo':'bar'\n\t\t}\n"</jc> |
| <jv>client</jv> |
| .doPost(<js>"http://localhost:10000/foo"</js>, <jk>new</jk> MyBean()) |
| .run(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/BeanTraverseContext.html#BEANTRAVERSE_initialDepth"><code>BeanTraverseContext.BEANTRAVERSE_initialDepth</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#initialDepth-int-">initialDepth</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new value for this property. |
| <br>The default is <c>0</c>.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="interceptors-java.lang.Class...-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>interceptors</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1087">interceptors</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?>... values) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#interceptors-java.lang.Class...-">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Call interceptors. |
| |
| <p> |
| Adds an interceptor that can be called to hook into specified events in the lifecycle of a single request. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Customized interceptor (note you can also extend from BasicRestCallInterceptor as well.</jc> |
| <jk>public class</jk> MyRestCallInterceptor <jk>implements</jk> RestCallInterceptor { |
| |
| <ja>@Override</ja> |
| <jk>public void</jk> onInit(RestRequest <jv>req</jv>) <jk>throws</jk> Exception { |
| <jc>// Intercept immediately after RestRequest object is created and all headers/query/form-data has been |
| // set on the request from the client.</jc> |
| } |
| |
| <ja>@Override</ja> |
| <jk>public void</jk> onConnect(RestRequest <jv>req</jv>, RestResponse <jv>res</jv>) <jk>throws</jk> Exception { |
| <jc>// Intercept immediately after an HTTP response has been received.</jc> |
| } |
| |
| <ja>@Override</ja> |
| <jk>public void</jk> onClose(RestRequest <jv>req</jv>, RestResponse <jv>res</jv>) <jk>throws</jk> Exception { |
| <jc>// Intercept when the response body is consumed.</jc> |
| } |
| } |
| |
| <jc>// Create a client with a customized interceptor.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .interceptors(MyRestCallInterceptor.<jk>class</jk>) |
| .build(); |
| </p> |
| |
| <ul class='notes'> |
| <li>The <a href="../../../../../org/apache/juneau/rest/client2/RestClient.html#onInit-org.apache.juneau.rest.client2.RestRequest-"><code>RestClient.onInit(RestRequest)</code></a>, <a href="../../../../../org/apache/juneau/rest/client2/RestClient.html#onConnect-org.apache.juneau.rest.client2.RestRequest-org.apache.juneau.rest.client2.RestResponse-"><code>RestClient.onConnect(RestRequest,RestResponse)</code></a>, and |
| <a href="../../../../../org/apache/juneau/rest/client2/RestClient.html#onClose-org.apache.juneau.rest.client2.RestRequest-org.apache.juneau.rest.client2.RestResponse-"><code>RestClient.onClose(RestRequest,RestResponse)</code></a> methods can also be overridden to produce the same results. |
| </ul> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/rest/client2/RestClient.html#RESTCLIENT_interceptors"><code>RestClient.RESTCLIENT_interceptors</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#interceptors-java.lang.Class...-">interceptors</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>values</code> - The values to add to this setting. |
| <br>Can be implementations of any of the following: |
| <ul> |
| <li class='jic'><a href="../../../../../org/apache/juneau/rest/client2/RestCallInterceptor.html" title="interface in org.apache.juneau.rest.client2"><code>RestCallInterceptor</code></a> |
| <li class='jic'><a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/HttpRequestInterceptor.html?is-external=true" title="class or interface in org.apache.http"><code>HttpRequestInterceptor</code></a> |
| <li class='jic'><a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/HttpResponseInterceptor.html?is-external=true" title="class or interface in org.apache.http"><code>HttpResponseInterceptor</code></a> |
| </ul></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></code> - If one or more interceptors could not be created.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="interceptors-java.lang.Object...-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>interceptors</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1093">interceptors</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>... value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#interceptors-java.lang.Object...-">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Call interceptors. |
| |
| <p> |
| Adds an interceptor that gets called immediately after a connection is made. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a client with a customized interceptor.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .interceptors( |
| <jk>new</jk> RestCallInterceptor() { |
| |
| <ja>@Override</ja> |
| <jk>public void</jk> onInit(RestRequest <jv>req</jv>) <jk>throws</jk> Exception { |
| <jc>// Intercept immediately after RestRequest object is created and all headers/query/form-data has been |
| // set on the request from the client.</jc> |
| } |
| |
| <ja>@Override</ja> |
| <jk>public void</jk> onConnect(RestRequest <jv>req</jv>, RestResponse <jv>res</jv>) <jk>throws</jk> Exception { |
| <jc>// Intercept immediately after an HTTP response has been received.</jc> |
| } |
| |
| <ja>@Override</ja> |
| <jk>public void</jk> onClose(RestRequest <jv>req</jv>, RestResponse <jv>res</jv>) <jk>throws</jk> Exception { |
| <jc>// Intercept when the response body is consumed.</jc> |
| } |
| } |
| ) |
| .build(); |
| </p> |
| |
| <ul class='notes'> |
| <li>The <a href="../../../../../org/apache/juneau/rest/client2/RestClient.html#onInit-org.apache.juneau.rest.client2.RestRequest-"><code>RestClient.onInit(RestRequest)</code></a>, <a href="../../../../../org/apache/juneau/rest/client2/RestClient.html#onConnect-org.apache.juneau.rest.client2.RestRequest-org.apache.juneau.rest.client2.RestResponse-"><code>RestClient.onConnect(RestRequest,RestResponse)</code></a>, and |
| <a href="../../../../../org/apache/juneau/rest/client2/RestClient.html#onClose-org.apache.juneau.rest.client2.RestRequest-org.apache.juneau.rest.client2.RestResponse-"><code>RestClient.onClose(RestRequest,RestResponse)</code></a> methods can also be overridden to produce the same results. |
| </ul> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/rest/client2/RestClient.html#RESTCLIENT_interceptors"><code>RestClient.RESTCLIENT_interceptors</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#interceptors-java.lang.Object...-">interceptors</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The values to add to this setting. |
| <br>Can be implementations of any of the following: |
| <ul> |
| <li class='jic'><a href="../../../../../org/apache/juneau/rest/client2/RestCallInterceptor.html" title="interface in org.apache.juneau.rest.client2"><code>RestCallInterceptor</code></a> |
| <li class='jic'><a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/HttpRequestInterceptor.html?is-external=true" title="class or interface in org.apache.http"><code>HttpRequestInterceptor</code></a> |
| <li class='jic'><a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/HttpResponseInterceptor.html?is-external=true" title="class or interface in org.apache.http"><code>HttpResponseInterceptor</code></a> |
| </ul></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="json--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>json</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1099">json</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#json--">RestClientBuilder</a></code></span></div> |
| <div class="block">Convenience method for specifying JSON as the marshalling transmission media type. |
| |
| <p> |
| <a href="../../../../../org/apache/juneau/json/JsonSerializer.html" title="class in org.apache.juneau.json"><code>JsonSerializer</code></a> will be used to serialize POJOs to request bodies unless overridden per request via <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#serializer-org.apache.juneau.serializer.Serializer-"><code>RestRequest.serializer(Serializer)</code></a>. |
| <ul> |
| <li>The serializer can be configured using any of the serializer property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#sortCollections--"><code>RestClientBuilder.sortCollections()</code></a>), |
| bean context property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#swaps-java.lang.Object...-"><code>RestClientBuilder.swaps(Object...)</code></a>), or generic property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#set-java.lang.String-java.lang.Object-"><code>RestClientBuilder.set(String, Object)</code></a>) defined on this builder class. |
| </ul> |
| <p> |
| <a href="../../../../../org/apache/juneau/json/JsonParser.html" title="class in org.apache.juneau.json"><code>JsonParser</code></a> will be used to parse POJOs from response bodies unless overridden per request via <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#parser-org.apache.juneau.parser.Parser-"><code>RestRequest.parser(Parser)</code></a>. |
| <ul> |
| <li>The parser can be configured using any of the parser property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#strict--"><code>RestClientBuilder.strict()</code></a>), |
| bean context property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#swaps-java.lang.Object...-"><code>RestClientBuilder.swaps(Object...)</code></a>), or generic property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#set-java.lang.String-java.lang.Object-"><code>RestClientBuilder.set(String, Object)</code></a>) defined on this builder class. |
| </ul> |
| <p> |
| <c>Accept</c> request header will be set to <js>"application/json"</js> unless overridden |
| by <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#header-java.lang.String-java.lang.Object-"><code>RestClientBuilder.header(String,Object)</code></a> or <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#accept-java.lang.Object-"><code>RestClientBuilder.accept(Object)</code></a>, or per-request via <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#header-java.lang.String-java.lang.Object-"><code>RestRequest.header(String,Object)</code></a> or <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#accept-java.lang.Object-"><code>RestRequest.accept(Object)</code></a>. |
| <p> |
| <c>Content-Type</c> request header will be set to <js>"application/json"</js> unless overridden |
| by <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#header-java.lang.String-java.lang.Object-"><code>RestClientBuilder.header(String,Object)</code></a> or <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#contentType-java.lang.Object-"><code>RestClientBuilder.contentType(Object)</code></a>, or per-request via <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#header-java.lang.String-java.lang.Object-"><code>RestRequest.header(String,Object)</code></a> or <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#contentType-java.lang.Object-"><code>RestRequest.contentType(Object)</code></a>. |
| <p> |
| Can be combined with other marshaller setters such as <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#xml--"><code>RestClientBuilder.xml()</code></a> to provide support for multiple languages. |
| <ul> |
| <li>When multiple languages are supported, the <c>Accept</c> and <c>Content-Type</c> headers control which marshallers are used, or uses the |
| last-enabled language if the headers are not set. |
| </ul> |
| <p> |
| Identical to calling <c>serializer(JsonSerializer.<jk>class</jk>).parser(JsonParser.<jk>class</jk>)</c>. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Construct a client that uses JSON marshalling.</jc> |
| RestClient <jv>client</jv> = RestClient.<jsm>create</jsm>().json().build(); |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#json--">json</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="keepAliveStrategy-org.apache.http.conn.ConnectionKeepAliveStrategy-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>keepAliveStrategy</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1105">keepAliveStrategy</a>(<a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/conn/ConnectionKeepAliveStrategy.html?is-external=true" title="class or interface in org.apache.http.conn">ConnectionKeepAliveStrategy</a> keepAliveStrategy)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#keepAliveStrategy-org.apache.http.conn.ConnectionKeepAliveStrategy-">RestClientBuilder</a></code></span></div> |
| <div class="block">Assigns <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/conn/ConnectionKeepAliveStrategy.html?is-external=true" title="class or interface in org.apache.http.conn"><code>ConnectionKeepAliveStrategy</code></a> instance.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#keepAliveStrategy-org.apache.http.conn.ConnectionKeepAliveStrategy-">keepAliveStrategy</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>keepAliveStrategy</code> - New property value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true#setKeepAliveStrategy-org.apache.http.conn.ConnectionKeepAliveStrategy-" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder.setKeepAliveStrategy(ConnectionKeepAliveStrategy)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="keepHttpClientOpen--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>keepHttpClientOpen</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1111">keepHttpClientOpen</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#keepHttpClientOpen--">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Keep HttpClient open. |
| |
| <p> |
| Don't close this client when the <a href="../../../../../org/apache/juneau/rest/client2/RestClient.html#close--"><code>RestClient.close()</code></a> method is called. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a client with a customized client and don't close the client service.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .httpClient(<jv>myHttpClient</jv>) |
| .keepHttpClientOpen() |
| .build(); |
| |
| <jv>client</jv>.closeQuietly(); <jc>// Customized HttpClient won't be closed.</jc> |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/rest/client2/RestClient.html#RESTCLIENT_keepHttpClientOpen"><code>RestClient.RESTCLIENT_keepHttpClientOpen</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#keepHttpClientOpen--">keepHttpClientOpen</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="keepNullProperties--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>keepNullProperties</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1117">keepNullProperties</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#keepNullProperties--">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>Serializer</l> configuration property: </i> Don't trim null bean property values. |
| |
| <p> |
| When enabled, null bean values will be serialized to the output. |
| |
| <ul class='notes'> |
| <li>Not enabling this setting will cause <c>Map</c>s with <jk>null</jk> values to be lost during parsing. |
| </ul> |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a REST client with JSON serializer that serializes null properties.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .json() |
| .keepNullProperties() |
| .build(); |
| |
| <jc>// Our bean to serialize.</jc> |
| <jk>public class</jk> MyBean { |
| <jk>public</jk> String <jf>foo</jf> = <jk>null</jk>; |
| } |
| |
| <jc>// Request body will contain: {foo:null}</jc> |
| <jv>client</jv> |
| .doPost(<js>"http://localhost:10000/foo"</js>, <jk>new</jk> MyBean()) |
| .run(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/serializer/Serializer.html#SERIALIZER_keepNullProperties"><code>Serializer.SERIALIZER_keepNullProperties</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#keepNullProperties--">keepNullProperties</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="leakDetection--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>leakDetection</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1123">leakDetection</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#leakDetection--">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Enable leak detection. |
| |
| <p> |
| Enable client and request/response leak detection. |
| |
| <p> |
| Causes messages to be logged to the console if clients or request/response objects are not properly closed |
| when the <c>finalize</c> methods are invoked. |
| |
| <p> |
| Automatically enabled with <a href="../../../../../org/apache/juneau/Context.html#CONTEXT_debug"><code>Context.CONTEXT_debug</code></a>. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a client that logs a message if </jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .leakDetection() |
| .logToConsole() <jc>// Also log the error message to System.err</jc> |
| .build(); |
| |
| <jv>client</jv>.closeQuietly(); <jc>// Customized HttpClient won't be closed.</jc> |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/rest/client2/RestClient.html#RESTCLIENT_leakDetection"><code>RestClient.RESTCLIENT_leakDetection</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#leakDetection--">leakDetection</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="logRequests-org.apache.juneau.DetailLevel-java.util.logging.Level-java.util.function.BiPredicate-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>logRequests</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1129">logRequests</a>(<a href="../../../../../org/apache/juneau/DetailLevel.html" title="enum in org.apache.juneau">DetailLevel</a> detail, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/logging/Level.html?is-external=true" title="class or interface in java.util.logging">Level</a> level, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/BiPredicate.html?is-external=true" title="class or interface in java.util.function">BiPredicate</a><<a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html" title="class in org.apache.juneau.rest.client2">RestRequest</a>,<a href="../../../../../org/apache/juneau/rest/client2/RestResponse.html" title="class in org.apache.juneau.rest.client2">RestResponse</a>> test)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#logRequests-org.apache.juneau.DetailLevel-java.util.logging.Level-java.util.function.BiPredicate-">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><i><l>RestClient</l> configuration property: </i></i> Log requests. |
| |
| <p> |
| Causes requests/responses to be logged at the specified log level at the end of the request. |
| |
| <p> |
| <jsf>SIMPLE</jsf> detail produces a log message like the following: |
| <p class='bcode w800 console'> |
| POST http://localhost:10000/testUrl, HTTP/1.1 200 OK |
| </p> |
| |
| <p> |
| <jsf>FULL</jsf> detail produces a log message like the following: |
| <p class='bcode w800 console'> |
| === HTTP Call (outgoing) ======================================================= |
| === REQUEST === |
| POST http://localhost:10000/testUrl |
| ---request headers--- |
| Debug: true |
| No-Trace: true |
| Accept: application/json |
| ---request entity--- |
| Content-Type: application/json |
| ---request content--- |
| {"foo":"bar","baz":123} |
| === RESPONSE === |
| HTTP/1.1 200 OK |
| ---response headers--- |
| Content-Type: application/json;charset=utf-8 |
| Content-Length: 21 |
| Server: Jetty(8.1.0.v20120127) |
| ---response content--- |
| {"message":"OK then"} |
| === END ======================================================================== |
| </p> |
| |
| <p> |
| By default, the message is logged to the default logger. It can be logged to a different logger via the |
| <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#logger-java.util.logging.Logger-"><code>RestClientBuilder.logger(Logger)</code></a> method or logged to the console using the |
| <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#logToConsole--"><code>RestClientBuilder.logToConsole()</code></a> method. |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/rest/client2/RestClient.html#RESTCLIENT_logRequests"><code>RestClient.RESTCLIENT_logRequests</code></a> |
| <li class='jf'><a href="../../../../../org/apache/juneau/rest/client2/RestClient.html#RESTCLIENT_logRequestsLevel"><code>RestClient.RESTCLIENT_logRequestsLevel</code></a> |
| <li class='jf'><a href="../../../../../org/apache/juneau/rest/client2/RestClient.html#RESTCLIENT_logRequestsPredicate"><code>RestClient.RESTCLIENT_logRequestsPredicate</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#logRequests-org.apache.juneau.DetailLevel-java.util.logging.Level-java.util.function.BiPredicate-">logRequests</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>detail</code> - The detail level of logging.</dd> |
| <dd><code>level</code> - The log level.</dd> |
| <dd><code>test</code> - A predicate to use per-request to see if the request should be logged. If <jk>null</jk>, always logs.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="logToConsole--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>logToConsole</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1135">logToConsole</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#logToConsole--">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Log to console. |
| |
| <p> |
| Specifies to log messages to the console. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Construct a client that logs messages to a special logger.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .logToConsole() |
| .logRequests(<jsf>FULL</jsf>, <jsf>INFO</jsf>) <jc>// Level is ignored when logging to console.</jc> |
| .build(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/rest/client2/RestClient.html#RESTCLIENT_logToConsole"><code>RestClient.RESTCLIENT_logToConsole</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#logToConsole--">logToConsole</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="logger-java.util.logging.Logger-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>logger</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1141">logger</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/logging/Logger.html?is-external=true" title="class or interface in java.util.logging">Logger</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#logger-java.util.logging.Logger-">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Logger. |
| |
| <p> |
| Specifies the logger to use for logging. |
| |
| <p> |
| If not specified, uses the following logger: |
| <p class='bcode w800'> |
| Logger.<jsm>getLogger</jsm>(RestClient.<jk>class</jk>.getName()); |
| </p> |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Construct a client that logs messages to a special logger.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .logger(Logger.<jsm>getLogger</jsm>(<js>"MyLogger"</js>)) <jc>// Log to MyLogger logger.</jc> |
| .logToConsole() <jc>// Also log to console.</jc> |
| .logRequests(<jsf>FULL</jsf>, <jsf>WARNING</jsf>) <jc>// Log requests with full detail at WARNING level.</jc> |
| .build(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/rest/client2/RestClient.html#RESTCLIENT_logger"><code>RestClient.RESTCLIENT_logger</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#logger-java.util.logging.Logger-">logger</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The logger to use for logging.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="marshall-org.apache.juneau.marshall.Marshall-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>marshall</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1147">marshall</a>(<a href="../../../../../org/apache/juneau/marshall/Marshall.html" title="class in org.apache.juneau.marshall">Marshall</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#marshall-org.apache.juneau.marshall.Marshall-">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Marshall |
| |
| <p> |
| Shortcut for specifying the <a href="../../../../../org/apache/juneau/rest/client2/RestClient.html#RESTCLIENT_serializers"><code>RestClient.RESTCLIENT_serializers</code></a> and <a href="../../../../../org/apache/juneau/rest/client2/RestClient.html#RESTCLIENT_parsers"><code>RestClient.RESTCLIENT_parsers</code></a> |
| using the serializer and parser defined in a marshall. |
| |
| <ul class='notes'> |
| <li>When using this method that takes in a pre-instantiated serializers and parsers, the serializer property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#sortCollections--"><code>RestClientBuilder.sortCollections()</code></a>), |
| parser property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#strict--"><code>RestClientBuilder.strict()</code></a>), bean context property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#swaps-java.lang.Object...-"><code>RestClientBuilder.swaps(Object...)</code></a>), |
| or generic property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#set-java.lang.String-java.lang.Object-"><code>RestClientBuilder.set(String, Object)</code></a>) defined on this builder class have no effect. |
| </ul> |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a client that uses Simplified-JSON transport using an existing marshall.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .marshall(SimpleJson.<jsf>DEFAULT_READABLE</jsf>) |
| .build(); |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#marshall-org.apache.juneau.marshall.Marshall-">marshall</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The values to add to this setting.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="marshalls-org.apache.juneau.marshall.Marshall...-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>marshalls</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1153">marshalls</a>(<a href="../../../../../org/apache/juneau/marshall/Marshall.html" title="class in org.apache.juneau.marshall">Marshall</a>... value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#marshalls-org.apache.juneau.marshall.Marshall...-">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Marshalls |
| |
| <p> |
| Shortcut for specifying the <a href="../../../../../org/apache/juneau/rest/client2/RestClient.html#RESTCLIENT_serializers"><code>RestClient.RESTCLIENT_serializers</code></a> and <a href="../../../../../org/apache/juneau/rest/client2/RestClient.html#RESTCLIENT_parsers"><code>RestClient.RESTCLIENT_parsers</code></a> |
| using the serializer and parser defined in a marshall. |
| |
| <ul class='notes'> |
| <li>When using this method that takes in a pre-instantiated serializers and parsers, the serializer property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#sortCollections--"><code>RestClientBuilder.sortCollections()</code></a>), |
| parser property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#strict--"><code>RestClientBuilder.strict()</code></a>), bean context property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#swaps-java.lang.Object...-"><code>RestClientBuilder.swaps(Object...)</code></a>), |
| or generic property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#set-java.lang.String-java.lang.Object-"><code>RestClientBuilder.set(String, Object)</code></a>) defined on this builder class have no effect. |
| </ul> |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a client that uses JSON and XML transport using existing marshalls.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .marshall(Json.<jsf>DEFAULT_READABLE</jsf>, Xml.<jsf>DEFAULT_READABLE</jsf>) |
| .build(); |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#marshalls-org.apache.juneau.marshall.Marshall...-">marshalls</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The values to add to this setting.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="maxConnPerRoute-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>maxConnPerRoute</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1159">maxConnPerRoute</a>(int maxConnPerRoute)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#maxConnPerRoute-int-">RestClientBuilder</a></code></span></div> |
| <div class="block">Assigns maximum connection per route value. |
| |
| <ul class='notes'> |
| <li>This value can be overridden by the <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#connectionManager-org.apache.http.conn.HttpClientConnectionManager-"><code>RestClientBuilder.connectionManager(HttpClientConnectionManager)</code></a> method. |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#maxConnPerRoute-int-">maxConnPerRoute</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>maxConnPerRoute</code> - New property value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true#setMaxConnPerRoute-int-" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder.setMaxConnPerRoute(int)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="maxConnTotal-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>maxConnTotal</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1165">maxConnTotal</a>(int maxConnTotal)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#maxConnTotal-int-">RestClientBuilder</a></code></span></div> |
| <div class="block">Assigns maximum total connection value. |
| |
| <ul class='notes'> |
| <li>This value can be overridden by the <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#connectionManager-org.apache.http.conn.HttpClientConnectionManager-"><code>RestClientBuilder.connectionManager(HttpClientConnectionManager)</code></a> method. |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#maxConnTotal-int-">maxConnTotal</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>maxConnTotal</code> - New property value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true#setMaxConnTotal-int-" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder.setMaxConnTotal(int)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="maxDepth-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>maxDepth</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1171">maxDepth</a>(int value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#maxDepth-int-">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>BeanTraverse</l> configuration property: </i> Max serialization depth. |
| |
| <p> |
| When enabled, abort traversal if specified depth is reached in the POJO tree. |
| |
| <p> |
| If this depth is exceeded, an exception is thrown. |
| |
| <p> |
| This prevents stack overflows from occurring when trying to traverse models with recursive references. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a REST client with JSON serializer that throws an exception if the depth reaches greater than 20.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .json() |
| .maxDepth(20) |
| .build(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/BeanTraverseContext.html#BEANTRAVERSE_maxDepth"><code>BeanTraverseContext.BEANTRAVERSE_maxDepth</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#maxDepth-int-">maxDepth</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new value for this property. |
| <br>The default is <c>100</c>.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="maxForwards-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>maxForwards</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1177">maxForwards</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#maxForwards-java.lang.Object-">RestClientBuilder</a></code></span></div> |
| <div class="block">Sets the value for the <c>Max-Forwards</c> request header on all requests. |
| |
| <p> |
| This is a shortcut for calling <code>header(<js>"Max-Forwards"</js>, value);</code></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#maxForwards-java.lang.Object-">maxForwards</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new header value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="maxIndent-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>maxIndent</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1183">maxIndent</a>(int value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#maxIndent-int-">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>WriterSerializer</l> configuration property: </i> Maximum indentation. |
| |
| <p> |
| Specifies the maximum indentation level in the serialized document. |
| |
| <ul class='notes'> |
| <li>This setting does not apply to the RDF serializers. |
| </ul> |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a REST client with JSON serializer that indents a maximum of 20 tabs.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .json() |
| .ws() <jc>// Enable whitespace</jc> |
| .maxIndent(20) |
| .build(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/serializer/WriterSerializer.html#WSERIALIZER_maxIndent"><code>WriterSerializer.WSERIALIZER_maxIndent</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#maxIndent-int-">maxIndent</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new value for this property. |
| <br>The default is <c>100</c>.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="msgPack--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>msgPack</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1189">msgPack</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#msgPack--">RestClientBuilder</a></code></span></div> |
| <div class="block">Convenience method for specifying MessagePack as the marshalling transmission media type. |
| |
| <p> |
| MessagePack is a binary equivalent to JSON that takes up considerably less space than JSON. |
| |
| <p> |
| <a href="../../../../../org/apache/juneau/msgpack/MsgPackSerializer.html" title="class in org.apache.juneau.msgpack"><code>MsgPackSerializer</code></a> will be used to serialize POJOs to request bodies unless overridden per request via <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#serializer-org.apache.juneau.serializer.Serializer-"><code>RestRequest.serializer(Serializer)</code></a>. |
| <ul> |
| <li>The serializer can be configured using any of the serializer property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#sortCollections--"><code>RestClientBuilder.sortCollections()</code></a>), |
| bean context property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#swaps-java.lang.Object...-"><code>RestClientBuilder.swaps(Object...)</code></a>), or generic property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#set-java.lang.String-java.lang.Object-"><code>RestClientBuilder.set(String, Object)</code></a>) defined on this builder class. |
| </ul> |
| <p> |
| <a href="../../../../../org/apache/juneau/msgpack/MsgPackParser.html" title="class in org.apache.juneau.msgpack"><code>MsgPackParser</code></a> will be used to parse POJOs from response bodies unless overridden per request via <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#parser-org.apache.juneau.parser.Parser-"><code>RestRequest.parser(Parser)</code></a>. |
| <ul> |
| <li>The parser can be configured using any of the parser property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#strict--"><code>RestClientBuilder.strict()</code></a>), |
| bean context property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#swaps-java.lang.Object...-"><code>RestClientBuilder.swaps(Object...)</code></a>), or generic property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#set-java.lang.String-java.lang.Object-"><code>RestClientBuilder.set(String, Object)</code></a>) defined on this builder class. |
| </ul> |
| <p> |
| <c>Accept</c> request header will be set to <js>"octal/msgpack"</js> unless overridden |
| by <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#header-java.lang.String-java.lang.Object-"><code>RestClientBuilder.header(String,Object)</code></a> or <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#accept-java.lang.Object-"><code>RestClientBuilder.accept(Object)</code></a>, or per-request via <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#header-java.lang.String-java.lang.Object-"><code>RestRequest.header(String,Object)</code></a> or <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#accept-java.lang.Object-"><code>RestRequest.accept(Object)</code></a>. |
| <p> |
| <c>Content-Type</c> request header will be set to <js>"octal/msgpack"</js> unless overridden |
| by <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#header-java.lang.String-java.lang.Object-"><code>RestClientBuilder.header(String,Object)</code></a> or <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#contentType-java.lang.Object-"><code>RestClientBuilder.contentType(Object)</code></a>, or per-request via <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#header-java.lang.String-java.lang.Object-"><code>RestRequest.header(String,Object)</code></a> or <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#contentType-java.lang.Object-"><code>RestRequest.contentType(Object)</code></a>. |
| <p> |
| Can be combined with other marshaller setters such as <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#json--"><code>RestClientBuilder.json()</code></a> to provide support for multiple languages. |
| <ul> |
| <li>When multiple languages are supported, the <c>Accept</c> and <c>Content-Type</c> headers control which marshallers are used, or uses the |
| last-enabled language if the headers are not set. |
| </ul> |
| <p> |
| Identical to calling <c>serializer(MsgPackSerializer.<jk>class</jk>).parser(MsgPackParser.<jk>class</jk>)</c>. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Construct a client that uses MessagePack marshalling.</jc> |
| RestClient <jv>client</jv> = RestClient.<jsm>create</jsm>().msgPack().build(); |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#msgPack--">msgPack</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="noTrace--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>noTrace</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1195">noTrace</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#noTrace--">RestClientBuilder</a></code></span></div> |
| <div class="block">When called, <c>No-Trace: true</c> is added to requests. |
| |
| <p> |
| This gives the opportunity for the servlet to not log errors on invalid requests. |
| This is useful for testing purposes when you don't want your log file to show lots of errors that are simply the |
| results of testing.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#noTrace--">noTrace</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="oapiCollectionFormat-org.apache.juneau.httppart.HttpPartCollectionFormat-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>oapiCollectionFormat</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1201">oapiCollectionFormat</a>(<a href="../../../../../org/apache/juneau/httppart/HttpPartCollectionFormat.html" title="enum in org.apache.juneau.httppart">HttpPartCollectionFormat</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#oapiCollectionFormat-org.apache.juneau.httppart.HttpPartCollectionFormat-">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>OpenApiCommon</l> configuration property: </i> Default collection format for HTTP parts. |
| |
| <p> |
| Specifies the collection format to use for HTTP parts when not otherwise specified via <a href="../../../../../org/apache/juneau/jsonschema/annotation/Schema.html#collectionFormat--"><code>Schema.collectionFormat()</code></a> for the |
| OpenAPI serializer and parser on this client. |
| |
| <p> |
| Possible values: |
| <ul class='javatree'> |
| <li class='jc'><a href="../../../../../org/apache/juneau/httppart/HttpPartFormat.html" title="enum in org.apache.juneau.httppart"><code>HttpPartFormat</code></a> |
| <ul> |
| <li class='jf'><a href="../../../../../org/apache/juneau/httppart/HttpPartCollectionFormat.html#CSV"><code>CSV</code></a> - (default) Comma-separated values (e.g. <js>"foo,bar"</js>). |
| <li class='jf'><a href="../../../../../org/apache/juneau/httppart/HttpPartCollectionFormat.html#SSV"><code>SSV</code></a> - Space-separated values (e.g. <js>"foo bar"</js>). |
| <li class='jf'><a href="../../../../../org/apache/juneau/httppart/HttpPartCollectionFormat.html#TSV"><code>TSV</code></a> - Tab-separated values (e.g. <js>"foo\tbar"</js>). |
| <li class='jf'><a href="../../../../../org/apache/juneau/httppart/HttpPartCollectionFormat.html#PIPES"><code>PIPES</code></a> - Pipe-separated values (e.g. <js>"foo|bar"</js>). |
| <li class='jf'><a href="../../../../../org/apache/juneau/httppart/HttpPartCollectionFormat.html#MULTI"><code>MULTI</code></a> - Corresponds to multiple parameter instances instead of multiple values for a single instance (e.g. <js>"foo=bar&foo=baz"</js>). |
| <li class='jf'><a href="../../../../../org/apache/juneau/httppart/HttpPartCollectionFormat.html#UONC"><code>UONC</code></a> - UON collection notation (e.g. <js>"@(foo,bar)"</js>). |
| </ul> |
| </ul> |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a REST client with CSV format for http parts.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .collectionFormat(<jsf>CSV</jsf>) |
| .build(); |
| |
| <jc>// An arbitrary data structure.</jc> |
| AList <jv>list</jv> = AList.<jsm>of</jsm>( |
| <js>"foo"</js>, |
| <js>"bar"</js>, |
| AMap.<jsm>of</jsm>( |
| <js>"baz"</js>, AList.<jsm>of</jsm>(<js>"qux"</js>,<js>"true"</js>,<js>"123"</js>) |
| ) |
| ); |
| |
| <jc>// Set a header with a comma-separated list.</jc> |
| <jv>client</jv> |
| .get(<js>"/uri"</js>) |
| .header(<js>"Foo"</js>, <jv>list</jv>) <jc>// Will be serialized as: foo=bar,baz=qux\,true\,123</jc> |
| .run(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/oapi/OpenApiCommon.html#OAPI_collectionFormat"><code>OpenApiCommon.OAPI_collectionFormat</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#oapiCollectionFormat-org.apache.juneau.httppart.HttpPartCollectionFormat-">oapiCollectionFormat</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new value for this property. |
| <br>The default value is <a href="../../../../../org/apache/juneau/httppart/HttpPartCollectionFormat.html#NO_COLLECTION_FORMAT"><code>HttpPartCollectionFormat.NO_COLLECTION_FORMAT</code></a>.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="oapiFormat-org.apache.juneau.httppart.HttpPartFormat-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>oapiFormat</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1207">oapiFormat</a>(<a href="../../../../../org/apache/juneau/httppart/HttpPartFormat.html" title="enum in org.apache.juneau.httppart">HttpPartFormat</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#oapiFormat-org.apache.juneau.httppart.HttpPartFormat-">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>OpenApiCommon</l> configuration property: </i> Default OpenAPI format for HTTP parts. |
| |
| <p> |
| Specifies the format to use for HTTP parts when not otherwise specified via <a href="../../../../../org/apache/juneau/jsonschema/annotation/Schema.html#format--"><code>Schema.format()</code></a> for |
| the OpenAPI serializer and parser on this client. |
| |
| <p> |
| Possible values: |
| <ul class='javatree'> |
| <li class='jc'><a href="../../../../../org/apache/juneau/httppart/HttpPartFormat.html" title="enum in org.apache.juneau.httppart"><code>HttpPartFormat</code></a> |
| <ul> |
| <li class='jf'><a href="../../../../../org/apache/juneau/httppart/HttpPartFormat.html#UON"><code>UON</code></a> - UON notation (e.g. <js>"'foo bar'"</js>). |
| <li class='jf'><a href="../../../../../org/apache/juneau/httppart/HttpPartFormat.html#INT32"><code>INT32</code></a> - Signed 32 bits. |
| <li class='jf'><a href="../../../../../org/apache/juneau/httppart/HttpPartFormat.html#INT64"><code>INT64</code></a> - Signed 64 bits. |
| <li class='jf'><a href="../../../../../org/apache/juneau/httppart/HttpPartFormat.html#FLOAT"><code>FLOAT</code></a> - 32-bit floating point number. |
| <li class='jf'><a href="../../../../../org/apache/juneau/httppart/HttpPartFormat.html#DOUBLE"><code>DOUBLE</code></a> - 64-bit floating point number. |
| <li class='jf'><a href="../../../../../org/apache/juneau/httppart/HttpPartFormat.html#BYTE"><code>BYTE</code></a> - BASE-64 encoded characters. |
| <li class='jf'><a href="../../../../../org/apache/juneau/httppart/HttpPartFormat.html#BINARY"><code>BINARY</code></a> - Hexadecimal encoded octets (e.g. <js>"00FF"</js>). |
| <li class='jf'><a href="../../../../../org/apache/juneau/httppart/HttpPartFormat.html#BINARY_SPACED"><code>BINARY_SPACED</code></a> - Spaced-separated hexadecimal encoded octets (e.g. <js>"00 FF"</js>). |
| <li class='jf'><a href="../../../../../org/apache/juneau/httppart/HttpPartFormat.html#DATE"><code>DATE</code></a> - An <a href='http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14'>RFC3339 full-date</a>. |
| <li class='jf'><a href="../../../../../org/apache/juneau/httppart/HttpPartFormat.html#DATE_TIME"><code>DATE_TIME</code></a> - An <a href='http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14'>RFC3339 date-time</a>. |
| <li class='jf'><a href="../../../../../org/apache/juneau/httppart/HttpPartFormat.html#PASSWORD"><code>PASSWORD</code></a> - Used to hint UIs the input needs to be obscured. |
| <li class='jf'><a href="../../../../../org/apache/juneau/httppart/HttpPartFormat.html#NO_FORMAT"><code>NO_FORMAT</code></a> - (default) Not specified. |
| </ul> |
| </ul> |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a REST client with UON part serialization and parsing.</jc> |
| RestClient client = RestClient |
| .<jsm>create</jsm>() |
| .oapiFormat(<jsf>UON</jsf>) |
| .build(); |
| |
| <jc>// Set a header with a value in UON format.</jc> |
| <jv>client</jv> |
| .get(<js>"/uri"</js>) |
| .header(<js>"Foo"</js>, <js>"bar baz"</js>) <jc>// Will be serialized as: 'bar baz'</jc> |
| .run(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/oapi/OpenApiCommon.html#OAPI_format"><code>OpenApiCommon.OAPI_format</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#oapiFormat-org.apache.juneau.httppart.HttpPartFormat-">oapiFormat</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new value for this property. |
| <br>The default value is <a href="../../../../../org/apache/juneau/httppart/HttpPartFormat.html#NO_FORMAT"><code>HttpPartFormat.NO_FORMAT</code></a>.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="openApi--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>openApi</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1213">openApi</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#openApi--">RestClientBuilder</a></code></span></div> |
| <div class="block">Convenience method for specifying OpenAPI as the marshalling transmission media type. |
| |
| <p> |
| OpenAPI is a language that allows serialization to formats that use <a href="../../../../../org/apache/juneau/httppart/HttpPartSchema.html" title="class in org.apache.juneau.httppart"><code>HttpPartSchema</code></a> objects to describe their structure. |
| |
| <p> |
| <a href="../../../../../org/apache/juneau/oapi/OpenApiSerializer.html" title="class in org.apache.juneau.oapi"><code>OpenApiSerializer</code></a> will be used to serialize POJOs to request bodies unless overridden per request via <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#serializer-org.apache.juneau.serializer.Serializer-"><code>RestRequest.serializer(Serializer)</code></a>. |
| <ul> |
| <li>The serializer can be configured using any of the serializer property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#sortCollections--"><code>RestClientBuilder.sortCollections()</code></a>), |
| bean context property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#swaps-java.lang.Object...-"><code>RestClientBuilder.swaps(Object...)</code></a>), or generic property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#set-java.lang.String-java.lang.Object-"><code>RestClientBuilder.set(String, Object)</code></a>) defined on this builder class. |
| <li>Typically the <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#body-java.lang.Object-org.apache.juneau.httppart.HttpPartSchema-"><code>RestRequest.body(Object, HttpPartSchema)</code></a> method will be used to specify the body of the request with the |
| schema describing it's structure. |
| </ul> |
| <p> |
| <a href="../../../../../org/apache/juneau/oapi/OpenApiParser.html" title="class in org.apache.juneau.oapi"><code>OpenApiParser</code></a> will be used to parse POJOs from response bodies unless overridden per request via <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#parser-org.apache.juneau.parser.Parser-"><code>RestRequest.parser(Parser)</code></a>. |
| <ul> |
| <li>The parser can be configured using any of the parser property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#strict--"><code>RestClientBuilder.strict()</code></a>), |
| bean context property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#swaps-java.lang.Object...-"><code>RestClientBuilder.swaps(Object...)</code></a>), or generic property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#set-java.lang.String-java.lang.Object-"><code>RestClientBuilder.set(String, Object)</code></a>) defined on this builder class. |
| <li>Typically the <a href="../../../../../org/apache/juneau/rest/client2/RestResponseBody.html#schema-org.apache.juneau.httppart.HttpPartSchema-"><code>RestResponseBody.schema(HttpPartSchema)</code></a> method will be used to specify the structure of the response body. |
| </ul> |
| <p> |
| <c>Accept</c> request header will be set to <js>"text/openapi"</js> unless overridden |
| by <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#header-java.lang.String-java.lang.Object-"><code>RestClientBuilder.header(String,Object)</code></a> or <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#accept-java.lang.Object-"><code>RestClientBuilder.accept(Object)</code></a>, or per-request via <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#header-java.lang.String-java.lang.Object-"><code>RestRequest.header(String,Object)</code></a> or <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#accept-java.lang.Object-"><code>RestRequest.accept(Object)</code></a>. |
| <p> |
| <c>Content-Type</c> request header will be set to <js>"text/openapi"</js> unless overridden |
| by <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#header-java.lang.String-java.lang.Object-"><code>RestClientBuilder.header(String,Object)</code></a> or <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#contentType-java.lang.Object-"><code>RestClientBuilder.contentType(Object)</code></a>, or per-request via <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#header-java.lang.String-java.lang.Object-"><code>RestRequest.header(String,Object)</code></a> or <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#contentType-java.lang.Object-"><code>RestRequest.contentType(Object)</code></a>. |
| <p> |
| Can be combined with other marshaller setters such as <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#json--"><code>RestClientBuilder.json()</code></a> to provide support for multiple languages. |
| <ul> |
| <li>When multiple languages are supported, the <c>Accept</c> and <c>Content-Type</c> headers control which marshallers are used, or uses the |
| last-enabled language if the headers are not set. |
| </ul> |
| <p> |
| Identical to calling <c>serializer(OpenApiSerializer.<jk>class</jk>).parser(OpenApiParser.<jk>class</jk>)</c>. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Construct a client that uses OpenAPI marshalling.</jc> |
| RestClient <jv>client</jv> = RestClient.<jsm>create</jsm>().openApi().build(); |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#openApi--">openApi</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="origin-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>origin</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1219">origin</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#origin-java.lang.Object-">RestClientBuilder</a></code></span></div> |
| <div class="block">Sets the value for the <c>Origin</c> request header on all requests. |
| |
| <p> |
| This is a shortcut for calling <code>header(<js>"Origin"</js>, value);</code></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#origin-java.lang.Object-">origin</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new header value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="paramFormat-org.apache.juneau.uon.ParamFormat-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>paramFormat</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1225">paramFormat</a>(<a href="../../../../../org/apache/juneau/uon/ParamFormat.html" title="enum in org.apache.juneau.uon">ParamFormat</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#paramFormat-org.apache.juneau.uon.ParamFormat-">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>UonSerializer</l> configuration property: </i> Parameter format. |
| |
| <p> |
| Specifies the format of parameters when using the <a href="../../../../../org/apache/juneau/urlencoding/UrlEncodingSerializer.html" title="class in org.apache.juneau.urlencoding"><code>UrlEncodingSerializer</code></a> to serialize Form Posts. |
| |
| <p> |
| Specifies the format to use for GET parameter keys and values. |
| |
| <p> |
| Possible values: |
| <ul class='javatree'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/uon/ParamFormat.html#UON"><code>ParamFormat.UON</code></a> (default) - Use UON notation for parameters. |
| <li class='jf'><a href="../../../../../org/apache/juneau/uon/ParamFormat.html#PLAINTEXT"><code>ParamFormat.PLAINTEXT</code></a> - Use plain text for parameters. |
| </ul> |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a REST client with URL-Encoded serializer that serializes values in plain-text format.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .urlEnc() |
| .paramFormat(<jsf>PLAINTEXT</jsf>) |
| .build(); |
| |
| <jc>// An arbitrary data structure.</jc> |
| AMap <jv>map</jv> = AMap.<jsm>of</jsm>( |
| <js>"foo"</js>, <js>"bar"</js>, |
| <js>"baz"</js>, <jk>new</jk> String[]{<js>"qux"</js>, <js>"true"</js>, <js>"123"</js>} |
| ); |
| |
| <jc>// Request body will be serialized as: foo=bar,baz=qux,true,123</jc> |
| <jv>client</jv> |
| .post(<js>"/uri"</js>, <jv>map</jv>) |
| .run(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/uon/UonSerializer.html#UON_paramFormat"><code>UonSerializer.UON_paramFormat</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#paramFormat-org.apache.juneau.uon.ParamFormat-">paramFormat</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new value for this property.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="paramFormatPlain--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>paramFormatPlain</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1231">paramFormatPlain</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#paramFormatPlain--">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>UonSerializer</l> configuration property: </i> Parameter format. |
| |
| <p> |
| Specifies the format of parameters when using the <a href="../../../../../org/apache/juneau/urlencoding/UrlEncodingSerializer.html" title="class in org.apache.juneau.urlencoding"><code>UrlEncodingSerializer</code></a> to serialize Form Posts. |
| |
| <p> |
| Specifies plaintext as the format to use for GET parameter keys and values. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a REST client with URL-Encoded serializer that serializes values in plain-text format.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .urlEnc() |
| .build(); |
| |
| <jc>// An arbitrary data structure.</jc> |
| AMap <jv>map</jv> = AMap.<jsm>of</jsm>( |
| <js>"foo"</js>, <js>"bar"</js>, |
| <js>"baz"</js>, <jk>new</jk> String[]{<js>"qux"</js>, <js>"true"</js>, <js>"123"</js>} |
| ); |
| |
| <jc>// Request body will be serialized as: foo=bar,baz=qux,true,123</jc> |
| <jv>client</jv> |
| .post(<js>"/uri"</js>, <jv>map</jv>) |
| .run(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/uon/UonSerializer.html#UON_paramFormat"><code>UonSerializer.UON_paramFormat</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#paramFormatPlain--">paramFormatPlain</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="parser-java.lang.Class-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>parser</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1237">parser</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="../../../../../org/apache/juneau/parser/Parser.html" title="class in org.apache.juneau.parser">Parser</a>> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#parser-java.lang.Class-">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Parser. |
| |
| <p> |
| Associates the specified <a href="../../../../../org/apache/juneau/parser/Parser.html" title="class in org.apache.juneau.parser"><code>Parser</code></a> with the HTTP client. |
| |
| <p> |
| The parser is used to parse the HTTP response body into a POJO. |
| |
| <ul class='notes'> |
| <li>When using this method that takes in a class, the parser can be configured using any of the parser property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#strict--"><code>RestClientBuilder.strict()</code></a>), |
| bean context property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#swaps-java.lang.Object...-"><code>RestClientBuilder.swaps(Object...)</code></a>), or generic property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#set-java.lang.String-java.lang.Object-"><code>RestClientBuilder.set(String, Object)</code></a>) defined on this builder class. |
| </ul> |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a client that uses JSON transport for response bodies.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .parser(JsonParser.<jk>class</jk>) |
| .strict() <jc>// Enable strict mode on JsonParser.</jc> |
| .build(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/rest/client2/RestClient.html#RESTCLIENT_parsers"><code>RestClient.RESTCLIENT_parsers</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#parser-java.lang.Class-">parser</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new value for this setting. |
| <br>The default value is <a href="../../../../../org/apache/juneau/json/JsonParser.html#DEFAULT"><code>JsonParser.DEFAULT</code></a>.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="parser-org.apache.juneau.parser.Parser-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>parser</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1243">parser</a>(<a href="../../../../../org/apache/juneau/parser/Parser.html" title="class in org.apache.juneau.parser">Parser</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#parser-org.apache.juneau.parser.Parser-">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Parser. |
| |
| <p> |
| Associates the specified <a href="../../../../../org/apache/juneau/parser/Parser.html" title="class in org.apache.juneau.parser"><code>Parser</code></a> with the HTTP client. |
| |
| <p> |
| The parser is used to parse the HTTP response body into a POJO. |
| |
| <ul class='notes'> |
| <li>When using this method that takes in a pre-instantiated parser, the parser property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#strict--"><code>RestClientBuilder.strict()</code></a>), |
| bean context property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#swaps-java.lang.Object...-"><code>RestClientBuilder.swaps(Object...)</code></a>), or generic property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#set-java.lang.String-java.lang.Object-"><code>RestClientBuilder.set(String, Object)</code></a>) defined |
| on this builder class have no effect. |
| </ul> |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a client that uses a predefined JSON parser for response bodies.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .parser(JsonParser.<jsf>DEFAULT_STRICT</jsf>) |
| .build(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/rest/client2/RestClient.html#RESTCLIENT_parsers"><code>RestClient.RESTCLIENT_parsers</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#parser-org.apache.juneau.parser.Parser-">parser</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new value for this setting. |
| <br>The default value is <a href="../../../../../org/apache/juneau/json/JsonParser.html#DEFAULT"><code>JsonParser.DEFAULT</code></a>.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="parsers-java.lang.Class...-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>parsers</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1250">parsers</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="../../../../../org/apache/juneau/parser/Parser.html" title="class in org.apache.juneau.parser">Parser</a>>... value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#parsers-java.lang.Class...-">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Parsers. |
| |
| <p> |
| Associates the specified <a href="../../../../../org/apache/juneau/parser/Parser.html" title="class in org.apache.juneau.parser"><code>Parsers</code></a> with the HTTP client. |
| |
| <p> |
| The parsers are used to parse the HTTP response body into a POJO. |
| |
| <p> |
| The parser that best matches the <c>Accept</c> header will be used to parse the response body. |
| <br>If no <c>Accept</c> header is specified, the first parser in the list will be used. |
| |
| <ul class='notes'> |
| <li>When using this method that takes in classes, the parsers can be configured using any of the parser property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#strict--"><code>RestClientBuilder.strict()</code></a>), |
| bean context property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#swaps-java.lang.Object...-"><code>RestClientBuilder.swaps(Object...)</code></a>), or generic property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#set-java.lang.String-java.lang.Object-"><code>RestClientBuilder.set(String, Object)</code></a>) defined on this builder class. |
| </ul> |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a client that uses JSON and XML transport for response bodies.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .parser(JsonParser.<jk>class</jk>, XmlParser.<jk>class</jk>) |
| .strict() <jc>// Enable strict mode on parsers.</jc> |
| .build(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/rest/client2/RestClient.html#RESTCLIENT_parsers"><code>RestClient.RESTCLIENT_parsers</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#parsers-java.lang.Class...-">parsers</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new value for this setting. |
| <br>The default value is <a href="../../../../../org/apache/juneau/json/JsonParser.html#DEFAULT"><code>JsonParser.DEFAULT</code></a>.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="parsers-org.apache.juneau.parser.Parser...-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>parsers</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1256">parsers</a>(<a href="../../../../../org/apache/juneau/parser/Parser.html" title="class in org.apache.juneau.parser">Parser</a>... value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#parsers-org.apache.juneau.parser.Parser...-">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Parsers. |
| |
| <p> |
| Associates the specified <a href="../../../../../org/apache/juneau/parser/Parser.html" title="class in org.apache.juneau.parser"><code>Parsers</code></a> with the HTTP client. |
| |
| <p> |
| The parsers are used to parse the HTTP response body into a POJO. |
| |
| <p> |
| The parser that best matches the <c>Accept</c> header will be used to parse the response body. |
| <br>If no <c>Accept</c> header is specified, the first parser in the list will be used. |
| |
| <ul class='notes'> |
| <li>When using this method that takes in pre-instantiated parsers, the parser property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#strict--"><code>RestClientBuilder.strict()</code></a>), |
| bean context property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#swaps-java.lang.Object...-"><code>RestClientBuilder.swaps(Object...)</code></a>), or generic property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#set-java.lang.String-java.lang.Object-"><code>RestClientBuilder.set(String, Object)</code></a>) defined |
| on this builder class have no effect. |
| </ul> |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a client that uses JSON and XML transport for response bodies.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .parser(JsonParser.<jsf>DEFAULT_STRICT</jsf>, XmlParser.<jsf>DEFAULT</jsf>) |
| .build(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/rest/client2/RestClient.html#RESTCLIENT_parsers"><code>RestClient.RESTCLIENT_parsers</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#parsers-org.apache.juneau.parser.Parser...-">parsers</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new value for this setting. |
| <br>The default value is <a href="../../../../../org/apache/juneau/json/JsonParser.html#DEFAULT"><code>JsonParser.DEFAULT</code></a>.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="partParser-java.lang.Class-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>partParser</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1262">partParser</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="../../../../../org/apache/juneau/httppart/HttpPartParser.html" title="interface in org.apache.juneau.httppart">HttpPartParser</a>> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#partParser-java.lang.Class-">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Part parser. |
| |
| <p> |
| The parser to use for parsing POJOs from form data, query parameters, headers, and path variables. |
| |
| <p> |
| The default part parser is <a href="../../../../../org/apache/juneau/oapi/OpenApiParser.html" title="class in org.apache.juneau.oapi"><code>OpenApiParser</code></a> which allows for schema-driven marshalling. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a client that uses UON format by default for incoming HTTP parts.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .partParser(UonParser.<jk>class</jk>) |
| .build(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/rest/client2/RestClient.html#RESTCLIENT_partParser"><code>RestClient.RESTCLIENT_partParser</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#partParser-java.lang.Class-">partParser</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new value for this setting. |
| <br>The default value is <a href="../../../../../org/apache/juneau/oapi/OpenApiParser.html" title="class in org.apache.juneau.oapi"><code>OpenApiParser</code></a>.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="partParser-org.apache.juneau.httppart.HttpPartParser-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>partParser</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1268">partParser</a>(<a href="../../../../../org/apache/juneau/httppart/HttpPartParser.html" title="interface in org.apache.juneau.httppart">HttpPartParser</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#partParser-org.apache.juneau.httppart.HttpPartParser-">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Part parser. |
| |
| <p> |
| The parser to use for parsing POJOs from form data, query parameters, headers, and path variables. |
| |
| <p> |
| The default part parser is <a href="../../../../../org/apache/juneau/oapi/OpenApiParser.html" title="class in org.apache.juneau.oapi"><code>OpenApiParser</code></a> which allows for schema-driven marshalling. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a client that uses UON format by default for incoming HTTP parts.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .partParser(UonParser.<jsf>DEFAULT</jsf>) |
| .build(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/rest/client2/RestClient.html#RESTCLIENT_partParser"><code>RestClient.RESTCLIENT_partParser</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#partParser-org.apache.juneau.httppart.HttpPartParser-">partParser</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new value for this setting. |
| <br>The default value is <a href="../../../../../org/apache/juneau/oapi/OpenApiParser.html" title="class in org.apache.juneau.oapi"><code>OpenApiParser</code></a>.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="partSerializer-java.lang.Class-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>partSerializer</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1274">partSerializer</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="../../../../../org/apache/juneau/httppart/HttpPartSerializer.html" title="interface in org.apache.juneau.httppart">HttpPartSerializer</a>> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#partSerializer-java.lang.Class-">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Part serializer. |
| |
| <p> |
| The serializer to use for serializing POJOs in form data, query parameters, headers, and path variables. |
| |
| <p> |
| The default part serializer is <a href="../../../../../org/apache/juneau/oapi/OpenApiSerializer.html" title="class in org.apache.juneau.oapi"><code>OpenApiSerializer</code></a> which allows for schema-driven marshalling. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a client that uses UON format by default for outgoing HTTP parts.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .partSerializer(UonSerializer.<jk>class</jk>) |
| .build(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/rest/client2/RestClient.html#RESTCLIENT_partSerializer"><code>RestClient.RESTCLIENT_partSerializer</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#partSerializer-java.lang.Class-">partSerializer</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new value for this setting. |
| <br>The default value is <a href="../../../../../org/apache/juneau/oapi/OpenApiSerializer.html" title="class in org.apache.juneau.oapi"><code>OpenApiSerializer</code></a>.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="partSerializer-org.apache.juneau.httppart.HttpPartSerializer-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>partSerializer</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1280">partSerializer</a>(<a href="../../../../../org/apache/juneau/httppart/HttpPartSerializer.html" title="interface in org.apache.juneau.httppart">HttpPartSerializer</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#partSerializer-org.apache.juneau.httppart.HttpPartSerializer-">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Part serializer. |
| |
| <p> |
| The serializer to use for serializing POJOs in form data, query parameters, headers, and path variables. |
| |
| <p> |
| The default part serializer is <a href="../../../../../org/apache/juneau/oapi/OpenApiSerializer.html" title="class in org.apache.juneau.oapi"><code>OpenApiSerializer</code></a> which allows for schema-driven marshalling. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a client that uses UON format by default for outgoing HTTP parts.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .partSerializer(UonSerializer.<jsf>DEFAULT</jsf>) |
| .build(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/rest/client2/RestClient.html#RESTCLIENT_partSerializer"><code>RestClient.RESTCLIENT_partSerializer</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#partSerializer-org.apache.juneau.httppart.HttpPartSerializer-">partSerializer</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new value for this setting. |
| <br>The default value is <a href="../../../../../org/apache/juneau/oapi/OpenApiSerializer.html" title="class in org.apache.juneau.oapi"><code>OpenApiSerializer</code></a>.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="plainText--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>plainText</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1286">plainText</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#plainText--">RestClientBuilder</a></code></span></div> |
| <div class="block">Convenience method for specifying Plain Text as the marshalling transmission media type. |
| |
| <p> |
| Plain text marshalling typically only works on simple POJOs that can be converted to and from strings using |
| swaps, swap methods, etc... |
| |
| <p> |
| <a href="../../../../../org/apache/juneau/plaintext/PlainTextSerializer.html" title="class in org.apache.juneau.plaintext"><code>PlainTextSerializer</code></a> will be used to serialize POJOs to request bodies unless overridden per request via <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#serializer-org.apache.juneau.serializer.Serializer-"><code>RestRequest.serializer(Serializer)</code></a>. |
| <ul> |
| <li>The serializer can be configured using any of the serializer property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#sortCollections--"><code>RestClientBuilder.sortCollections()</code></a>), |
| bean context property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#swaps-java.lang.Object...-"><code>RestClientBuilder.swaps(Object...)</code></a>), or generic property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#set-java.lang.String-java.lang.Object-"><code>RestClientBuilder.set(String, Object)</code></a>) defined on this builder class. |
| </ul> |
| <p> |
| <a href="../../../../../org/apache/juneau/plaintext/PlainTextParser.html" title="class in org.apache.juneau.plaintext"><code>PlainTextParser</code></a> will be used to parse POJOs from response bodies unless overridden per request via <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#parser-org.apache.juneau.parser.Parser-"><code>RestRequest.parser(Parser)</code></a>. |
| <ul> |
| <li>The parser can be configured using any of the parser property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#strict--"><code>RestClientBuilder.strict()</code></a>), |
| bean context property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#swaps-java.lang.Object...-"><code>RestClientBuilder.swaps(Object...)</code></a>), or generic property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#set-java.lang.String-java.lang.Object-"><code>RestClientBuilder.set(String, Object)</code></a>) defined on this builder class. |
| </ul> |
| <p> |
| <c>Accept</c> request header will be set to <js>"text/plain"</js> unless overridden |
| by <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#header-java.lang.String-java.lang.Object-"><code>RestClientBuilder.header(String,Object)</code></a> or <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#accept-java.lang.Object-"><code>RestClientBuilder.accept(Object)</code></a>, or per-request via <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#header-java.lang.String-java.lang.Object-"><code>RestRequest.header(String,Object)</code></a> or <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#accept-java.lang.Object-"><code>RestRequest.accept(Object)</code></a>. |
| <p> |
| <c>Content-Type</c> request header will be set to <js>"text/plain"</js> unless overridden |
| by <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#header-java.lang.String-java.lang.Object-"><code>RestClientBuilder.header(String,Object)</code></a> or <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#contentType-java.lang.Object-"><code>RestClientBuilder.contentType(Object)</code></a>, or per-request via <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#header-java.lang.String-java.lang.Object-"><code>RestRequest.header(String,Object)</code></a> or <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#contentType-java.lang.Object-"><code>RestRequest.contentType(Object)</code></a>. |
| <p> |
| Can be combined with other marshaller setters such as <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#json--"><code>RestClientBuilder.json()</code></a> to provide support for multiple languages. |
| <ul> |
| <li>When multiple languages are supported, the <c>Accept</c> and <c>Content-Type</c> headers control which marshallers are used, or uses the |
| last-enabled language if the headers are not set. |
| </ul> |
| <p> |
| Identical to calling <c>serializer(PlainTextSerializer.<jk>class</jk>).parser(PlainTextParser.<jk>class</jk>)</c>. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Construct a client that uses Plain Text marshalling.</jc> |
| RestClient <jv>client</jv> = RestClient.<jsm>create</jsm>().plainText().build(); |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#plainText--">plainText</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="pooled--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>pooled</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1292">pooled</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#pooled--">RestClientBuilder</a></code></span></div> |
| <div class="block">When called, the <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#createConnectionManager--"><code>RestClientBuilder.createConnectionManager()</code></a> method will return a <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/conn/PoolingHttpClientConnectionManager.html?is-external=true" title="class or interface in org.apache.http.impl.conn"><code>PoolingHttpClientConnectionManager</code></a> |
| instead of a <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/conn/BasicHttpClientConnectionManager.html?is-external=true" title="class or interface in org.apache.http.impl.conn"><code>BasicHttpClientConnectionManager</code></a>. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Construct a client that uses pooled connections.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .pooled() |
| .build(); |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#pooled--">pooled</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="pragma-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>pragma</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1298">pragma</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#pragma-java.lang.Object-">RestClientBuilder</a></code></span></div> |
| <div class="block">Sets the value for the <c>Pragma</c> request header on all requests. |
| |
| <p> |
| This is a shortcut for calling <code>header(<js>"Pragma"</js>, value);</code></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#pragma-java.lang.Object-">pragma</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new header value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="proxy-org.apache.http.HttpHost-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>proxy</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1304">proxy</a>(<a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/HttpHost.html?is-external=true" title="class or interface in org.apache.http">HttpHost</a> proxy)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#proxy-org.apache.http.HttpHost-">RestClientBuilder</a></code></span></div> |
| <div class="block">Assigns default proxy value. |
| |
| <ul class='notes'> |
| <li>This value can be overridden by the <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#routePlanner-org.apache.http.conn.routing.HttpRoutePlanner-"><code>RestClientBuilder.routePlanner(HttpRoutePlanner)</code></a> method. |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#proxy-org.apache.http.HttpHost-">proxy</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>proxy</code> - New property value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true#setProxy-org.apache.http.HttpHost-" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder.setProxy(HttpHost)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="proxyAuthenticationStrategy-org.apache.http.client.AuthenticationStrategy-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>proxyAuthenticationStrategy</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1310">proxyAuthenticationStrategy</a>(<a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/AuthenticationStrategy.html?is-external=true" title="class or interface in org.apache.http.client">AuthenticationStrategy</a> proxyAuthStrategy)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#proxyAuthenticationStrategy-org.apache.http.client.AuthenticationStrategy-">RestClientBuilder</a></code></span></div> |
| <div class="block">Assigns <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/AuthenticationStrategy.html?is-external=true" title="class or interface in org.apache.http.client"><code>AuthenticationStrategy</code></a> instance for proxy authentication.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#proxyAuthenticationStrategy-org.apache.http.client.AuthenticationStrategy-">proxyAuthenticationStrategy</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>proxyAuthStrategy</code> - New property value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true#setProxyAuthenticationStrategy-org.apache.http.client.AuthenticationStrategy-" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder.setProxyAuthenticationStrategy(AuthenticationStrategy)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="proxyAuthorization-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>proxyAuthorization</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1316">proxyAuthorization</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#proxyAuthorization-java.lang.Object-">RestClientBuilder</a></code></span></div> |
| <div class="block">Sets the value for the <c>Proxy-Authorization</c> request header on all requests. |
| |
| <p> |
| This is a shortcut for calling <code>header(<js>"Proxy-Authorization"</js>, value);</code></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#proxyAuthorization-java.lang.Object-">proxyAuthorization</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new header value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="publicSuffixMatcher-org.apache.http.conn.util.PublicSuffixMatcher-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>publicSuffixMatcher</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1322">publicSuffixMatcher</a>(<a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/conn/util/PublicSuffixMatcher.html?is-external=true" title="class or interface in org.apache.http.conn.util">PublicSuffixMatcher</a> publicSuffixMatcher)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#publicSuffixMatcher-org.apache.http.conn.util.PublicSuffixMatcher-">RestClientBuilder</a></code></span></div> |
| <div class="block">Assigns file containing public suffix matcher. |
| |
| <ul class='notes'> |
| <li>Instances of this class can be created with <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/conn/util/PublicSuffixMatcherLoader.html?is-external=true" title="class or interface in org.apache.http.conn.util"><code>PublicSuffixMatcherLoader</code></a>. |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#publicSuffixMatcher-org.apache.http.conn.util.PublicSuffixMatcher-">publicSuffixMatcher</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>publicSuffixMatcher</code> - New property value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true#setPublicSuffixMatcher-org.apache.http.conn.util.PublicSuffixMatcher-" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder.setPublicSuffixMatcher(PublicSuffixMatcher)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="queries-java.lang.Object...-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>queries</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1328">queries</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>... params)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#queries-java.lang.Object...-">RestClientBuilder</a></code></span></div> |
| <div class="block">Adds a query parameter to the URI. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .queries(BasicNameValuePair.<jsm>of</jsm>(<js>"foo"</js>, <js>"bar"</js>)) |
| .build(); |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#queries-java.lang.Object...-">queries</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>params</code> - The query parameters. |
| <br>Can be any of the following types: |
| <ul> |
| <li><a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/NameValuePair.html?is-external=true" title="class or interface in org.apache.http"><code>NameValuePair</code></a> |
| <li><a href="../../../../../org/apache/juneau/http/NameValuePairable.html" title="interface in org.apache.juneau.http"><code>NameValuePairable</code></a> |
| <li><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.Entry.html?is-external=true" title="class or interface in java.util"><code>Map.Entry</code></a> |
| <li><a href="../../../../../org/apache/juneau/http/NameValuePairSupplier.html" title="class in org.apache.juneau.http"><code>NameValuePairSupplier</code></a> |
| <li><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><code>Map</code></a> |
| <ul> |
| <li>Values can be any POJO. |
| <li>Values converted to a string using the configured part serializer. |
| </ul> |
| <li>A collection or array of anything on this list. |
| </ul></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="query-org.apache.http.NameValuePair-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>query</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1334">query</a>(<a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/NameValuePair.html?is-external=true" title="class or interface in org.apache.http">NameValuePair</a> pair)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#query-org.apache.http.NameValuePair-">RestClientBuilder</a></code></span></div> |
| <div class="block">Adds a query parameter to the URI. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .query(BasicNameValuePair.<jsm>of</jsm>(<js>"foo"</js>, <js>"bar"</js>)) |
| .build(); |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#query-org.apache.http.NameValuePair-">query</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>pair</code> - The query parameter.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="query-java.lang.String-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>query</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1340">query</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#query-java.lang.String-java.lang.Object-">RestClientBuilder</a></code></span></div> |
| <div class="block">Adds a query parameter to the URI. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .query(<js>"foo"</js>, <js>"bar"</js>) |
| .build(); |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#query-java.lang.String-java.lang.Object-">query</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - The parameter name.</dd> |
| <dd><code>value</code> - The parameter value. |
| <ul> |
| <li>Can be any POJO. |
| <li>Converted to a string using the specified part serializer. |
| </ul></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="query-java.lang.String-java.util.function.Supplier-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>query</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1346">query</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function">Supplier</a><?> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#query-java.lang.String-java.util.function.Supplier-">RestClientBuilder</a></code></span></div> |
| <div class="block">Adds a query parameter with a dynamic value to the URI. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .query(<js>"foo"</js>, ()-><js>"bar"</js>) |
| .build(); |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#query-java.lang.String-java.util.function.Supplier-">query</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - The parameter name.</dd> |
| <dd><code>value</code> - The parameter value supplier. |
| <ul> |
| <li>Can be any POJO. |
| <li>Converted to a string using the specified part serializer. |
| </ul></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="query-java.lang.String-java.lang.Object-org.apache.juneau.httppart.HttpPartSchema-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>query</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1352">query</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value, |
| <a href="../../../../../org/apache/juneau/httppart/HttpPartSchema.html" title="class in org.apache.juneau.httppart">HttpPartSchema</a> schema)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#query-java.lang.String-java.lang.Object-org.apache.juneau.httppart.HttpPartSchema-">RestClientBuilder</a></code></span></div> |
| <div class="block">Adds a query parameter to the URI. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| String[] <jv>value</jv> = {<js>"foo"</js>,<js>"bar"</js>}; |
| |
| <jc>// Adds query parameter "foo=foo|bar" to all requests.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .query(<js>"foo"</js>, <jv>value</jv>, HttpPartSchema.<jsf>T_ARRAY_PIPES</jsf>); |
| .build(); |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#query-java.lang.String-java.lang.Object-org.apache.juneau.httppart.HttpPartSchema-">query</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - The parameter name.</dd> |
| <dd><code>value</code> - The parameter value. |
| <ul> |
| <li>Can be any POJO. |
| <li>Converted to a string using the specified part serializer. |
| </ul></dd> |
| <dd><code>schema</code> - The schema object that defines the format of the output. |
| <ul> |
| <li>If <jk>null</jk>, defaults to <a href="../../../../../org/apache/juneau/httppart/HttpPartSchema.html#DEFAULT"><code>HttpPartSchema.DEFAULT</code></a>. |
| <li>Only used if serializer is schema-aware (e.g. <a href="../../../../../org/apache/juneau/oapi/OpenApiSerializer.html" title="class in org.apache.juneau.oapi"><code>OpenApiSerializer</code></a>). |
| </ul></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="query-java.lang.String-java.util.function.Supplier-org.apache.juneau.httppart.HttpPartSchema-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>query</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1358">query</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function">Supplier</a><?> value, |
| <a href="../../../../../org/apache/juneau/httppart/HttpPartSchema.html" title="class in org.apache.juneau.httppart">HttpPartSchema</a> schema)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#query-java.lang.String-java.util.function.Supplier-org.apache.juneau.httppart.HttpPartSchema-">RestClientBuilder</a></code></span></div> |
| <div class="block">Adds a query parameter with a dynamic value to the URI. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| String[] <jv>value</jv> = {<js>"foo"</js>,<js>"bar"</js>}; |
| |
| <jc>// Adds query parameter "foo=foo|bar" to all requests.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .query(<js>"foo"</js>, ()-><jv>value</jv>, HttpPartSchema.<jsf>T_ARRAY_PIPES</jsf>); |
| .build(); |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#query-java.lang.String-java.util.function.Supplier-org.apache.juneau.httppart.HttpPartSchema-">query</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - The parameter name.</dd> |
| <dd><code>value</code> - The parameter value supplier. |
| <ul> |
| <li>Can be any POJO. |
| <li>Converted to a string using the specified part serializer. |
| </ul></dd> |
| <dd><code>schema</code> - The schema object that defines the format of the output. |
| <ul> |
| <li>If <jk>null</jk>, defaults to <a href="../../../../../org/apache/juneau/httppart/HttpPartSchema.html#DEFAULT"><code>HttpPartSchema.DEFAULT</code></a>. |
| <li>Only used if serializer is schema-aware (e.g. <a href="../../../../../org/apache/juneau/oapi/OpenApiSerializer.html" title="class in org.apache.juneau.oapi"><code>OpenApiSerializer</code></a>). |
| </ul></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="query-java.lang.String-java.lang.Object-org.apache.juneau.httppart.HttpPartSchema-org.apache.juneau.httppart.HttpPartSerializer-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>query</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1364">query</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value, |
| <a href="../../../../../org/apache/juneau/httppart/HttpPartSchema.html" title="class in org.apache.juneau.httppart">HttpPartSchema</a> schema, |
| <a href="../../../../../org/apache/juneau/httppart/HttpPartSerializer.html" title="interface in org.apache.juneau.httppart">HttpPartSerializer</a> serializer)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#query-java.lang.String-java.lang.Object-org.apache.juneau.httppart.HttpPartSchema-org.apache.juneau.httppart.HttpPartSerializer-">RestClientBuilder</a></code></span></div> |
| <div class="block">Adds a query parameter to the URI. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| String[] <jv>value</jv> = {<js>"foo"</js>,<js>"bar"</js>}; |
| |
| <jc>// Adds query parameter "foo=foo|bar" to all requests.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .query(<js>"foo"</js>, <jv>value</jv>, HttpPartSchema.<jsf>T_ARRAY_PIPES</jsf>, <jv>myPartSerializer</jv>); |
| .build(); |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#query-java.lang.String-java.lang.Object-org.apache.juneau.httppart.HttpPartSchema-org.apache.juneau.httppart.HttpPartSerializer-">query</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - The parameter name.</dd> |
| <dd><code>value</code> - The parameter value. |
| <ul> |
| <li>Can be any POJO. |
| <li>Converted to a string using the specified part serializer. |
| </ul></dd> |
| <dd><code>schema</code> - The schema object that defines the format of the output. |
| <ul> |
| <li>If <jk>null</jk>, defaults to <a href="../../../../../org/apache/juneau/httppart/HttpPartSchema.html#DEFAULT"><code>HttpPartSchema.DEFAULT</code></a>. |
| <li>Only used if serializer is schema-aware (e.g. <a href="../../../../../org/apache/juneau/oapi/OpenApiSerializer.html" title="class in org.apache.juneau.oapi"><code>OpenApiSerializer</code></a>). |
| </ul></dd> |
| <dd><code>serializer</code> - The serializer to use for serializing the value to a string. |
| <ul> |
| <li>If <jk>null</jk>, then the <a href="../../../../../org/apache/juneau/httppart/HttpPartSerializer.html" title="interface in org.apache.juneau.httppart"><code>HttpPartSerializer</code></a> defined on the client is used (<a href="../../../../../org/apache/juneau/oapi/OpenApiSerializer.html" title="class in org.apache.juneau.oapi"><code>OpenApiSerializer</code></a> by default). |
| </ul></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="query-java.lang.String-java.util.function.Supplier-org.apache.juneau.httppart.HttpPartSchema-org.apache.juneau.httppart.HttpPartSerializer-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>query</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1370">query</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function">Supplier</a><?> value, |
| <a href="../../../../../org/apache/juneau/httppart/HttpPartSchema.html" title="class in org.apache.juneau.httppart">HttpPartSchema</a> schema, |
| <a href="../../../../../org/apache/juneau/httppart/HttpPartSerializer.html" title="interface in org.apache.juneau.httppart">HttpPartSerializer</a> serializer)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#query-java.lang.String-java.util.function.Supplier-org.apache.juneau.httppart.HttpPartSchema-org.apache.juneau.httppart.HttpPartSerializer-">RestClientBuilder</a></code></span></div> |
| <div class="block">Adds a query parameter with a dynamic value to the URI. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| String[] <jv>value</jv> = {<js>"foo"</js>,<js>"bar"</js>}; |
| |
| <jc>// Adds query parameter "foo=foo|bar" to all requests.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .query(<js>"foo"</js>, ()-><jv>value</jv>, HttpPartSchema.<jsf>T_ARRAY_PIPES</jsf>, <jv>myPartSerializer</jv>); |
| .build(); |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#query-java.lang.String-java.util.function.Supplier-org.apache.juneau.httppart.HttpPartSchema-org.apache.juneau.httppart.HttpPartSerializer-">query</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - The parameter name.</dd> |
| <dd><code>value</code> - The parameter value supplier. |
| <ul> |
| <li>Can be any POJO. |
| <li>Converted to a string using the specified part serializer. |
| </ul></dd> |
| <dd><code>schema</code> - The schema object that defines the format of the output. |
| <ul> |
| <li>If <jk>null</jk>, defaults to <a href="../../../../../org/apache/juneau/httppart/HttpPartSchema.html#DEFAULT"><code>HttpPartSchema.DEFAULT</code></a>. |
| <li>Only used if serializer is schema-aware (e.g. <a href="../../../../../org/apache/juneau/oapi/OpenApiSerializer.html" title="class in org.apache.juneau.oapi"><code>OpenApiSerializer</code></a>). |
| </ul></dd> |
| <dd><code>serializer</code> - The serializer to use for serializing the value to a string. |
| <ul> |
| <li>If <jk>null</jk>, then the <a href="../../../../../org/apache/juneau/httppart/HttpPartSerializer.html" title="interface in org.apache.juneau.httppart"><code>HttpPartSerializer</code></a> defined on the client is used (<a href="../../../../../org/apache/juneau/oapi/OpenApiSerializer.html" title="class in org.apache.juneau.oapi"><code>OpenApiSerializer</code></a> by default). |
| </ul></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="queryPairs-java.lang.Object...-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>queryPairs</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1376">queryPairs</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>... pairs)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#queryPairs-java.lang.Object...-">RestClientBuilder</a></code></span></div> |
| <div class="block">Adds query parameters to the URI query using free-form key/value pairs. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .queryPairs(<js>"key1"</js>,<js>"val1"</js>,<js>"key2"</js>,<js>"val2"</js>) |
| .build(); |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#queryPairs-java.lang.Object...-">queryPairs</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>pairs</code> - The query key/value pairs. |
| <ul> |
| <li>Values can be any POJO. |
| <li>Values converted to a string using the configured part serializer. |
| </ul></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="quoteChar-char-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>quoteChar</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1382">quoteChar</a>(char value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#quoteChar-char-">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>WriterSerializer</l> configuration property: </i> Quote character. |
| |
| <p> |
| Specifies the character to use for quoting attributes and values. |
| |
| <ul class='notes'> |
| <li>This setting does not apply to the RDF serializers. |
| </ul> |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a REST client with JSON serializer that uses single quotes.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .json() |
| .quoteChar(<js>'\''</js>) |
| .build(); |
| |
| <jc>// A bean with a single property</jc> |
| <jk>public class</jk> MyBean { |
| <jk>public</jk> String <jf>foo</jf> = <js>"bar"</js>; |
| } |
| |
| <jc>// Request body will contain: {'foo':'bar'}</jc> |
| <jv>client</jv> |
| .doPost(<js>"http://localhost:10000/foo"</js>, <jk>new</jk> MyBean()) |
| .run(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/serializer/WriterSerializer.html#WSERIALIZER_quoteChar"><code>WriterSerializer.WSERIALIZER_quoteChar</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#quoteChar-char-">quoteChar</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new value for this property. |
| <br>The default is <js>'"'</js>.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="range-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>range</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1388">range</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#range-java.lang.Object-">RestClientBuilder</a></code></span></div> |
| <div class="block">Sets the value for the <c>Range</c> request header on all requests. |
| |
| <p> |
| This is a shortcut for calling <code>header(<js>"Range"</js>, value);</code></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#range-java.lang.Object-">range</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new header value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="redirectStrategy-org.apache.http.client.RedirectStrategy-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>redirectStrategy</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1394">redirectStrategy</a>(<a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/RedirectStrategy.html?is-external=true" title="class or interface in org.apache.http.client">RedirectStrategy</a> redirectStrategy)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#redirectStrategy-org.apache.http.client.RedirectStrategy-">RestClientBuilder</a></code></span></div> |
| <div class="block">Assigns <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/RedirectStrategy.html?is-external=true" title="class or interface in org.apache.http.client"><code>RedirectStrategy</code></a> instance. |
| |
| <ul class='notes'> |
| <li>This value can be overridden by the <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#disableRedirectHandling--"><code>RestClientBuilder.disableRedirectHandling()</code></a> method. |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#redirectStrategy-org.apache.http.client.RedirectStrategy-">redirectStrategy</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>redirectStrategy</code> - New property value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true#setRedirectStrategy-org.apache.http.client.RedirectStrategy-" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder.setRedirectStrategy(RedirectStrategy)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="referer-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>referer</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1400">referer</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#referer-java.lang.Object-">RestClientBuilder</a></code></span></div> |
| <div class="block">Sets the value for the <c>Referer</c> request header on all requests. |
| |
| <p> |
| This is a shortcut for calling <code>header(<js>"Referer"</js>, value);</code></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#referer-java.lang.Object-">referer</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new header value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="requestExecutor-org.apache.http.protocol.HttpRequestExecutor-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>requestExecutor</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1406">requestExecutor</a>(<a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/protocol/HttpRequestExecutor.html?is-external=true" title="class or interface in org.apache.http.protocol">HttpRequestExecutor</a> requestExec)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#requestExecutor-org.apache.http.protocol.HttpRequestExecutor-">RestClientBuilder</a></code></span></div> |
| <div class="block">Assigns <a href="https://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/org/apache/http/protocol/HttpRequestExecutor.html?is-external=true" title="class or interface in org.apache.http.protocol"><code>HttpRequestExecutor</code></a> instance.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#requestExecutor-org.apache.http.protocol.HttpRequestExecutor-">requestExecutor</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>requestExec</code> - New property value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true#setRequestExecutor-org.apache.http.protocol.HttpRequestExecutor-" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder.setRequestExecutor(HttpRequestExecutor)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="retryHandler-org.apache.http.client.HttpRequestRetryHandler-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>retryHandler</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1412">retryHandler</a>(<a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/HttpRequestRetryHandler.html?is-external=true" title="class or interface in org.apache.http.client">HttpRequestRetryHandler</a> retryHandler)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#retryHandler-org.apache.http.client.HttpRequestRetryHandler-">RestClientBuilder</a></code></span></div> |
| <div class="block">Assigns <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/HttpRequestRetryHandler.html?is-external=true" title="class or interface in org.apache.http.client"><code>HttpRequestRetryHandler</code></a> instance. |
| |
| <ul class='notes'> |
| <li>This value can be overridden by the <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#disableAutomaticRetries--"><code>RestClientBuilder.disableAutomaticRetries()</code></a> method. |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#retryHandler-org.apache.http.client.HttpRequestRetryHandler-">retryHandler</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>retryHandler</code> - New property value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true#setRetryHandler-org.apache.http.client.HttpRequestRetryHandler-" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder.setRetryHandler(HttpRequestRetryHandler)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="rootUri-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>rootUri</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1418">rootUri</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#rootUri-java.lang.Object-">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Root URI. |
| |
| <p> |
| When set, relative URI strings passed in through the various rest call methods (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClient.html#get-java.lang.Object-"><code>RestClient.get(Object)</code></a> |
| will be prefixed with the specified root. |
| <br>This root URI is ignored on those methods if you pass in a <a href="https://docs.oracle.com/javase/8/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net"><code>URL</code></a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net"><code>URI</code></a>, or an absolute URI string. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a client that uses UON format by default for HTTP parts.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .rootUri(<js>"http://localhost:10000/foo"</js>) |
| .build(); |
| |
| Bar <jv>bar</jv> = <jv>client</jv> |
| .get(<js>"/bar"</js>) <jc>// Relative to http://localhost:10000/foo</jc> |
| .run() |
| .getBody().as(Bar.<jk>class</jk>); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/rest/client2/RestClient.html#RESTCLIENT_rootUri"><code>RestClient.RESTCLIENT_rootUri</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#rootUri-java.lang.Object-">rootUri</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The root URI to prefix to relative URI strings. |
| <br>Trailing slashes are trimmed. |
| <br>Usually a <c>String</c> but you can also pass in <c>URI</c> and <c>URL</c> objects as well.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="routePlanner-org.apache.http.conn.routing.HttpRoutePlanner-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>routePlanner</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1424">routePlanner</a>(<a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/conn/routing/HttpRoutePlanner.html?is-external=true" title="class or interface in org.apache.http.conn.routing">HttpRoutePlanner</a> routePlanner)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#routePlanner-org.apache.http.conn.routing.HttpRoutePlanner-">RestClientBuilder</a></code></span></div> |
| <div class="block">Assigns <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/conn/routing/HttpRoutePlanner.html?is-external=true" title="class or interface in org.apache.http.conn.routing"><code>HttpRoutePlanner</code></a> instance.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#routePlanner-org.apache.http.conn.routing.HttpRoutePlanner-">routePlanner</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>routePlanner</code> - New property value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true#setRoutePlanner-org.apache.http.conn.routing.HttpRoutePlanner-" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder.setRoutePlanner(HttpRoutePlanner)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="schemePortResolver-org.apache.http.conn.SchemePortResolver-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>schemePortResolver</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1430">schemePortResolver</a>(<a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/conn/SchemePortResolver.html?is-external=true" title="class or interface in org.apache.http.conn">SchemePortResolver</a> schemePortResolver)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#schemePortResolver-org.apache.http.conn.SchemePortResolver-">RestClientBuilder</a></code></span></div> |
| <div class="block">Assigns <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/conn/SchemePortResolver.html?is-external=true" title="class or interface in org.apache.http.conn"><code>SchemePortResolver</code></a> instance.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#schemePortResolver-org.apache.http.conn.SchemePortResolver-">schemePortResolver</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>schemePortResolver</code> - New property value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true#setSchemePortResolver-org.apache.http.conn.SchemePortResolver-" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder.setSchemePortResolver(SchemePortResolver)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="serializer-java.lang.Class-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>serializer</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1436">serializer</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="../../../../../org/apache/juneau/serializer/Serializer.html" title="class in org.apache.juneau.serializer">Serializer</a>> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#serializer-java.lang.Class-">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Serializer. |
| |
| <p> |
| Associates the specified <a href="../../../../../org/apache/juneau/serializer/Serializer.html" title="class in org.apache.juneau.serializer"><code>Serializer</code></a> with the HTTP client. |
| |
| <p> |
| The serializer is used to serialize POJOs into the HTTP request body. |
| |
| <ul class='notes'> |
| <li>When using this method that takes in a class, the serializer can be configured using any of the serializer property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#sortCollections--"><code>RestClientBuilder.sortCollections()</code></a>), |
| bean context property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#swaps-java.lang.Object...-"><code>RestClientBuilder.swaps(Object...)</code></a>), or generic property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#set-java.lang.String-java.lang.Object-"><code>RestClientBuilder.set(String, Object)</code></a>) defined on this builder class. |
| </ul> |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a client that uses JSON transport for request bodies.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .serializer(JsonSerializer.<jk>class</jk>) |
| .sortCollections() <jc>// Sort any collections being serialized.</jc> |
| .build(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/rest/client2/RestClient.html#RESTCLIENT_serializers"><code>RestClient.RESTCLIENT_serializers</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#serializer-java.lang.Class-">serializer</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new value for this setting. |
| <br>The default is <a href="../../../../../org/apache/juneau/json/JsonSerializer.html" title="class in org.apache.juneau.json"><code>JsonSerializer</code></a>.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="serializer-org.apache.juneau.serializer.Serializer-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>serializer</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1442">serializer</a>(<a href="../../../../../org/apache/juneau/serializer/Serializer.html" title="class in org.apache.juneau.serializer">Serializer</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#serializer-org.apache.juneau.serializer.Serializer-">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Serializer. |
| |
| <p> |
| Associates the specified <a href="../../../../../org/apache/juneau/serializer/Serializer.html" title="class in org.apache.juneau.serializer"><code>Serializer</code></a> with the HTTP client. |
| |
| <p> |
| The serializer is used to serialize POJOs into the HTTP request body. |
| |
| <ul class='notes'> |
| <li>When using this method that takes in a pre-instantiated serializer, the serializer property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#sortCollections--"><code>RestClientBuilder.sortCollections()</code></a>), |
| bean context property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#swaps-java.lang.Object...-"><code>RestClientBuilder.swaps(Object...)</code></a>), or generic property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#set-java.lang.String-java.lang.Object-"><code>RestClientBuilder.set(String, Object)</code></a>) defined |
| on this builder class have no effect. |
| </ul> |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a client that uses a predefined JSON serializer request bodies.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .serializer(JsonSerializer.<jsf>DEFAULT_READABLE</jsf>) |
| .build(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/rest/client2/RestClient.html#RESTCLIENT_serializers"><code>RestClient.RESTCLIENT_serializers</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#serializer-org.apache.juneau.serializer.Serializer-">serializer</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new value for this setting. |
| <br>The default is <a href="../../../../../org/apache/juneau/json/JsonSerializer.html" title="class in org.apache.juneau.json"><code>JsonSerializer</code></a>.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="serializers-java.lang.Class...-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>serializers</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1449">serializers</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="../../../../../org/apache/juneau/serializer/Serializer.html" title="class in org.apache.juneau.serializer">Serializer</a>>... value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#serializers-java.lang.Class...-">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Serializers. |
| |
| <p> |
| Associates the specified <a href="../../../../../org/apache/juneau/serializer/Serializer.html" title="class in org.apache.juneau.serializer"><code>Serializers</code></a> with the HTTP client. |
| |
| <p> |
| The serializer is used to serialize POJOs into the HTTP request body. |
| |
| <p> |
| The serializer that best matches the <c>Content-Type</c> header will be used to serialize the request body. |
| <br>If no <c>Content-Type</c> header is specified, the first serializer in the list will be used. |
| |
| <ul class='notes'> |
| <li>When using this method that takes in classes, the serializers can be configured using any of the serializer property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#sortCollections--"><code>RestClientBuilder.sortCollections()</code></a>), |
| bean context property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#swaps-java.lang.Object...-"><code>RestClientBuilder.swaps(Object...)</code></a>), or generic property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#set-java.lang.String-java.lang.Object-"><code>RestClientBuilder.set(String, Object)</code></a>) defined on this builder class. |
| </ul> |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a client that uses JSON and XML transport for request bodies.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .serializers(JsonSerializer.<jk>class</jk>, XmlSerializer.<jk>class</jk>) |
| .sortCollections() <jc>// Sort any collections being serialized.</jc> |
| .build(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/rest/client2/RestClient.html#RESTCLIENT_serializers"><code>RestClient.RESTCLIENT_serializers</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#serializers-java.lang.Class...-">serializers</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new value for this setting. |
| <br>The default is <a href="../../../../../org/apache/juneau/json/JsonSerializer.html" title="class in org.apache.juneau.json"><code>JsonSerializer</code></a>.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="serializers-org.apache.juneau.serializer.Serializer...-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>serializers</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1455">serializers</a>(<a href="../../../../../org/apache/juneau/serializer/Serializer.html" title="class in org.apache.juneau.serializer">Serializer</a>... value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#serializers-org.apache.juneau.serializer.Serializer...-">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>RestClient</l> configuration property: </i> Serializers. |
| |
| <p> |
| Associates the specified <a href="../../../../../org/apache/juneau/serializer/Serializer.html" title="class in org.apache.juneau.serializer"><code>Serializers</code></a> with the HTTP client. |
| |
| <p> |
| The serializer is used to serialize POJOs into the HTTP request body. |
| |
| <p> |
| The serializer that best matches the <c>Content-Type</c> header will be used to serialize the request body. |
| <br>If no <c>Content-Type</c> header is specified, the first serializer in the list will be used. |
| |
| <ul class='notes'> |
| <li>When using this method that takes in a pre-instantiated serializers, the serializer property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#sortCollections--"><code>RestClientBuilder.sortCollections()</code></a>), |
| bean context property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#swaps-java.lang.Object...-"><code>RestClientBuilder.swaps(Object...)</code></a>), or generic property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#set-java.lang.String-java.lang.Object-"><code>RestClientBuilder.set(String, Object)</code></a>) defined |
| on this builder class have no effect. |
| </ul> |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a client that uses predefined JSON and XML serializers for request bodies.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .serializers(JsonSerializer.<jsf>DEFAULT_READABLE</jsf>, XmlSerializer.<jsf>DEFAULT_READABLE</jsf>) |
| .build(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/rest/client2/RestClient.html#RESTCLIENT_serializers"><code>RestClient.RESTCLIENT_serializers</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#serializers-org.apache.juneau.serializer.Serializer...-">serializers</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new value for this setting. |
| <br>The default is <a href="../../../../../org/apache/juneau/json/JsonSerializer.html" title="class in org.apache.juneau.json"><code>JsonSerializer</code></a>.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="serviceUnavailableRetryStrategy-org.apache.http.client.ServiceUnavailableRetryStrategy-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>serviceUnavailableRetryStrategy</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1461">serviceUnavailableRetryStrategy</a>(<a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/ServiceUnavailableRetryStrategy.html?is-external=true" title="class or interface in org.apache.http.client">ServiceUnavailableRetryStrategy</a> serviceUnavailStrategy)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#serviceUnavailableRetryStrategy-org.apache.http.client.ServiceUnavailableRetryStrategy-">RestClientBuilder</a></code></span></div> |
| <div class="block">Assigns <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/ServiceUnavailableRetryStrategy.html?is-external=true" title="class or interface in org.apache.http.client"><code>ServiceUnavailableRetryStrategy</code></a> instance.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#serviceUnavailableRetryStrategy-org.apache.http.client.ServiceUnavailableRetryStrategy-">serviceUnavailableRetryStrategy</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>serviceUnavailStrategy</code> - New property value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true#setServiceUnavailableRetryStrategy-org.apache.http.client.ServiceUnavailableRetryStrategy-" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder.setServiceUnavailableRetryStrategy(ServiceUnavailableRetryStrategy)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="simpleJson--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>simpleJson</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1467">simpleJson</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#simpleJson--">RestClientBuilder</a></code></span></div> |
| <div class="block">Convenience method for specifying Simplified JSON as the marshalling transmission media type. |
| |
| <p> |
| Simplified JSON is typically useful for automated tests because you can do simple string comparison of results |
| without having to escape lots of quotes. |
| |
| <p> |
| <a href="../../../../../org/apache/juneau/json/SimpleJsonSerializer.html" title="class in org.apache.juneau.json"><code>SimpleJsonSerializer</code></a> will be used to serialize POJOs to request bodies unless overridden per request via <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#serializer-org.apache.juneau.serializer.Serializer-"><code>RestRequest.serializer(Serializer)</code></a>. |
| <ul> |
| <li>The serializer can be configured using any of the serializer property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#sortCollections--"><code>RestClientBuilder.sortCollections()</code></a>), |
| bean context property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#swaps-java.lang.Object...-"><code>RestClientBuilder.swaps(Object...)</code></a>), or generic property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#set-java.lang.String-java.lang.Object-"><code>RestClientBuilder.set(String, Object)</code></a>) defined on this builder class. |
| </ul> |
| <p> |
| <a href="../../../../../org/apache/juneau/json/JsonParser.html" title="class in org.apache.juneau.json"><code>JsonParser</code></a> will be used to parse POJOs from response bodies unless overridden per request via <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#parser-org.apache.juneau.parser.Parser-"><code>RestRequest.parser(Parser)</code></a>. |
| <ul> |
| <li>The parser can be configured using any of the parser property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#strict--"><code>RestClientBuilder.strict()</code></a>), |
| bean context property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#swaps-java.lang.Object...-"><code>RestClientBuilder.swaps(Object...)</code></a>), or generic property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#set-java.lang.String-java.lang.Object-"><code>RestClientBuilder.set(String, Object)</code></a>) defined on this builder class. |
| </ul> |
| <p> |
| <c>Accept</c> request header will be set to <js>"application/json"</js> unless overridden |
| by <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#header-java.lang.String-java.lang.Object-"><code>RestClientBuilder.header(String,Object)</code></a> or <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#accept-java.lang.Object-"><code>RestClientBuilder.accept(Object)</code></a>, or per-request via <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#header-java.lang.String-java.lang.Object-"><code>RestRequest.header(String,Object)</code></a> or <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#accept-java.lang.Object-"><code>RestRequest.accept(Object)</code></a>. |
| <p> |
| <c>Content-Type</c> request header will be set to <js>"application/json+simple"</js> unless overridden |
| by <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#header-java.lang.String-java.lang.Object-"><code>RestClientBuilder.header(String,Object)</code></a> or <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#contentType-java.lang.Object-"><code>RestClientBuilder.contentType(Object)</code></a>, or per-request via <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#header-java.lang.String-java.lang.Object-"><code>RestRequest.header(String,Object)</code></a> or <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#contentType-java.lang.Object-"><code>RestRequest.contentType(Object)</code></a>. |
| <p> |
| Can be combined with other marshaller setters such as <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#xml--"><code>RestClientBuilder.xml()</code></a> to provide support for multiple languages. |
| <ul> |
| <li>When multiple languages are supported, the <c>Accept</c> and <c>Content-Type</c> headers control which marshallers are used, or uses the |
| last-enabled language if the headers are not set. |
| </ul> |
| <p> |
| Identical to calling <c>serializer(SimpleJsonSerializer.<jk>class</jk>).parser(JsonParser.<jk>class</jk>)</c>. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Construct a client that uses Simplified JSON marshalling.</jc> |
| RestClient <jv>client</jv> = RestClient.<jsm>create</jsm>().simpleJson().build(); |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#simpleJson--">simpleJson</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="sortCollections--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>sortCollections</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1473">sortCollections</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#sortCollections--">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>Serializer</l> configuration property: </i> Sort arrays and collections alphabetically. |
| |
| <p> |
| When enabled, copies and sorts the contents of arrays and collections before serializing them. |
| |
| <p> |
| Note that this introduces a performance penalty since it requires copying the existing collection. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a REST client with JSON serializer that sorts arrays and collections before serialization.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .json() |
| .sortCollections() |
| .build(); |
| |
| <jc>// An unsorted array</jc> |
| String[] <jv>array</jv> = {<js>"foo"</js>,<js>"bar"</js>,<js>"baz"</js>} |
| |
| <jc>// Request body will contain: ["bar","baz","foo"]</jc> |
| <jv>client</jv> |
| .doPost(<js>"http://localhost:10000/foo"</js>, <jv>array</jv>) |
| .run(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/serializer/Serializer.html#SERIALIZER_sortCollections"><code>Serializer.SERIALIZER_sortCollections</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#sortCollections--">sortCollections</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="sortMaps--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>sortMaps</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1479">sortMaps</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#sortMaps--">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>Serializer</l> configuration property: </i> Sort maps alphabetically. |
| |
| <p> |
| When enabled, copies and sorts the contents of maps by their keys before serializing them. |
| |
| <p> |
| Note that this introduces a performance penalty. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a REST client with JSON serializer that sorts maps before serialization.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .json() |
| .sortMaps() |
| .build(); |
| |
| <jc>// An unsorted map.</jc> |
| AMap <jv>map</jv> = AMap.<jsm>of</jsm>(<js>"foo"</js>,1,<js>"bar"</js>,2,<js>"baz"</js>,3); |
| |
| <jc>// Request body will contain: {"bar":2,"baz":3,"foo":1}</jc> |
| <jv>client</jv> |
| .doPost(<js>"http://localhost:10000/foo"</js>, <jv>map</jv>) |
| .run(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/serializer/Serializer.html#SERIALIZER_sortMaps"><code>Serializer.SERIALIZER_sortMaps</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#sortMaps--">sortMaps</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="sq--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>sq</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1485">sq</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#sq--">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>WriterSerializer</l> configuration property: </i> Quote character. |
| |
| <p> |
| Specifies to use single quotes for quoting attributes and values. |
| |
| <ul class='notes'> |
| <li>This setting does not apply to the RDF serializers. |
| </ul> |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a REST client with JSON serializer that uses single quotes.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .json() |
| .sq() |
| .build(); |
| |
| <jc>// A bean with a single property</jc> |
| <jk>public class</jk> MyBean { |
| <jk>public</jk> String <jf>foo</jf> = <js>"bar"</js>; |
| } |
| |
| <jc>// Request body will contain: {'foo':'bar'}</jc> |
| <jv>client</jv> |
| .doPost(<js>"http://localhost:10000/foo"</js>, <jk>new</jk> MyBean()) |
| .run(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/serializer/WriterSerializer.html#WSERIALIZER_quoteChar"><code>WriterSerializer.WSERIALIZER_quoteChar</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#sq--">sq</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="sslContext-javax.net.ssl.SSLContext-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>sslContext</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1491">sslContext</a>(<a href="https://docs.oracle.com/javase/8/docs/api/javax/net/ssl/SSLContext.html?is-external=true" title="class or interface in javax.net.ssl">SSLContext</a> sslContext)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#sslContext-javax.net.ssl.SSLContext-">RestClientBuilder</a></code></span></div> |
| <div class="block">Assigns <a href="https://docs.oracle.com/javase/8/docs/api/javax/net/ssl/SSLContext.html?is-external=true" title="class or interface in javax.net.ssl"><code>SSLContext</code></a> instance. |
| |
| <ul class='notes'> |
| <li>This value can be overridden by the <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#connectionManager-org.apache.http.conn.HttpClientConnectionManager-"><code>RestClientBuilder.connectionManager(HttpClientConnectionManager)</code></a> |
| and the <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#sslSocketFactory-org.apache.http.conn.socket.LayeredConnectionSocketFactory-"><code>RestClientBuilder.sslSocketFactory(LayeredConnectionSocketFactory)</code></a> methods. |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#sslContext-javax.net.ssl.SSLContext-">sslContext</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>sslContext</code> - New property value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true#setSSLContext-javax.net.ssl.SSLContext-" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder.setSSLContext(SSLContext)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="sslHostnameVerifier-javax.net.ssl.HostnameVerifier-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>sslHostnameVerifier</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1497">sslHostnameVerifier</a>(<a href="https://docs.oracle.com/javase/8/docs/api/javax/net/ssl/HostnameVerifier.html?is-external=true" title="class or interface in javax.net.ssl">HostnameVerifier</a> hostnameVerifier)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#sslHostnameVerifier-javax.net.ssl.HostnameVerifier-">RestClientBuilder</a></code></span></div> |
| <div class="block">Assigns <a href="https://docs.oracle.com/javase/8/docs/api/javax/net/ssl/HostnameVerifier.html?is-external=true" title="class or interface in javax.net.ssl"><code>HostnameVerifier</code></a> instance. |
| |
| <ul class='notes'> |
| <li>This value can be overridden by the <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#connectionManager-org.apache.http.conn.HttpClientConnectionManager-"><code>RestClientBuilder.connectionManager(HttpClientConnectionManager)</code></a> |
| and the <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#sslSocketFactory-org.apache.http.conn.socket.LayeredConnectionSocketFactory-"><code>RestClientBuilder.sslSocketFactory(LayeredConnectionSocketFactory)</code></a> methods. |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#sslHostnameVerifier-javax.net.ssl.HostnameVerifier-">sslHostnameVerifier</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>hostnameVerifier</code> - New property value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true#setSSLHostnameVerifier-javax.net.ssl.HostnameVerifier-" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder.setSSLHostnameVerifier(HostnameVerifier)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="sslSocketFactory-org.apache.http.conn.socket.LayeredConnectionSocketFactory-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>sslSocketFactory</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1503">sslSocketFactory</a>(<a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/conn/socket/LayeredConnectionSocketFactory.html?is-external=true" title="class or interface in org.apache.http.conn.socket">LayeredConnectionSocketFactory</a> sslSocketFactory)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#sslSocketFactory-org.apache.http.conn.socket.LayeredConnectionSocketFactory-">RestClientBuilder</a></code></span></div> |
| <div class="block">Assigns <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/conn/socket/LayeredConnectionSocketFactory.html?is-external=true" title="class or interface in org.apache.http.conn.socket"><code>LayeredConnectionSocketFactory</code></a> instance. |
| |
| <ul class='notes'> |
| <li>This value can be overridden by the <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#connectionManager-org.apache.http.conn.HttpClientConnectionManager-"><code>RestClientBuilder.connectionManager(HttpClientConnectionManager)</code></a> method. |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#sslSocketFactory-org.apache.http.conn.socket.LayeredConnectionSocketFactory-">sslSocketFactory</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>sslSocketFactory</code> - New property value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true#setSSLSocketFactory-org.apache.http.conn.socket.LayeredConnectionSocketFactory-" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder.setSSLSocketFactory(LayeredConnectionSocketFactory)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="strict--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>strict</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1509">strict</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#strict--">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>Parser</l> configuration property: </i> Strict mode. |
| |
| <p> |
| When enabled, strict mode for the parser is enabled. |
| |
| <p> |
| Strict mode can mean different things for different parsers. |
| |
| <table class='styled'> |
| <tr><th>Parser class</th><th>Strict behavior</th></tr> |
| <tr> |
| <td>All reader-based parsers</td> |
| <td> |
| When enabled, throws <a href="../../../../../org/apache/juneau/parser/ParseException.html" title="class in org.apache.juneau.parser"><code>ParseExceptions</code></a> on malformed charset input. |
| Otherwise, malformed input is ignored. |
| </td> |
| </tr> |
| <tr> |
| <td><a href="../../../../../org/apache/juneau/json/JsonParser.html" title="class in org.apache.juneau.json"><code>JsonParser</code></a></td> |
| <td> |
| When enabled, throws exceptions on the following invalid JSON syntax: |
| <ul> |
| <li>Unquoted attributes. |
| <li>Missing attribute values. |
| <li>Concatenated strings. |
| <li>Javascript comments. |
| <li>Numbers and booleans when Strings are expected. |
| <li>Numbers valid in Java but not JSON (e.g. octal notation, etc...) |
| </ul> |
| </td> |
| </tr> |
| </table> |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a REST client with JSON parser using strict mode.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .json() |
| .strict() |
| .build(); |
| |
| <jc>// Try to parse some bad JSON.</jc> |
| <jk>try</jk> { |
| <jv>client</jv> |
| .get(<js>"/pathToBadJson"</js>) |
| .run() |
| .getBody().as(Object.<jk>class</jk>); <jc>// Try to parse it.</jc> |
| } <jk>catch</jk> (RestCallException <jv>e</jv>) { |
| <jc>// Handle exception.</jc> |
| } |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/parser/Parser.html#PARSER_strict"><code>Parser.PARSER_strict</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#strict--">strict</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="targetAuthenticationStrategy-org.apache.http.client.AuthenticationStrategy-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>targetAuthenticationStrategy</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1515">targetAuthenticationStrategy</a>(<a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/AuthenticationStrategy.html?is-external=true" title="class or interface in org.apache.http.client">AuthenticationStrategy</a> targetAuthStrategy)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#targetAuthenticationStrategy-org.apache.http.client.AuthenticationStrategy-">RestClientBuilder</a></code></span></div> |
| <div class="block">Assigns <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/AuthenticationStrategy.html?is-external=true" title="class or interface in org.apache.http.client"><code>AuthenticationStrategy</code></a> instance for target host authentication.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#targetAuthenticationStrategy-org.apache.http.client.AuthenticationStrategy-">targetAuthenticationStrategy</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>targetAuthStrategy</code> - New property value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true#setTargetAuthenticationStrategy-org.apache.http.client.AuthenticationStrategy-" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder.setTargetAuthenticationStrategy(AuthenticationStrategy)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="te-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>te</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1521">te</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#te-java.lang.Object-">RestClientBuilder</a></code></span></div> |
| <div class="block">Sets the value for the <c>TE</c> request header on all requests. |
| |
| <p> |
| This is a shortcut for calling <code>header(<js>"TE"</js>, value);</code></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#te-java.lang.Object-">te</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new header value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="trimEmptyCollections--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>trimEmptyCollections</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1527">trimEmptyCollections</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#trimEmptyCollections--">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>Serializer</l> configuration property: </i> Trim empty lists and arrays. |
| |
| <p> |
| When enabled, empty lists and arrays will not be serialized. |
| |
| <p> |
| Note that enabling this setting has the following effects on parsing: |
| <ul class='spaced-list'> |
| <li> |
| Map entries with empty list values will be lost. |
| <li> |
| Bean properties with empty list values will not be set. |
| </ul> |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a serializer that skips empty arrays and collections.</jc> |
| WriterSerializer <jv>s</jv> = JsonSerializer |
| .<jsm>create</jsm>() |
| .trimEmptyCollections() |
| .build(); |
| |
| <jc>// A bean with a field with an empty array.</jc> |
| <jk>public class</jk> MyBean { |
| <jk>public</jk> String[] <jf>foo</jf> = {}; |
| } |
| |
| <jc>// Request body will contain: {}</jc> |
| <jv>client</jv> |
| .doPost(<js>"http://localhost:10000/foo"</js>, <jk>new</jk> MyBean()) |
| .run(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/serializer/Serializer.html#SERIALIZER_trimEmptyCollections"><code>Serializer.SERIALIZER_trimEmptyCollections</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#trimEmptyCollections--">trimEmptyCollections</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="trimEmptyMaps--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>trimEmptyMaps</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1533">trimEmptyMaps</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#trimEmptyMaps--">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>Serializer</l> configuration property: </i> Trim empty maps. |
| |
| <p> |
| When enabled, empty map 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> |
| Bean properties with empty map values will not be set. |
| </ul> |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a REST client with JSON serializer that skips empty maps.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .json() |
| .trimEmptyMaps() |
| .build(); |
| |
| <jc>// A bean with a field with an empty map.</jc> |
| <jk>public class</jk> MyBean { |
| <jk>public</jk> AMap <jf>foo</jf> = AMap.<jsm>of</jsm>(); |
| } |
| |
| <jc>// Request body will contain: {}</jc> |
| <jv>client</jv> |
| .doPost(<js>"http://localhost:10000/foo"</js>, <jk>new</jk> MyBean()) |
| .run(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/serializer/Serializer.html#SERIALIZER_trimEmptyMaps"><code>Serializer.SERIALIZER_trimEmptyMaps</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#trimEmptyMaps--">trimEmptyMaps</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="trimStringsOnRead--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>trimStringsOnRead</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1539">trimStringsOnRead</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#trimStringsOnRead--">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>Parser</l> configuration property: </i> Trim parsed strings. |
| |
| <p> |
| When enabled, string values will be trimmed of whitespace using <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true#trim--" title="class or interface in java.lang"><code>String.trim()</code></a> before being added to |
| the POJO. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a REST client with JSON parser with trim-strings enabled.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .json() |
| .trimStringsOnRead() |
| .build(); |
| |
| <jc>// Try to parse JSON containing {" foo ":" bar "}.</jc> |
| Map<String,String> <jv>map</jv> = <jv>client</jv> |
| .get(<js>"/pathToJson"</js>) |
| .run() |
| .getBody().as(HashMap.<jk>class</jk>, String.<jk>class</jk>, String.<jk>class</jk>); |
| |
| <jc>// Make sure strings are trimmed.</jc> |
| <jsm>assertEquals</jsm>(<js>"bar"</js>, <jv>map</jv>.get(<js>"foo"</js>)); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/parser/Parser.html#PARSER_trimStrings"><code>Parser.PARSER_trimStrings</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#trimStringsOnRead--">trimStringsOnRead</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="trimStringsOnWrite--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>trimStringsOnWrite</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1545">trimStringsOnWrite</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#trimStringsOnWrite--">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>Serializer</l> configuration property: </i> Trim strings. |
| |
| <p> |
| When enabled, string values will be trimmed of whitespace using <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true#trim--" title="class or interface in java.lang"><code>String.trim()</code></a> before being serialized. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a REST client with JSON serializer that trims strings before serialization.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .json() |
| .trimStrings() |
| .build(); |
| |
| <jc>// A map with space-padded keys/values</jc> |
| AMap <jv>map</jv> = AMap.<jsm>of</jsm>(<js>" foo "</js>, <js>" bar "</js>); |
| |
| <jc>// Request body will contain: {"foo":"bar"}</jc> |
| <jv>client</jv> |
| .doPost(<js>"http://localhost:10000/foo"</js>, <jv>map</jv>) |
| .run(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/serializer/Serializer.html#SERIALIZER_trimStrings"><code>Serializer.SERIALIZER_trimStrings</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#trimStringsOnWrite--">trimStringsOnWrite</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="uon--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>uon</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1551">uon</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#uon--">RestClientBuilder</a></code></span></div> |
| <div class="block">Convenience method for specifying UON as the marshalling transmission media type. |
| |
| <p> |
| UON is Url-Encoding Object notation that is equivalent to JSON but suitable for transmission as URL-encoded |
| query and form post values. |
| |
| <p> |
| <a href="../../../../../org/apache/juneau/uon/UonSerializer.html" title="class in org.apache.juneau.uon"><code>UonSerializer</code></a> will be used to serialize POJOs to request bodies unless overridden per request via <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#serializer-org.apache.juneau.serializer.Serializer-"><code>RestRequest.serializer(Serializer)</code></a>. |
| <ul> |
| <li>The serializer can be configured using any of the serializer property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#sortCollections--"><code>RestClientBuilder.sortCollections()</code></a>), |
| bean context property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#swaps-java.lang.Object...-"><code>RestClientBuilder.swaps(Object...)</code></a>), or generic property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#set-java.lang.String-java.lang.Object-"><code>RestClientBuilder.set(String, Object)</code></a>) defined on this builder class. |
| </ul> |
| <p> |
| <a href="../../../../../org/apache/juneau/uon/UonParser.html" title="class in org.apache.juneau.uon"><code>UonParser</code></a> will be used to parse POJOs from response bodies unless overridden per request via <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#parser-org.apache.juneau.parser.Parser-"><code>RestRequest.parser(Parser)</code></a>. |
| <ul> |
| <li>The parser can be configured using any of the parser property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#strict--"><code>RestClientBuilder.strict()</code></a>), |
| bean context property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#swaps-java.lang.Object...-"><code>RestClientBuilder.swaps(Object...)</code></a>), or generic property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#set-java.lang.String-java.lang.Object-"><code>RestClientBuilder.set(String, Object)</code></a>) defined on this builder class. |
| </ul> |
| <p> |
| <c>Accept</c> request header will be set to <js>"text/uon"</js> unless overridden |
| by <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#header-java.lang.String-java.lang.Object-"><code>RestClientBuilder.header(String,Object)</code></a> or <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#accept-java.lang.Object-"><code>RestClientBuilder.accept(Object)</code></a>, or per-request via <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#header-java.lang.String-java.lang.Object-"><code>RestRequest.header(String,Object)</code></a> or <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#accept-java.lang.Object-"><code>RestRequest.accept(Object)</code></a>. |
| <p> |
| <c>Content-Type</c> request header will be set to <js>"text/uon"</js> unless overridden |
| by <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#header-java.lang.String-java.lang.Object-"><code>RestClientBuilder.header(String,Object)</code></a> or <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#contentType-java.lang.Object-"><code>RestClientBuilder.contentType(Object)</code></a>, or per-request via <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#header-java.lang.String-java.lang.Object-"><code>RestRequest.header(String,Object)</code></a> or <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#contentType-java.lang.Object-"><code>RestRequest.contentType(Object)</code></a>. |
| <p> |
| Can be combined with other marshaller setters such as <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#json--"><code>RestClientBuilder.json()</code></a> to provide support for multiple languages. |
| <ul> |
| <li>When multiple languages are supported, the <c>Accept</c> and <c>Content-Type</c> headers control which marshallers are used, or uses the |
| last-enabled language if the headers are not set. |
| </ul> |
| <p> |
| Identical to calling <c>serializer(UonSerializer.<jk>class</jk>).parser(UonParser.<jk>class</jk>)</c>. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Construct a client that uses UON marshalling.</jc> |
| RestClient <jv>client</jv> = RestClient.<jsm>create</jsm>().uon().build(); |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#uon--">uon</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="upgrade-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>upgrade</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1557">upgrade</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#upgrade-java.lang.Object-">RestClientBuilder</a></code></span></div> |
| <div class="block">Sets the value for the <c>Upgrade</c> request header on all requests. |
| |
| <p> |
| This is a shortcut for calling <code>header(<js>"Upgrade"</js>, value);</code></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#upgrade-java.lang.Object-">upgrade</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new header value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="uriContext-org.apache.juneau.UriContext-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>uriContext</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1563">uriContext</a>(<a href="../../../../../org/apache/juneau/UriContext.html" title="class in org.apache.juneau">UriContext</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#uriContext-org.apache.juneau.UriContext-">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>Serializer</l> configuration property: </i> URI context bean. |
| |
| <p> |
| Bean used for resolution of URIs to absolute or root-relative form. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Our URI contextual information.</jc> |
| String <jv>authority</jv> = <js>"http://localhost:10000"</js>; |
| String <jv>contextRoot</jv> = <js>"/myContext"</js>; |
| String <jv>servletPath</jv> = <js>"/myServlet"</js>; |
| String <jv>pathInfo</jv> = <js>"/foo"</js>; |
| |
| <jc>// Create a UriContext object.</jc> |
| UriContext <jv>uriContext</jv> = <jk>new</jk> UriContext(<jv>authority</jv>, <jv>contextRoot</jv>, <jv>servletPath</jv>, <jv>pathInfo</jv>); |
| |
| <jc>// Create a REST client with JSON serializer and associate our context.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .json() |
| .uriContext(<jv>uriContext</jv>) |
| .uriRelativity(<jsf>RESOURCE</jsf>) <jc>// Assume relative paths are relative to servlet.</jc> |
| .uriResolution(<jsf>ABSOLUTE</jsf>) <jc>// Serialize URIs as absolute paths.</jc> |
| .build(); |
| |
| <jc>// A relative URI</jc> |
| URI <jv>uri</jv> = <jk>new</jk> URI(<js>"bar"</js>); |
| |
| <jc>// Request body will contain: "http://localhost:10000/myContext/myServlet/foo/bar"</jc> |
| <jv>client</jv> |
| .doPost(<js>"http://localhost:10000/foo"</js>, <jv>uri</jv>) |
| .run(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/serializer/Serializer.html#SERIALIZER_uriContext"><code>Serializer.SERIALIZER_uriContext</code></a> |
| <li class='link'><a class='doclink' href='../../../../../overview-summary.html#juneau-marshall.URIs'>Overview > juneau-marshall > URIs</a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#uriContext-org.apache.juneau.UriContext-">uriContext</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new value for this property.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="uriRelativity-org.apache.juneau.UriRelativity-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>uriRelativity</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1569">uriRelativity</a>(<a href="../../../../../org/apache/juneau/UriRelativity.html" title="enum in org.apache.juneau">UriRelativity</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#uriRelativity-org.apache.juneau.UriRelativity-">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>Serializer</l> configuration property: </i> URI relativity. |
| |
| <p> |
| Defines what relative URIs are relative to when serializing any of the following: |
| <ul> |
| <li><a href="https://docs.oracle.com/javase/8/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net"><code>URI</code></a> |
| <li><a href="https://docs.oracle.com/javase/8/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net"><code>URL</code></a> |
| <li>Properties and classes annotated with <a href="../../../../../org/apache/juneau/annotation/URI.html" title="annotation in org.apache.juneau.annotation"><code>@URI</code></a> |
| </ul> |
| |
| <p> |
| Possible values are: |
| <ul class='javatree'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/UriRelativity.html#RESOURCE"><code>UriRelativity.RESOURCE</code></a> |
| - Relative URIs should be considered relative to the servlet URI. |
| <li class='jf'><a href="../../../../../org/apache/juneau/UriRelativity.html#PATH_INFO"><code>UriRelativity.PATH_INFO</code></a> |
| - Relative URIs should be considered relative to the request URI. |
| </ul> |
| |
| <p> |
| See <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#uriContext-org.apache.juneau.UriContext-"><code>RestClientBuilder.uriContext(UriContext)</code></a> for examples. |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/serializer/Serializer.html#SERIALIZER_uriRelativity"><code>Serializer.SERIALIZER_uriRelativity</code></a> |
| <li class='link'><a class='doclink' href='../../../../../overview-summary.html#juneau-marshall.URIs'>Overview > juneau-marshall > URIs</a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#uriRelativity-org.apache.juneau.UriRelativity-">uriRelativity</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new value for this property. |
| <br>The default is <a href="../../../../../org/apache/juneau/UriRelativity.html#RESOURCE"><code>UriRelativity.RESOURCE</code></a></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="uriResolution-org.apache.juneau.UriResolution-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>uriResolution</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1575">uriResolution</a>(<a href="../../../../../org/apache/juneau/UriResolution.html" title="enum in org.apache.juneau">UriResolution</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#uriResolution-org.apache.juneau.UriResolution-">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>Serializer</l> configuration property: </i> URI resolution. |
| |
| <p> |
| Defines the resolution level for URIs when serializing any of the following: |
| <ul> |
| <li><a href="https://docs.oracle.com/javase/8/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net"><code>URI</code></a> |
| <li><a href="https://docs.oracle.com/javase/8/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net"><code>URL</code></a> |
| <li>Properties and classes annotated with <a href="../../../../../org/apache/juneau/annotation/URI.html" title="annotation in org.apache.juneau.annotation"><code>@URI</code></a> |
| </ul> |
| |
| <p> |
| Possible values are: |
| <ul> |
| <li class='jf'><a href="../../../../../org/apache/juneau/UriResolution.html#ABSOLUTE"><code>UriResolution.ABSOLUTE</code></a> |
| - Resolve to an absolute URI (e.g. <js>"http://host:port/context-root/servlet-path/path-info"</js>). |
| <li class='jf'><a href="../../../../../org/apache/juneau/UriResolution.html#ROOT_RELATIVE"><code>UriResolution.ROOT_RELATIVE</code></a> |
| - Resolve to a root-relative URI (e.g. <js>"/context-root/servlet-path/path-info"</js>). |
| <li class='jf'><a href="../../../../../org/apache/juneau/UriResolution.html#NONE"><code>UriResolution.NONE</code></a> |
| - Don't do any URI resolution. |
| </ul> |
| |
| <p> |
| See <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#uriContext-org.apache.juneau.UriContext-"><code>RestClientBuilder.uriContext(UriContext)</code></a> for examples. |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/serializer/Serializer.html#SERIALIZER_uriResolution"><code>Serializer.SERIALIZER_uriResolution</code></a> |
| <li class='link'><a class='doclink' href='../../../../../overview-summary.html#juneau-marshall.URIs'>Overview > juneau-marshall > URIs</a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#uriResolution-org.apache.juneau.UriResolution-">uriResolution</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new value for this property. |
| <br>The default is <a href="../../../../../org/apache/juneau/UriResolution.html#NONE"><code>UriResolution.NONE</code></a></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="urlEnc--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>urlEnc</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1581">urlEnc</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#urlEnc--">RestClientBuilder</a></code></span></div> |
| <div class="block">Convenience method for specifying URL-Encoding as the marshalling transmission media type. |
| |
| <p> |
| <a href="../../../../../org/apache/juneau/urlencoding/UrlEncodingSerializer.html" title="class in org.apache.juneau.urlencoding"><code>UrlEncodingSerializer</code></a> will be used to serialize POJOs to request bodies unless overridden per request via <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#serializer-org.apache.juneau.serializer.Serializer-"><code>RestRequest.serializer(Serializer)</code></a>. |
| <ul> |
| <li>The serializer can be configured using any of the serializer property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#sortCollections--"><code>RestClientBuilder.sortCollections()</code></a>), |
| bean context property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#swaps-java.lang.Object...-"><code>RestClientBuilder.swaps(Object...)</code></a>), or generic property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#set-java.lang.String-java.lang.Object-"><code>RestClientBuilder.set(String, Object)</code></a>) defined on this builder class. |
| <li>This serializer is NOT used when using the <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#formData-java.lang.String-java.lang.Object-"><code>RestRequest.formData(String, Object)</code></a> (and related) methods for constructing |
| the request body. Instead, the part serializer specified via <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#partSerializer-java.lang.Class-"><code>RestClientBuilder.partSerializer(Class)</code></a> is used. |
| </ul> |
| <p> |
| <a href="../../../../../org/apache/juneau/urlencoding/UrlEncodingParser.html" title="class in org.apache.juneau.urlencoding"><code>UrlEncodingParser</code></a> will be used to parse POJOs from response bodies unless overridden per request via <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#parser-org.apache.juneau.parser.Parser-"><code>RestRequest.parser(Parser)</code></a>. |
| <ul> |
| <li>The parser can be configured using any of the parser property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#strict--"><code>RestClientBuilder.strict()</code></a>), |
| bean context property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#swaps-java.lang.Object...-"><code>RestClientBuilder.swaps(Object...)</code></a>), or generic property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#set-java.lang.String-java.lang.Object-"><code>RestClientBuilder.set(String, Object)</code></a>) defined on this builder class. |
| </ul> |
| <p> |
| <c>Accept</c> request header will be set to <js>"application/x-www-form-urlencoded"</js> unless overridden |
| by <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#header-java.lang.String-java.lang.Object-"><code>RestClientBuilder.header(String,Object)</code></a> or <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#accept-java.lang.Object-"><code>RestClientBuilder.accept(Object)</code></a>, or per-request via <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#header-java.lang.String-java.lang.Object-"><code>RestRequest.header(String,Object)</code></a> or <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#accept-java.lang.Object-"><code>RestRequest.accept(Object)</code></a>. |
| <p> |
| <c>Content-Type</c> request header will be set to <js>"application/x-www-form-urlencoded"</js> unless overridden |
| by <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#header-java.lang.String-java.lang.Object-"><code>RestClientBuilder.header(String,Object)</code></a> or <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#contentType-java.lang.Object-"><code>RestClientBuilder.contentType(Object)</code></a>, or per-request via <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#header-java.lang.String-java.lang.Object-"><code>RestRequest.header(String,Object)</code></a> or <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#contentType-java.lang.Object-"><code>RestRequest.contentType(Object)</code></a>. |
| <p> |
| Can be combined with other marshaller setters such as <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#json--"><code>RestClientBuilder.json()</code></a> to provide support for multiple languages. |
| <ul> |
| <li>When multiple languages are supported, the <c>Accept</c> and <c>Content-Type</c> headers control which marshallers are used, or uses the |
| last-enabled language if the headers are not set. |
| </ul> |
| <p> |
| Identical to calling <c>serializer(UrlEncodingSerializer.<jk>class</jk>).parser(UrlEncodingParser.<jk>class</jk>)</c>. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Construct a client that uses URL-Encoded marshalling.</jc> |
| RestClient <jv>client</jv> = RestClient.<jsm>create</jsm>().urlEnc().build(); |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#urlEnc--">urlEnc</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="useSystemProperties--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>useSystemProperties</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1587">useSystemProperties</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#useSystemProperties--">RestClientBuilder</a></code></span></div> |
| <div class="block">Use system properties when creating and configuring default implementations.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#useSystemProperties--">useSystemProperties</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true#useSystemProperties--" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder.useSystemProperties()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="useWhitespace--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>useWhitespace</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1593">useWhitespace</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#useWhitespace--">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>WriterSerializer</l> configuration property: </i> Use whitespace. |
| |
| <p> |
| When enabled, whitespace is added to the output to improve readability. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a REST client with JSON serializer with whitespace enabled.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .json() |
| .useWhitespace() |
| .build(); |
| |
| <jc>// A bean with a single property</jc> |
| <jk>public class</jk> MyBean { |
| <jk>public</jk> String <jf>foo</jf> = <js>"bar"</js>; |
| } |
| |
| <jc>// Request body will contain: {\n\t"foo": "bar"\n\}\n</jc> |
| <jv>client</jv> |
| .doPost(<js>"http://localhost:10000/foo"</js>, <jk>new</jk> MyBean()) |
| .run(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/serializer/WriterSerializer.html#WSERIALIZER_useWhitespace"><code>WriterSerializer.WSERIALIZER_useWhitespace</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#useWhitespace--">useWhitespace</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="userAgent-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>userAgent</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1599">userAgent</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#userAgent-java.lang.Object-">RestClientBuilder</a></code></span></div> |
| <div class="block">Sets the value for the <c>User-Agent</c> request header on all requests. |
| |
| <p> |
| This is a shortcut for calling <code>header(<js>"User-Agent"</js>, value);</code></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#userAgent-java.lang.Object-">userAgent</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new header value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="userAgent-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>userAgent</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1605">userAgent</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> userAgent)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#userAgent-java.lang.String-">RestClientBuilder</a></code></span></div> |
| <div class="block">Assigns <c>User-Agent</c> value. |
| |
| <ul class='notes'> |
| <li>This value can be overridden by the <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#httpProcessor-org.apache.http.protocol.HttpProcessor-"><code>RestClientBuilder.httpProcessor(HttpProcessor)</code></a> method. |
| <li><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#userAgent-java.lang.Object-"><code>RestClientBuilder.userAgent(Object)</code></a> is an equivalent method. |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#userAgent-java.lang.String-">userAgent</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>userAgent</code> - New property value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true#setUserAgent-java.lang.String-" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder.setUserAgent(String)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="userTokenHandler-org.apache.http.client.UserTokenHandler-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>userTokenHandler</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1611">userTokenHandler</a>(<a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/UserTokenHandler.html?is-external=true" title="class or interface in org.apache.http.client">UserTokenHandler</a> userTokenHandler)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#userTokenHandler-org.apache.http.client.UserTokenHandler-">RestClientBuilder</a></code></span></div> |
| <div class="block">Assigns <a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/UserTokenHandler.html?is-external=true" title="class or interface in org.apache.http.client"><code>UserTokenHandler</code></a> instance. |
| |
| <ul class='notes'> |
| <li>This value can be overridden by the <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#disableConnectionState--"><code>RestClientBuilder.disableConnectionState()</code></a> method. |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#userTokenHandler-org.apache.http.client.UserTokenHandler-">userTokenHandler</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>userTokenHandler</code> - New property value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html?is-external=true#setUserTokenHandler-org.apache.http.client.UserTokenHandler-" title="class or interface in org.apache.http.impl.client"><code>HttpClientBuilder.setUserTokenHandler(UserTokenHandler)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="via-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>via</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1617">via</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#via-java.lang.Object-">RestClientBuilder</a></code></span></div> |
| <div class="block">Sets the value for the <c>Via</c> request header on all requests. |
| |
| <p> |
| This is a shortcut for calling <code>header(<js>"Via"</js>, value);</code></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#via-java.lang.Object-">via</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new header value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="warning-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>warning</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1623">warning</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#warning-java.lang.Object-">RestClientBuilder</a></code></span></div> |
| <div class="block">Sets the value for the <c>Warning</c> request header on all requests. |
| |
| <p> |
| This is a shortcut for calling <code>header(<js>"Warning"</js>, value);</code></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#warning-java.lang.Object-">warning</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - The new header value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="ws--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>ws</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1629">ws</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#ws--">RestClientBuilder</a></code></span></div> |
| <div class="block"><i><l>WriterSerializer</l> configuration property: </i> Use whitespace. |
| |
| <p> |
| When enabled, whitespace is added to the output to improve readability. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Create a REST client with JSON serializer with whitespace enabled.</jc> |
| RestClient <jv>client</jv> = RestClient |
| .<jsm>create</jsm>() |
| .json() |
| .ws() |
| .build(); |
| |
| <jc>// A bean with a single property</jc> |
| <jk>public class</jk> MyBean { |
| <jk>public</jk> String <jf>foo</jf> = <js>"bar"</js>; |
| } |
| |
| <jc>// Request body will contain: {\n\t"foo": "bar"\n\}\n</jc> |
| <jv>client</jv> |
| .doPost(<js>"http://localhost:10000/foo"</js>, <jk>new</jk> MyBean()) |
| .run(); |
| </p> |
| |
| <ul class='seealso'> |
| <li class='jf'><a href="../../../../../org/apache/juneau/serializer/WriterSerializer.html#WSERIALIZER_useWhitespace"><code>WriterSerializer.WSERIALIZER_useWhitespace</code></a> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#ws--">ws</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="xml--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>xml</h4> |
| <pre>public <a href="../../../../../org/apache/juneau/rest/mock2/MockRestClientBuilder.html" title="class in org.apache.juneau.rest.mock2">MockRestClientBuilder</a> <a href="../../../../../src-html/org/apache/juneau/rest/mock2/MockRestClientBuilder.html#line.1635">xml</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#xml--">RestClientBuilder</a></code></span></div> |
| <div class="block">Convenience method for specifying XML as the marshalling transmission media type. |
| |
| <p> |
| <a href="../../../../../org/apache/juneau/xml/XmlSerializer.html" title="class in org.apache.juneau.xml"><code>XmlSerializer</code></a> will be used to serialize POJOs to request bodies unless overridden per request via <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#serializer-org.apache.juneau.serializer.Serializer-"><code>RestRequest.serializer(Serializer)</code></a>. |
| <ul> |
| <li>The serializer can be configured using any of the serializer property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#sortCollections--"><code>RestClientBuilder.sortCollections()</code></a>), |
| bean context property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#swaps-java.lang.Object...-"><code>RestClientBuilder.swaps(Object...)</code></a>), or generic property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#set-java.lang.String-java.lang.Object-"><code>RestClientBuilder.set(String, Object)</code></a>) defined on this builder class. |
| </ul> |
| <p> |
| <a href="../../../../../org/apache/juneau/xml/XmlParser.html" title="class in org.apache.juneau.xml"><code>XmlParser</code></a> will be used to parse POJOs from response bodies unless overridden per request via <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#parser-org.apache.juneau.parser.Parser-"><code>RestRequest.parser(Parser)</code></a>. |
| <ul> |
| <li>The parser can be configured using any of the parser property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#strict--"><code>RestClientBuilder.strict()</code></a>), |
| bean context property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#swaps-java.lang.Object...-"><code>RestClientBuilder.swaps(Object...)</code></a>), or generic property setters (e.g. <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#set-java.lang.String-java.lang.Object-"><code>RestClientBuilder.set(String, Object)</code></a>) defined on this builder class. |
| </ul> |
| <p> |
| <c>Accept</c> request header will be set to <js>"text/xml"</js> unless overridden |
| by <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#header-java.lang.String-java.lang.Object-"><code>RestClientBuilder.header(String,Object)</code></a> or <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#accept-java.lang.Object-"><code>RestClientBuilder.accept(Object)</code></a>, or per-request via <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#header-java.lang.String-java.lang.Object-"><code>RestRequest.header(String,Object)</code></a> or <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#accept-java.lang.Object-"><code>RestRequest.accept(Object)</code></a>. |
| <p> |
| <c>Content-Type</c> request header will be set to <js>"text/xml"</js> unless overridden |
| by <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#header-java.lang.String-java.lang.Object-"><code>RestClientBuilder.header(String,Object)</code></a> or <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#contentType-java.lang.Object-"><code>RestClientBuilder.contentType(Object)</code></a>, or per-request via <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#header-java.lang.String-java.lang.Object-"><code>RestRequest.header(String,Object)</code></a> or <a href="../../../../../org/apache/juneau/rest/client2/RestRequest.html#contentType-java.lang.Object-"><code>RestRequest.contentType(Object)</code></a>. |
| <p> |
| Can be combined with other marshaller setters such as <a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#json--"><code>RestClientBuilder.json()</code></a> to provide support for multiple languages. |
| <ul> |
| <li>When multiple languages are supported, the <c>Accept</c> and <c>Content-Type</c> headers control which marshallers are used, or uses the |
| last-enabled language if the headers are not set. |
| </ul> |
| <p> |
| Identical to calling <c>serializer(XmlSerializer.<jk>class</jk>).parser(XmlParser.<jk>class</jk>)</c>. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bcode w800'> |
| <jc>// Construct a client that uses XML marshalling.</jc> |
| RestClient <jv>client</jv> = RestClient.<jsm>create</jsm>().xml().build(); |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html#xml--">xml</a></code> in class <code><a href="../../../../../org/apache/juneau/rest/client2/RestClientBuilder.html" title="class in org.apache.juneau.rest.client2">RestClientBuilder</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This object (for method chaining).</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../org/apache/juneau/rest/mock2/MockRestClient.html" title="class in org.apache.juneau.rest.mock2"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/juneau/rest/mock2/MockRestRequest.html" title="class in org.apache.juneau.rest.mock2"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/juneau/rest/mock2/MockRestClientBuilder.html" target="_top">Frames</a></li> |
| <li><a href="MockRestClientBuilder.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 2016–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </body> |
| </html> |