blob: 4ccd34b76e0d93843ae99bc4aebda6999b9988fb [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<title>UriInfo</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="UriInfo";
}
}
catch(err) {
}
//-->
var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6,"i10":6,"i11":6,"i12":6,"i13":6,"i14":6,"i15":6,"i16":6,"i17":6,"i18":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";
</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="../../../../jakarta/ws/rs/core/UriBuilderException.html" title="class in jakarta.ws.rs.core"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../jakarta/ws/rs/core/Variant.html" title="class in jakarta.ws.rs.core"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?jakarta/ws/rs/core/UriInfo.html" target="_top">Frames</a></li>
<li><a href="UriInfo.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;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:&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>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">jakarta.ws.rs.core</div>
<h2 title="Interface UriInfo" class="title">Interface UriInfo</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public interface <span class="typeNameLabel">UriInfo</span></pre>
<div class="block">An injectable interface that provides access to application and request URI information. Relative URIs are relative
to the base URI of the application, see <a href="../../../../jakarta/ws/rs/core/UriInfo.html#getBaseUri--"><code>getBaseUri()</code></a>.
<p>
All methods throw <code>java.lang.IllegalStateException</code> if called outside the scope of a request (e.g. from a
provider constructor).
</p></div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.0</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../jakarta/ws/rs/core/Context.html" title="annotation in jakarta.ws.rs.core"><code>Context</code></a></dd>
</dl>
</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">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</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>java.net.URI</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/core/UriInfo.html#getAbsolutePath--">getAbsolutePath</a></span>()</code>
<div class="block">Get the absolute path of the request.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="../../../../jakarta/ws/rs/core/UriBuilder.html" title="class in jakarta.ws.rs.core">UriBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/core/UriInfo.html#getAbsolutePathBuilder--">getAbsolutePathBuilder</a></span>()</code>
<div class="block">Get the absolute path of the request in the form of a UriBuilder.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>java.net.URI</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/core/UriInfo.html#getBaseUri--">getBaseUri</a></span>()</code>
<div class="block">Get the base URI of the application.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="../../../../jakarta/ws/rs/core/UriBuilder.html" title="class in jakarta.ws.rs.core">UriBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/core/UriInfo.html#getBaseUriBuilder--">getBaseUriBuilder</a></span>()</code>
<div class="block">Get the base URI of the application in the form of a UriBuilder.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>java.util.List&lt;java.lang.Object&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/core/UriInfo.html#getMatchedResources--">getMatchedResources</a></span>()</code>
<div class="block">Get a read-only list of the currently matched resource class instances.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>java.util.List&lt;java.lang.String&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/core/UriInfo.html#getMatchedURIs--">getMatchedURIs</a></span>()</code>
<div class="block">Get a read-only list of URIs for matched resources.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>java.util.List&lt;java.lang.String&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/core/UriInfo.html#getMatchedURIs-boolean-">getMatchedURIs</a></span>(boolean&nbsp;decode)</code>
<div class="block">Get a read-only list of URIs for matched resources.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/core/UriInfo.html#getPath--">getPath</a></span>()</code>
<div class="block">Get the path of the current request relative to the base URI as a string.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/core/UriInfo.html#getPath-boolean-">getPath</a></span>(boolean&nbsp;decode)</code>
<div class="block">Get the path of the current request relative to the base URI as a string.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code><a href="../../../../jakarta/ws/rs/core/MultivaluedMap.html" title="interface in jakarta.ws.rs.core">MultivaluedMap</a>&lt;java.lang.String,java.lang.String&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/core/UriInfo.html#getPathParameters--">getPathParameters</a></span>()</code>
<div class="block">Get the values of any embedded URI template parameters.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code><a href="../../../../jakarta/ws/rs/core/MultivaluedMap.html" title="interface in jakarta.ws.rs.core">MultivaluedMap</a>&lt;java.lang.String,java.lang.String&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/core/UriInfo.html#getPathParameters-boolean-">getPathParameters</a></span>(boolean&nbsp;decode)</code>
<div class="block">Get the values of any embedded URI template parameters.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>java.util.List&lt;<a href="../../../../jakarta/ws/rs/core/PathSegment.html" title="interface in jakarta.ws.rs.core">PathSegment</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/core/UriInfo.html#getPathSegments--">getPathSegments</a></span>()</code>
<div class="block">Get the path of the current request relative to the base URI as a list of <a href="../../../../jakarta/ws/rs/core/PathSegment.html" title="interface in jakarta.ws.rs.core"><code>PathSegment</code></a>.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>java.util.List&lt;<a href="../../../../jakarta/ws/rs/core/PathSegment.html" title="interface in jakarta.ws.rs.core">PathSegment</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/core/UriInfo.html#getPathSegments-boolean-">getPathSegments</a></span>(boolean&nbsp;decode)</code>
<div class="block">Get the path of the current request relative to the base URI as a list of <a href="../../../../jakarta/ws/rs/core/PathSegment.html" title="interface in jakarta.ws.rs.core"><code>PathSegment</code></a>.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code><a href="../../../../jakarta/ws/rs/core/MultivaluedMap.html" title="interface in jakarta.ws.rs.core">MultivaluedMap</a>&lt;java.lang.String,java.lang.String&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/core/UriInfo.html#getQueryParameters--">getQueryParameters</a></span>()</code>
<div class="block">Get the URI query parameters of the current request.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code><a href="../../../../jakarta/ws/rs/core/MultivaluedMap.html" title="interface in jakarta.ws.rs.core">MultivaluedMap</a>&lt;java.lang.String,java.lang.String&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/core/UriInfo.html#getQueryParameters-boolean-">getQueryParameters</a></span>(boolean&nbsp;decode)</code>
<div class="block">Get the URI query parameters of the current request.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>java.net.URI</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/core/UriInfo.html#getRequestUri--">getRequestUri</a></span>()</code>
<div class="block">Get the absolute request URI including any query parameters.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code><a href="../../../../jakarta/ws/rs/core/UriBuilder.html" title="class in jakarta.ws.rs.core">UriBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/core/UriInfo.html#getRequestUriBuilder--">getRequestUriBuilder</a></span>()</code>
<div class="block">Get the absolute request URI in the form of a UriBuilder.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>java.net.URI</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/core/UriInfo.html#relativize-java.net.URI-">relativize</a></span>(java.net.URI&nbsp;uri)</code>
<div class="block">Relativize a URI with respect to the current request URI.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>java.net.URI</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/core/UriInfo.html#resolve-java.net.URI-">resolve</a></span>(java.net.URI&nbsp;uri)</code>
<div class="block">Resolve a relative URI with respect to the base URI of the application.</div>
</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="getPath--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPath</h4>
<pre>java.lang.String&nbsp;getPath()</pre>
<div class="block">Get the path of the current request relative to the base URI as a string. All sequences of escaped octets are
decoded, equivalent to <a href="../../../../jakarta/ws/rs/core/UriInfo.html#getPath-boolean-"><code>getPath(true)</code></a>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the relative URI path.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalStateException</code> - if called outside the scope of a request.</dd>
</dl>
</li>
</ul>
<a name="getPath-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPath</h4>
<pre>java.lang.String&nbsp;getPath(boolean&nbsp;decode)</pre>
<div class="block">Get the path of the current request relative to the base URI as a string.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>decode</code> - controls whether sequences of escaped octets are decoded (<code>true</code>) or not (<code>false</code>).</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the relative URI path</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalStateException</code> - if called outside the scope of a request.</dd>
</dl>
</li>
</ul>
<a name="getPathSegments--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPathSegments</h4>
<pre>java.util.List&lt;<a href="../../../../jakarta/ws/rs/core/PathSegment.html" title="interface in jakarta.ws.rs.core">PathSegment</a>&gt;&nbsp;getPathSegments()</pre>
<div class="block">Get the path of the current request relative to the base URI as a list of <a href="../../../../jakarta/ws/rs/core/PathSegment.html" title="interface in jakarta.ws.rs.core"><code>PathSegment</code></a>. This method is useful
when the path needs to be parsed, particularly when matrix parameters may be present in the path. All sequences of
escaped octets in path segments and matrix parameter values are decoded, equivalent to <code>getPathSegments(true)</code>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an unmodifiable list of <a href="../../../../jakarta/ws/rs/core/PathSegment.html" title="interface in jakarta.ws.rs.core"><code>PathSegment</code></a>. The matrix parameter map of each path segment is also
unmodifiable.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalStateException</code> - if called outside the scope of a request</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../jakarta/ws/rs/core/PathSegment.html" title="interface in jakarta.ws.rs.core"><code>PathSegment</code></a>,
<a href="http://www.w3.org/DesignIssues/MatrixURIs.html">Matrix URIs</a></dd>
</dl>
</li>
</ul>
<a name="getPathSegments-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPathSegments</h4>
<pre>java.util.List&lt;<a href="../../../../jakarta/ws/rs/core/PathSegment.html" title="interface in jakarta.ws.rs.core">PathSegment</a>&gt;&nbsp;getPathSegments(boolean&nbsp;decode)</pre>
<div class="block">Get the path of the current request relative to the base URI as a list of <a href="../../../../jakarta/ws/rs/core/PathSegment.html" title="interface in jakarta.ws.rs.core"><code>PathSegment</code></a>. This method is useful
when the path needs to be parsed, particularly when matrix parameters may be present in the path.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>decode</code> - controls whether sequences of escaped octets in path segments and matrix parameter values are decoded
(<code>true</code>) or not (<code>false</code>).</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an unmodifiable list of <a href="../../../../jakarta/ws/rs/core/PathSegment.html" title="interface in jakarta.ws.rs.core"><code>PathSegment</code></a>. The matrix parameter map of each path segment is also
unmodifiable.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalStateException</code> - if called outside the scope of a request</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../jakarta/ws/rs/core/PathSegment.html" title="interface in jakarta.ws.rs.core"><code>PathSegment</code></a>,
<a href="http://www.w3.org/DesignIssues/MatrixURIs.html">Matrix URIs</a></dd>
</dl>
</li>
</ul>
<a name="getRequestUri--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRequestUri</h4>
<pre>java.net.URI&nbsp;getRequestUri()</pre>
<div class="block">Get the absolute request URI including any query parameters.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the absolute request URI</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalStateException</code> - if called outside the scope of a request</dd>
</dl>
</li>
</ul>
<a name="getRequestUriBuilder--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRequestUriBuilder</h4>
<pre><a href="../../../../jakarta/ws/rs/core/UriBuilder.html" title="class in jakarta.ws.rs.core">UriBuilder</a>&nbsp;getRequestUriBuilder()</pre>
<div class="block">Get the absolute request URI in the form of a UriBuilder.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a UriBuilder initialized with the absolute request URI.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalStateException</code> - if called outside the scope of a request.</dd>
</dl>
</li>
</ul>
<a name="getAbsolutePath--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAbsolutePath</h4>
<pre>java.net.URI&nbsp;getAbsolutePath()</pre>
<div class="block">Get the absolute path of the request. This includes everything preceding the path (host, port etc) but excludes query
parameters. This is a shortcut for <code>uriInfo.getBaseUri().resolve(uriInfo.getPath(false))</code>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the absolute path of the request.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalStateException</code> - if called outside the scope of a request.</dd>
</dl>
</li>
</ul>
<a name="getAbsolutePathBuilder--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAbsolutePathBuilder</h4>
<pre><a href="../../../../jakarta/ws/rs/core/UriBuilder.html" title="class in jakarta.ws.rs.core">UriBuilder</a>&nbsp;getAbsolutePathBuilder()</pre>
<div class="block">Get the absolute path of the request in the form of a UriBuilder. This includes everything preceding the path (host,
port etc) but excludes query parameters.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a UriBuilder initialized with the absolute path of the request.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalStateException</code> - if called outside the scope of a request.</dd>
</dl>
</li>
</ul>
<a name="getBaseUri--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBaseUri</h4>
<pre>java.net.URI&nbsp;getBaseUri()</pre>
<div class="block">Get the base URI of the application. URIs of root resource classes are all relative to this base URI.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the base URI of the application.</dd>
</dl>
</li>
</ul>
<a name="getBaseUriBuilder--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBaseUriBuilder</h4>
<pre><a href="../../../../jakarta/ws/rs/core/UriBuilder.html" title="class in jakarta.ws.rs.core">UriBuilder</a>&nbsp;getBaseUriBuilder()</pre>
<div class="block">Get the base URI of the application in the form of a UriBuilder.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a UriBuilder initialized with the base URI of the application.</dd>
</dl>
</li>
</ul>
<a name="getPathParameters--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPathParameters</h4>
<pre><a href="../../../../jakarta/ws/rs/core/MultivaluedMap.html" title="interface in jakarta.ws.rs.core">MultivaluedMap</a>&lt;java.lang.String,java.lang.String&gt;&nbsp;getPathParameters()</pre>
<div class="block">Get the values of any embedded URI template parameters. All sequences of escaped octets are decoded, equivalent to
<a href="../../../../jakarta/ws/rs/core/UriInfo.html#getPathParameters-boolean-"><code>getPathParameters(true)</code></a>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an unmodifiable map of parameter names and values.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalStateException</code> - if called outside the scope of a request.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../jakarta/ws/rs/Path.html" title="annotation in jakarta.ws.rs"><code>Path</code></a>,
<a href="../../../../jakarta/ws/rs/PathParam.html" title="annotation in jakarta.ws.rs"><code>PathParam</code></a></dd>
</dl>
</li>
</ul>
<a name="getPathParameters-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPathParameters</h4>
<pre><a href="../../../../jakarta/ws/rs/core/MultivaluedMap.html" title="interface in jakarta.ws.rs.core">MultivaluedMap</a>&lt;java.lang.String,java.lang.String&gt;&nbsp;getPathParameters(boolean&nbsp;decode)</pre>
<div class="block">Get the values of any embedded URI template parameters.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>decode</code> - controls whether sequences of escaped octets are decoded (<code>true</code>) or not (<code>false</code>).</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an unmodifiable map of parameter names and values</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalStateException</code> - if called outside the scope of a request.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../jakarta/ws/rs/Path.html" title="annotation in jakarta.ws.rs"><code>Path</code></a>,
<a href="../../../../jakarta/ws/rs/PathParam.html" title="annotation in jakarta.ws.rs"><code>PathParam</code></a></dd>
</dl>
</li>
</ul>
<a name="getQueryParameters--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getQueryParameters</h4>
<pre><a href="../../../../jakarta/ws/rs/core/MultivaluedMap.html" title="interface in jakarta.ws.rs.core">MultivaluedMap</a>&lt;java.lang.String,java.lang.String&gt;&nbsp;getQueryParameters()</pre>
<div class="block">Get the URI query parameters of the current request. The map keys are the names of the query parameters with any
escaped characters decoded. All sequences of escaped octets in parameter names and values are decoded, equivalent to
<a href="../../../../jakarta/ws/rs/core/UriInfo.html#getQueryParameters-boolean-"><code>getQueryParameters(true)</code></a>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an unmodifiable map of query parameter names and values.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalStateException</code> - if called outside the scope of a request.</dd>
</dl>
</li>
</ul>
<a name="getQueryParameters-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getQueryParameters</h4>
<pre><a href="../../../../jakarta/ws/rs/core/MultivaluedMap.html" title="interface in jakarta.ws.rs.core">MultivaluedMap</a>&lt;java.lang.String,java.lang.String&gt;&nbsp;getQueryParameters(boolean&nbsp;decode)</pre>
<div class="block">Get the URI query parameters of the current request. The map keys are the names of the query parameters with any
escaped characters decoded.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>decode</code> - controls whether sequences of escaped octets in parameter names and values are decoded (<code>true</code>)
or not (<code>false</code>).</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an unmodifiable map of query parameter names and values.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalStateException</code> - if called outside the scope of a request.</dd>
</dl>
</li>
</ul>
<a name="getMatchedURIs--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMatchedURIs</h4>
<pre>java.util.List&lt;java.lang.String&gt;&nbsp;getMatchedURIs()</pre>
<div class="block">Get a read-only list of URIs for matched resources.
Each entry is a relative URI that matched a resource class, a sub-resource method or a sub-resource locator. All
sequences of escaped octets are decoded, equivalent to <code>getMatchedURIs(true)</code>. Entries do not include query
parameters but do include matrix parameters if present in the request URI. Entries are ordered in reverse request URI
matching order, with the current resource URI first. E.g. given the following resource classes:
<pre>
&#064;Path("foo")
public class FooResource {
&#064;GET
public String getFoo() {...}
&#064;Path("bar")
public BarResource getBarResource() {...}
}
public class BarResource {
&#064;GET
public String getBar() {...}
}
</pre>
<p>
The values returned by this method based on request uri and where the method is called from are:
</p>
<table border="1">
<caption>Matched URIs from requests</caption>
<tr>
<th>Request</th>
<th>Called from</th>
<th>Value(s)</th>
</tr>
<tr>
<td>GET /foo</td>
<td>FooResource.getFoo</td>
<td>foo</td>
</tr>
<tr>
<td>GET /foo/bar</td>
<td>FooResource.getBarResource</td>
<td>foo/bar, foo</td>
</tr>
<tr>
<td>GET /foo/bar</td>
<td>BarResource.getBar</td>
<td>foo/bar, foo</td>
</tr>
</table>
In case the method is invoked prior to the request matching (e.g. from a pre-matching filter), the method returns an
empty list.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a read-only list of URI paths for matched resources.</dd>
</dl>
</li>
</ul>
<a name="getMatchedURIs-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMatchedURIs</h4>
<pre>java.util.List&lt;java.lang.String&gt;&nbsp;getMatchedURIs(boolean&nbsp;decode)</pre>
<div class="block">Get a read-only list of URIs for matched resources.
Each entry is a relative URI that matched a resource class, a sub-resource method or a sub-resource locator. Entries
do not include query parameters but do include matrix parameters if present in the request URI. Entries are ordered
in reverse request URI matching order, with the current resource URI first. See <a href="../../../../jakarta/ws/rs/core/UriInfo.html#getMatchedURIs--"><code>getMatchedURIs()</code></a> for an
example.
In case the method is invoked prior to the request matching (e.g. from a pre-matching filter), the method returns an
empty list.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>decode</code> - controls whether sequences of escaped octets are decoded (<code>true</code>) or not (<code>false</code>).</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a read-only list of URI paths for matched resources.</dd>
</dl>
</li>
</ul>
<a name="getMatchedResources--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMatchedResources</h4>
<pre>java.util.List&lt;java.lang.Object&gt;&nbsp;getMatchedResources()</pre>
<div class="block">Get a read-only list of the currently matched resource class instances.
Each entry is a resource class instance that matched the request URI either directly or via a sub-resource method or
a sub-resource locator. Entries are ordered according to reverse request URI matching order, with the current
resource first. E.g. given the following resource classes:
<pre>
&#064;Path("foo")
public class FooResource {
&#064;GET
public String getFoo() {...}
&#064;Path("bar")
public BarResource getBarResource() {...}
}
public class BarResource {
&#064;GET
public String getBar() {...}
}
</pre>
<p>
The values returned by this method based on request uri and where the method is called from are:
</p>
<table border="1">
<caption>Matched resources from requests</caption>
<tr>
<th>Request</th>
<th>Called from</th>
<th>Value(s)</th>
</tr>
<tr>
<td>GET /foo</td>
<td>FooResource.getFoo</td>
<td>FooResource</td>
</tr>
<tr>
<td>GET /foo/bar</td>
<td>FooResource.getBarResource</td>
<td>FooResource</td>
</tr>
<tr>
<td>GET /foo/bar</td>
<td>BarResource.getBar</td>
<td>BarResource, FooResource</td>
</tr>
</table>
In case the method is invoked prior to the request matching (e.g. from a pre-matching filter), the method returns an
empty list.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a read-only list of matched resource class instances.</dd>
</dl>
</li>
</ul>
<a name="resolve-java.net.URI-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>resolve</h4>
<pre>java.net.URI&nbsp;resolve(java.net.URI&nbsp;uri)</pre>
<div class="block">Resolve a relative URI with respect to the base URI of the application. The resolved URI returned by this method is
normalized. If the supplied URI is already resolved, it is just returned.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>uri</code> - URI to resolve against the base URI of the application.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>newly resolved URI or supplied URI if already resolved.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.0</dd>
</dl>
</li>
</ul>
<a name="relativize-java.net.URI-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>relativize</h4>
<pre>java.net.URI&nbsp;relativize(java.net.URI&nbsp;uri)</pre>
<div class="block">Relativize a URI with respect to the current request URI. Relativization works as follows:
<ol>
<li>If the URI to relativize is already relative, it is first resolved using <a href="../../../../jakarta/ws/rs/core/UriInfo.html#resolve-java.net.URI-"><code>resolve(java.net.URI)</code></a>.</li>
<li>The resulting URI is relativized with respect to the current request URI. If the two URIs do not share a prefix,
the URI computed in step 1 is returned.</li>
</ol>
<p>
Examples (for base URI <code>http://example.com:8080/app/root/</code>): <br>
<br>
<b>Request URI:</b> <code>http://example.com:8080/app/root/a/b/c/resource.html</code> <br>
<b>Supplied URI:</b> <code>a/b/c/d/file.txt</code> <br>
<b>Returned URI:</b> <code>d/file.txt</code> <br>
<br>
<b>Request URI:</b> <code>http://example.com:8080/app/root/a/b/c/resource.html</code> <br>
<b>Supplied URI:</b> <code>http://example2.com:9090/app2/root2/a/d/file.txt</code> <br>
<b>Returned URI:</b> <code>http://example2.com:9090/app2/root2/a/d/file.txt</code>
</p>
<p>
In the second example, the supplied URI is returned given that it is absolute and there is no common prefix between
it and the request URI.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>uri</code> - URI to relativize against the request URI.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>newly relativized URI.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalStateException</code> - if called outside the scope of a request.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.0</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="../../../../jakarta/ws/rs/core/UriBuilderException.html" title="class in jakarta.ws.rs.core"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../jakarta/ws/rs/core/Variant.html" title="class in jakarta.ws.rs.core"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?jakarta/ws/rs/core/UriInfo.html" target="_top">Frames</a></li>
<li><a href="UriInfo.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;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:&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>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>