blob: 33c649ac09f1376ed79518f5e1a38b40a5f7d2ba [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (12) on Mon Aug 12 13:20:58 GMT 2019 -->
<title>Client (jakarta.ws.rs-api 2.1.6 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2019-08-12">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
<script type="text/javascript" src="../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../jquery/jquery-3.3.1.js"></script>
<script type="text/javascript" src="../../../../jquery/jquery-migrate-3.0.1.js"></script>
<script type="text/javascript" src="../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Client (jakarta.ws.rs-api 2.1.6 API)";
}
}
catch(err) {
}
//-->
var data = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../";
var useModuleDirectories = true;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Client.html">Use</a></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">
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
</div>
<a id="skip.navbar.top">
<!-- -->
</a>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">javax.ws.rs.client</a></div>
<h2 title="Interface Client" class="title">Interface Client</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Superinterfaces:</dt>
<dd><code><a href="../core/Configurable.html" title="interface in javax.ws.rs.core">Configurable</a>&lt;<a href="Client.html" title="interface in javax.ws.rs.client">Client</a>&gt;</code></dd>
</dl>
<hr>
<pre>public interface <span class="typeNameLabel">Client</span>
extends <a href="../core/Configurable.html" title="interface in javax.ws.rs.core">Configurable</a>&lt;<a href="Client.html" title="interface in javax.ws.rs.client">Client</a>&gt;</pre>
<div class="block">Client is the main entry point to the fluent API used to build and execute client
requests in order to consume responses returned.
<p/>
Clients are heavy-weight objects that manage the client-side communication
infrastructure. Initialization as well as disposal of a <code>Client</code> instance
may be a rather expensive operation. It is therefore advised to construct only
a small number of <code>Client</code> instances in the application. Client instances
must be <a href="#close()"><code>properly closed</code></a> before being disposed to avoid leaking
resources.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.0</dd>
<dt><span class="simpleTagLabel">Author:</span></dt>
<dd>Marek Potociar</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../core/Configurable.html" title="interface in javax.ws.rs.core"><code>Configurable</code></a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<div class="memberSummary">
<div role="tablist" aria-orientation="horizontal"><button role="tab" aria-selected="true" aria-controls="memberSummary_tabpanel" tabindex="0" onkeydown="switchTab(event)" id="t0" class="activeTableTab">All Methods</button><button role="tab" aria-selected="false" aria-controls="memberSummary_tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t2" class="tableTab" onclick="show(2);">Instance Methods</button><button role="tab" aria-selected="false" aria-controls="memberSummary_tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t3" class="tableTab" onclick="show(4);">Abstract Methods</button></div>
<div id="memberSummary_tabpanel" role="tabpanel">
<table aria-labelledby="t0">
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor" id="i0">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#close()">close</a></span>()</code></th>
<td class="colLast">
<div class="block">Close client instance and all it's associated resources.</div>
</td>
</tr>
<tr class="rowColor" id="i1">
<td class="colFirst"><code><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" class="externalLink">HostnameVerifier</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getHostnameVerifier()">getHostnameVerifier</a></span>()</code></th>
<td class="colLast">
<div class="block">Get the hostname verifier configured in the client or <code>null</code> in case
no hostname verifier has been configured.</div>
</td>
</tr>
<tr class="altColor" id="i2">
<td class="colFirst"><code><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" class="externalLink">SSLContext</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getSslContext()">getSslContext</a></span>()</code></th>
<td class="colLast">
<div class="block">Get the SSL context configured to be used with the current client run-time.</div>
</td>
</tr>
<tr class="rowColor" id="i3">
<td class="colFirst"><code><a href="Invocation.Builder.html" title="interface in javax.ws.rs.client">Invocation.Builder</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#invocation(javax.ws.rs.core.Link)">invocation</a></span>&#8203;(<a href="../core/Link.html" title="class in javax.ws.rs.core">Link</a>&nbsp;link)</code></th>
<td class="colLast">
<div class="block">Build an invocation builder from a link.</div>
</td>
</tr>
<tr class="altColor" id="i4">
<td class="colFirst"><code><a href="WebTarget.html" title="interface in javax.ws.rs.client">WebTarget</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#target(java.lang.String)">target</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;uri)</code></th>
<td class="colLast">
<div class="block">Build a new web resource target.</div>
</td>
</tr>
<tr class="rowColor" id="i5">
<td class="colFirst"><code><a href="WebTarget.html" title="interface in javax.ws.rs.client">WebTarget</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#target(java.net.URI)">target</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net" class="externalLink">URI</a>&nbsp;uri)</code></th>
<td class="colLast">
<div class="block">Build a new web resource target.</div>
</td>
</tr>
<tr class="altColor" id="i6">
<td class="colFirst"><code><a href="WebTarget.html" title="interface in javax.ws.rs.client">WebTarget</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#target(javax.ws.rs.core.Link)">target</a></span>&#8203;(<a href="../core/Link.html" title="class in javax.ws.rs.core">Link</a>&nbsp;link)</code></th>
<td class="colLast">
<div class="block">Build a new web resource target.</div>
</td>
</tr>
<tr class="rowColor" id="i7">
<td class="colFirst"><code><a href="WebTarget.html" title="interface in javax.ws.rs.client">WebTarget</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#target(javax.ws.rs.core.UriBuilder)">target</a></span>&#8203;(<a href="../core/UriBuilder.html" title="class in javax.ws.rs.core">UriBuilder</a>&nbsp;uriBuilder)</code></th>
<td class="colLast">
<div class="block">Build a new web resource target.</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.javax.ws.rs.core.Configurable">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;javax.ws.rs.core.<a href="../core/Configurable.html" title="interface in javax.ws.rs.core">Configurable</a></h3>
<code><a href="../core/Configurable.html#getConfiguration()">getConfiguration</a>, <a href="../core/Configurable.html#property(java.lang.String,java.lang.Object)">property</a>, <a href="../core/Configurable.html#register(java.lang.Class)">register</a>, <a href="../core/Configurable.html#register(java.lang.Class,int)">register</a>, <a href="../core/Configurable.html#register(java.lang.Class,java.lang.Class...)">register</a>, <a href="../core/Configurable.html#register(java.lang.Class,java.util.Map)">register</a>, <a href="../core/Configurable.html#register(java.lang.Object)">register</a>, <a href="../core/Configurable.html#register(java.lang.Object,int)">register</a>, <a href="../core/Configurable.html#register(java.lang.Object,java.lang.Class...)">register</a>, <a href="../core/Configurable.html#register(java.lang.Object,java.util.Map)">register</a></code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="close()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>close</h4>
<pre class="methodSignature">void&nbsp;close()</pre>
<div class="block">Close client instance and all it's associated resources. Subsequent calls
have no effect and are ignored. Once the client is closed, invoking any
other method on the client instance would result in an <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>IllegalStateException</code></a>
being thrown.
<p/>
Calling this method effectively invalidates all <a href="WebTarget.html" title="interface in javax.ws.rs.client"><code>resource targets</code></a>
produced by the client instance. Invoking any method on such targets once the client
is closed would result in an <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>IllegalStateException</code></a> being thrown.</div>
</li>
</ul>
<a id="target(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>target</h4>
<pre class="methodSignature"><a href="WebTarget.html" title="interface in javax.ws.rs.client">WebTarget</a>&nbsp;target&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;uri)</pre>
<div class="block">Build a new web resource target.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>uri</code> - web resource URI. May contain template parameters. Must not be <code>null</code>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>web resource target bound to the provided URI.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></code> - in case the supplied string is not a valid URI template.</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang" class="externalLink">NullPointerException</a></code> - in case the supplied argument is <code>null</code>.</dd>
</dl>
</li>
</ul>
<a id="target(java.net.URI)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>target</h4>
<pre class="methodSignature"><a href="WebTarget.html" title="interface in javax.ws.rs.client">WebTarget</a>&nbsp;target&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net" class="externalLink">URI</a>&nbsp;uri)</pre>
<div class="block">Build a new web resource target.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>uri</code> - web resource URI. Must not be <code>null</code>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>web resource target bound to the provided URI.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang" class="externalLink">NullPointerException</a></code> - in case the supplied argument is <code>null</code>.</dd>
</dl>
</li>
</ul>
<a id="target(javax.ws.rs.core.UriBuilder)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>target</h4>
<pre class="methodSignature"><a href="WebTarget.html" title="interface in javax.ws.rs.client">WebTarget</a>&nbsp;target&#8203;(<a href="../core/UriBuilder.html" title="class in javax.ws.rs.core">UriBuilder</a>&nbsp;uriBuilder)</pre>
<div class="block">Build a new web resource target.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>uriBuilder</code> - web resource URI represented as URI builder. Must not be <code>null</code>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>web resource target bound to the provided URI.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang" class="externalLink">NullPointerException</a></code> - in case the supplied argument is <code>null</code>.</dd>
</dl>
</li>
</ul>
<a id="target(javax.ws.rs.core.Link)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>target</h4>
<pre class="methodSignature"><a href="WebTarget.html" title="interface in javax.ws.rs.client">WebTarget</a>&nbsp;target&#8203;(<a href="../core/Link.html" title="class in javax.ws.rs.core">Link</a>&nbsp;link)</pre>
<div class="block">Build a new web resource target.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>link</code> - link to a web resource. Must not be <code>null</code>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>web resource target bound to the linked web resource.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang" class="externalLink">NullPointerException</a></code> - in case the supplied argument is <code>null</code>.</dd>
</dl>
</li>
</ul>
<a id="invocation(javax.ws.rs.core.Link)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>invocation</h4>
<pre class="methodSignature"><a href="Invocation.Builder.html" title="interface in javax.ws.rs.client">Invocation.Builder</a>&nbsp;invocation&#8203;(<a href="../core/Link.html" title="class in javax.ws.rs.core">Link</a>&nbsp;link)</pre>
<div class="block"><p>Build an invocation builder from a link. It uses the URI and the type
of the link to initialize the invocation builder. The type is used as the
initial value for the HTTP Accept header, if present.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>link</code> - link to build invocation from. Must not be <code>null</code>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>newly created invocation builder.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang" class="externalLink">NullPointerException</a></code> - in case link is <code>null</code>.</dd>
</dl>
</li>
</ul>
<a id="getSslContext()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSslContext</h4>
<pre class="methodSignature"><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" class="externalLink">SSLContext</a>&nbsp;getSslContext()</pre>
<div class="block">Get the SSL context configured to be used with the current client run-time.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>SSL context configured to be used with the current client run-time.</dd>
</dl>
</li>
</ul>
<a id="getHostnameVerifier()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getHostnameVerifier</h4>
<pre class="methodSignature"><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" class="externalLink">HostnameVerifier</a>&nbsp;getHostnameVerifier()</pre>
<div class="block">Get the hostname verifier configured in the client or <code>null</code> in case
no hostname verifier has been configured.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>client hostname verifier or <code>null</code> if not set.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Client.html">Use</a></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">
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
<p class="legalCopy"><small>Copyright (c) 2019 Eclipse Foundation. Licensed under <a href="resources/EFSL.html">Eclipse Foundation Specification License</a>.</small></p>
</footer>
</body>
</html>