| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <title>RestClientBuilder</title> |
| <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.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="RestClientBuilder"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":18,"i1":6,"i2":6,"i3":6,"i4":17}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],16:["t5","Default 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>Prev Class</li> |
| <li><a href="../../../../../org/eclipse/microprofile/rest/client/RestClientDefinitionException.html" title="class in org.eclipse.microprofile.rest.client"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/eclipse/microprofile/rest/client/RestClientBuilder.html" target="_top">Frames</a></li> |
| <li><a href="RestClientBuilder.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>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </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.eclipse.microprofile.rest.client</div> |
| <h2 title="Interface RestClientBuilder" class="title">Interface RestClientBuilder</h2> |
| </div> |
| <div class="contentContainer"> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre>public interface <span class="typeNameLabel">RestClientBuilder</span></pre> |
| <div class="block">This is the main entry point for creating a Type Safe Rest Client. |
| <p> |
| Invoking <a href="../../../../../org/eclipse/microprofile/rest/client/RestClientBuilder.html#newBuilder--"><code>newBuilder()</code></a> is intended to always create a new instance, |
| not use a cached version. |
| </p> |
| <p> |
| The <code>RestClientBuilder</code> is a <code>Configurable</code> class as defined |
| by JAX-RS. This allows a user to register providers, implementation specific |
| configuration. |
| </p> |
| <p> |
| Implementations are expected to implement this class and provide the instance |
| via the mechanism in <a href="../../../../../org/eclipse/microprofile/rest/client/spi/RestClientBuilderResolver.html#instance--"><code>RestClientBuilderResolver.instance()</code></a>. |
| </p></div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========== 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="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></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="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span><span id="t5" class="tableTab"><span><a href="javascript:show(16);">Default 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>default <a href="../../../../../org/eclipse/microprofile/rest/client/RestClientBuilder.html" title="interface in org.eclipse.microprofile.rest.client">RestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/microprofile/rest/client/RestClientBuilder.html#baseUri-java.net.URI-">baseUri</a></span>(java.net.URI uri)</code> |
| <div class="block">Specifies the base URI to be used when making requests.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/eclipse/microprofile/rest/client/RestClientBuilder.html" title="interface in org.eclipse.microprofile.rest.client">RestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/microprofile/rest/client/RestClientBuilder.html#baseUrl-java.net.URL-">baseUrl</a></span>(java.net.URL url)</code> |
| <div class="block">Specifies the base URL to be used when making requests.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code><T> T</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/microprofile/rest/client/RestClientBuilder.html#build-java.lang.Class-">build</a></span>(java.lang.Class<T> clazz)</code> |
| <div class="block">Based on the configured RestClientBuilder, creates a new instance of the |
| given REST interface to invoke API calls against.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/eclipse/microprofile/rest/client/RestClientBuilder.html" title="interface in org.eclipse.microprofile.rest.client">RestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/microprofile/rest/client/RestClientBuilder.html#executorService-java.util.concurrent.ExecutorService-">executorService</a></span>(java.util.concurrent.ExecutorService executor)</code> |
| <div class="block">Specifies the <code>ExecutorService</code> to use when invoking |
| asynchronous Rest Client interface methods.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../../../org/eclipse/microprofile/rest/client/RestClientBuilder.html" title="interface in org.eclipse.microprofile.rest.client">RestClientBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/microprofile/rest/client/RestClientBuilder.html#newBuilder--">newBuilder</a></span>()</code> </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="newBuilder--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>newBuilder</h4> |
| <pre>static <a href="../../../../../org/eclipse/microprofile/rest/client/RestClientBuilder.html" title="interface in org.eclipse.microprofile.rest.client">RestClientBuilder</a> newBuilder()</pre> |
| </li> |
| </ul> |
| <a name="baseUrl-java.net.URL-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>baseUrl</h4> |
| <pre><a href="../../../../../org/eclipse/microprofile/rest/client/RestClientBuilder.html" title="interface in org.eclipse.microprofile.rest.client">RestClientBuilder</a> baseUrl(java.net.URL url)</pre> |
| <div class="block">Specifies the base URL to be used when making requests. Assuming that the |
| interface has a <code>@Path("/api")</code> at the interface level and a |
| <code>url</code> is given with |
| <code>http://my-service:8080/service</code> then all REST calls will be |
| invoked with a <code>url</code> of |
| <code>http://my-service:8080/service/api</code> in addition to any |
| <code>@Path</code> annotations included on the method. |
| |
| Subsequent calls to this method will replace the previously specified |
| baseUri/baseUrl.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>url</code> - the base Url for the service.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the current builder with the baseUrl set.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="baseUri-java.net.URI-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>baseUri</h4> |
| <pre>default <a href="../../../../../org/eclipse/microprofile/rest/client/RestClientBuilder.html" title="interface in org.eclipse.microprofile.rest.client">RestClientBuilder</a> baseUri(java.net.URI uri)</pre> |
| <div class="block">Specifies the base URI to be used when making requests. Assuming that the |
| interface has a <code>@Path("/api")</code> at the interface level and a |
| <code>uri</code> is given with |
| <code>http://my-service:8080/service</code> then all REST calls will be |
| invoked with a <code>uri</code> of |
| <code>http://my-service:8080/service/api</code> in addition to any |
| <code>@Path</code> annotations included on the method. |
| |
| Subsequent calls to this method will replace the previously specified |
| baseUri/baseUrl.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>uri</code> - the base URI for the service.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the current builder with the baseUri set</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.IllegalArgumentException</code> - if the passed in URI is invalid</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.1</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="executorService-java.util.concurrent.ExecutorService-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>executorService</h4> |
| <pre><a href="../../../../../org/eclipse/microprofile/rest/client/RestClientBuilder.html" title="interface in org.eclipse.microprofile.rest.client">RestClientBuilder</a> executorService(java.util.concurrent.ExecutorService executor)</pre> |
| <div class="block">Specifies the <code>ExecutorService</code> to use when invoking |
| asynchronous Rest Client interface methods. By default, the executor |
| service used is determined by the MP Rest Client implementation runtime.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>executor</code> - the executor service for the runtime to use when invoking |
| asynchronous Rest Client interface methods - must be non-null.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the current builder with the executorService set.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.IllegalArgumentException</code> - if the <code>executor</code> parameter is |
| null.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="build-java.lang.Class-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>build</h4> |
| <pre><T> T build(java.lang.Class<T> clazz) |
| throws java.lang.IllegalStateException, |
| <a href="../../../../../org/eclipse/microprofile/rest/client/RestClientDefinitionException.html" title="class in org.eclipse.microprofile.rest.client">RestClientDefinitionException</a></pre> |
| <div class="block">Based on the configured RestClientBuilder, creates a new instance of the |
| given REST interface to invoke API calls against.</div> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>T</code> - the type of the interface</dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>clazz</code> - the interface that defines REST API methods for use</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a new instance of an implementation of this REST interface that</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.IllegalStateException</code> - if not all pre-requisites are satisfied for |
| the builder, this exception may get thrown. For instance, if the base |
| URI/URL has not been set.</dd> |
| <dd><code><a href="../../../../../org/eclipse/microprofile/rest/client/RestClientDefinitionException.html" title="class in org.eclipse.microprofile.rest.client">RestClientDefinitionException</a></code> - if the passed-in interface class is |
| invalid.</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>Prev Class</li> |
| <li><a href="../../../../../org/eclipse/microprofile/rest/client/RestClientDefinitionException.html" title="class in org.eclipse.microprofile.rest.client"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/eclipse/microprofile/rest/client/RestClientBuilder.html" target="_top">Frames</a></li> |
| <li><a href="RestClientBuilder.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>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </body> |
| </html> |