blob: aaac1e887c186dc1f15fdf0cff78495c62adf617 [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>Configurable</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="Configurable";
}
}
catch(err) {
}
//-->
var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":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/CacheControl.html" title="class in jakarta.ws.rs.core"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../jakarta/ws/rs/core/Configuration.html" title="interface 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/Configurable.html" target="_top">Frames</a></li>
<li><a href="Configurable.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 Configurable" class="title">Interface Configurable&lt;C extends Configurable&gt;</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>C</code> - generic configurable Java type</dd>
</dl>
<dl>
<dt>All Known Subinterfaces:</dt>
<dd><a href="../../../../jakarta/ws/rs/client/Client.html" title="interface in jakarta.ws.rs.client">Client</a>, <a href="../../../../jakarta/ws/rs/core/FeatureContext.html" title="interface in jakarta.ws.rs.core">FeatureContext</a>, <a href="../../../../jakarta/ws/rs/client/WebTarget.html" title="interface in jakarta.ws.rs.client">WebTarget</a></dd>
</dl>
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><a href="../../../../jakarta/ws/rs/client/ClientBuilder.html" title="class in jakarta.ws.rs.client">ClientBuilder</a></dd>
</dl>
<hr>
<br>
<pre>public interface <span class="typeNameLabel">Configurable&lt;C extends Configurable&gt;</span></pre>
<div class="block">Represents a client or server-side configurable context in JAX-RS.
A configurable context can be used to define the JAX-RS components as well as additional meta-data that should be
used in the scope of the configured context. The modification of the context typically involves setting properties or
registering custom JAX-RS components, such as providers and/or features. All modifications of a <code>Configurable</code>
context are reflected in the associated <a href="../../../../jakarta/ws/rs/core/Configuration.html" title="interface in jakarta.ws.rs.core"><code>Configuration</code></a> state which is exposed via <a href="../../../../jakarta/ws/rs/core/Configurable.html#getConfiguration--"><code>getConfiguration()</code></a>
method.
<p>
A configurable context can be either indirectly associated with a particular JAX-RS component (such as application or
resource method configurable context passed to a <a href="../../../../jakarta/ws/rs/core/Feature.html" title="interface in jakarta.ws.rs.core"><code>Feature</code></a> or <a href="../../../../jakarta/ws/rs/container/DynamicFeature.html" title="interface in jakarta.ws.rs.container"><code>DynamicFeature</code></a>
meta-providers) or can be directly represented by a concrete JAX-RS component implementing the <code>Configurable</code>
interface (such as <a href="../../../../jakarta/ws/rs/client/Client.html" title="interface in jakarta.ws.rs.client"><code>Client</code></a> or <a href="../../../../jakarta/ws/rs/client/WebTarget.html" title="interface in jakarta.ws.rs.client"><code>WebTarget</code></a>). As such, the exact
scope of a configuration context is typically determined by a use case scenario in which the context is accessed.
</p>
<h2>Setting properties.</h2>
<p>
New properties can be set using the <a href="../../../../jakarta/ws/rs/core/Configurable.html#property-java.lang.String-java.lang.Object-"><code>property(java.lang.String, java.lang.Object)</code></a> method. Similarly, updating a value of an existing property can
be achieved using the same method. Information about the configured set of properties is available via the underlying
<code>Configuration</code> object. An existing property can be removed by assigning a <code>null</code> value to the property.
</p>
<h2>Registering JAX-RS components.</h2>
<p>
Registered custom JAX-RS component classes and instances are important part of the contextual configuration
information as these are the main factors that determine the capabilities of a configured runtime. Implementations
SHOULD warn about and ignore registrations that do not conform to the requirements of supported JAX-RS components in
a given configurable context.
</p>
<p>
In most cases, when registering a JAX-RS component, the simplest form of methods (<a href="../../../../jakarta/ws/rs/core/Configurable.html#register-java.lang.Class-"><code>register(Class)</code></a> or
<a href="../../../../jakarta/ws/rs/core/Configurable.html#register-java.lang.Object-"><code>register(Object)</code></a>) of the available registration API is sufficient.
</p>
<p>
For example:
</p>
<pre>
config.register(HtmlDocumentReader.class);
config.register(new HtmlDocumentWriter(writerConfig));
</pre>
<p>
In some situations a JAX-RS component class or instance may implement multiple provider contracts recognized by a
JAX-RS implementation (e.g. filter, interceptor or entity provider). By default, the JAX-RS implementation MUST
register the new component class or instance as a provider for all the recognized provider contracts implemented by
the component class.
</p>
<p>
For example:
</p>
<pre>
&#64;Priority(ENTITY_CODER)
public class GzipInterceptor
implements ReaderInterceptor, WriterInterceptor { ... }
...
// register GzipInterceptor as a ReaderInterceptor
// as well as a WriterInterceptor
config.register(GzipInterceptor.class);
</pre>
<p>
There are however situations when the default registration of a JAX-RS component to all the recognized provider
contracts is not desirable. In such cases users may use other versions of the <code>register(...)</code> method to
explicitly specify the collection of the provider contracts for which the JAX-RS component should be registered
and/or the priority of each registered provider contract.
</p>
<p>
For example:
</p>
<pre>
&#64;Priority(USER)
public class ClientLoggingFilter
implements ClientRequestFilter, ClientResponseFilter { ... }
&#64;Priority(ENTITY_CODER)
public class GzipInterceptor
implements ReaderInterceptor, WriterInterceptor { ... }
...
// register ClientLoggingFilter as a ClientResponseFilter only
config.register(ClientLoggingFilter.class, ClientResponseFilter.class);
// override the priority of registered GzipInterceptor
// and both of it's provider contracts
config.register(GzipInterceptor.class, 6500);
</pre>
<p>
As a general rule, for each JAX-RS component class there can be at most one registration &mdash; class-based or
instance-based &mdash; configured at any given moment. Implementations MUST reject any attempts to configure a new
registration for a provider class that has been already registered in the given configurable context earlier.
Implementations SHOULD also raise a warning to inform the user about the rejected component registration.
</p>
<p>
For example:
</p>
<pre>
config.register(GzipInterceptor.class, WriterInterceptor.class);
config.register(GzipInterceptor.class); // Rejected by runtime.
config.register(new GzipInterceptor()); // Rejected by runtime.
config.register(GzipInterceptor.class, 6500); // Rejected by runtime.
config.register(new ClientLoggingFilter());
config.register(ClientLoggingFilter.class); // rejected by runtime.
config.register(ClientLoggingFilter.class,
ClientResponseFilter.class); // Rejected by runtime.
</pre></div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.0</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><a href="../../../../jakarta/ws/rs/core/Configuration.html" title="interface in jakarta.ws.rs.core">Configuration</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/core/Configurable.html#getConfiguration--">getConfiguration</a></span>()</code>
<div class="block">Get a live view of an internal configuration state of this configurable instance.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="../../../../jakarta/ws/rs/core/Configurable.html" title="type parameter in Configurable">C</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/core/Configurable.html#property-java.lang.String-java.lang.Object-">property</a></span>(java.lang.String&nbsp;name,
java.lang.Object&nbsp;value)</code>
<div class="block">Set the new configuration property, if already set, the existing value of the property will be updated.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="../../../../jakarta/ws/rs/core/Configurable.html" title="type parameter in Configurable">C</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/core/Configurable.html#register-java.lang.Class-">register</a></span>(java.lang.Class&lt;?&gt;&nbsp;componentClass)</code>
<div class="block">Register a class of a custom JAX-RS component (such as an extension provider or a <a href="../../../../jakarta/ws/rs/core/Feature.html" title="interface in jakarta.ws.rs.core"><code>feature</code></a> meta-provider) to be instantiated and used in the scope of this configurable context.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="../../../../jakarta/ws/rs/core/Configurable.html" title="type parameter in Configurable">C</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/core/Configurable.html#register-java.lang.Class-java.lang.Class...-">register</a></span>(java.lang.Class&lt;?&gt;&nbsp;componentClass,
java.lang.Class&lt;?&gt;...&nbsp;contracts)</code>
<div class="block">Register a class of a custom JAX-RS component (such as an extension provider or a <a href="../../../../jakarta/ws/rs/core/Feature.html" title="interface in jakarta.ws.rs.core"><code>feature</code></a> meta-provider) to be instantiated and used in the scope of this configurable context.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="../../../../jakarta/ws/rs/core/Configurable.html" title="type parameter in Configurable">C</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/core/Configurable.html#register-java.lang.Class-int-">register</a></span>(java.lang.Class&lt;?&gt;&nbsp;componentClass,
int&nbsp;priority)</code>
<div class="block">Register a class of a custom JAX-RS component (such as an extension provider or a <a href="../../../../jakarta/ws/rs/core/Feature.html" title="interface in jakarta.ws.rs.core"><code>feature</code></a> meta-provider) to be instantiated and used in the scope of this configurable context.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code><a href="../../../../jakarta/ws/rs/core/Configurable.html" title="type parameter in Configurable">C</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/core/Configurable.html#register-java.lang.Class-java.util.Map-">register</a></span>(java.lang.Class&lt;?&gt;&nbsp;componentClass,
java.util.Map&lt;java.lang.Class&lt;?&gt;,java.lang.Integer&gt;&nbsp;contracts)</code>
<div class="block">Register a class of a custom JAX-RS component (such as an extension provider or a <a href="../../../../jakarta/ws/rs/core/Feature.html" title="interface in jakarta.ws.rs.core"><code>feature</code></a> meta-provider) to be instantiated and used in the scope of this configurable context.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="../../../../jakarta/ws/rs/core/Configurable.html" title="type parameter in Configurable">C</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/core/Configurable.html#register-java.lang.Object-">register</a></span>(java.lang.Object&nbsp;component)</code>
<div class="block">Register an instance of a custom JAX-RS component (such as an extension provider or a <a href="../../../../jakarta/ws/rs/core/Feature.html" title="interface in jakarta.ws.rs.core"><code>feature</code></a> meta-provider) to be instantiated and used in the scope of this configurable context.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code><a href="../../../../jakarta/ws/rs/core/Configurable.html" title="type parameter in Configurable">C</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/core/Configurable.html#register-java.lang.Object-java.lang.Class...-">register</a></span>(java.lang.Object&nbsp;component,
java.lang.Class&lt;?&gt;...&nbsp;contracts)</code>
<div class="block">Register an instance of a custom JAX-RS component (such as an extension provider or a <a href="../../../../jakarta/ws/rs/core/Feature.html" title="interface in jakarta.ws.rs.core"><code>feature</code></a> meta-provider) to be instantiated and used in the scope of this configurable context.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code><a href="../../../../jakarta/ws/rs/core/Configurable.html" title="type parameter in Configurable">C</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/core/Configurable.html#register-java.lang.Object-int-">register</a></span>(java.lang.Object&nbsp;component,
int&nbsp;priority)</code>
<div class="block">Register an instance of a custom JAX-RS component (such as an extension provider or a <a href="../../../../jakarta/ws/rs/core/Feature.html" title="interface in jakarta.ws.rs.core"><code>feature</code></a> meta-provider) to be instantiated and used in the scope of this configurable context.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code><a href="../../../../jakarta/ws/rs/core/Configurable.html" title="type parameter in Configurable">C</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/core/Configurable.html#register-java.lang.Object-java.util.Map-">register</a></span>(java.lang.Object&nbsp;component,
java.util.Map&lt;java.lang.Class&lt;?&gt;,java.lang.Integer&gt;&nbsp;contracts)</code>
<div class="block">Register an instance of a custom JAX-RS component (such as an extension provider or a <a href="../../../../jakarta/ws/rs/core/Feature.html" title="interface in jakarta.ws.rs.core"><code>feature</code></a> meta-provider) to be instantiated and used in the scope of this configurable context.</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="getConfiguration--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getConfiguration</h4>
<pre><a href="../../../../jakarta/ws/rs/core/Configuration.html" title="interface in jakarta.ws.rs.core">Configuration</a>&nbsp;getConfiguration()</pre>
<div class="block">Get a live view of an internal configuration state of this configurable instance.
Any changes made using methods of this <code>Configurable</code> instance will be reflected in the returned
<code>Configuration</code> instance.
<p>
The returned <code>Configuration</code> instance and the collection data it provides are not thread-safe wrt. modification
made using methods on the parent configurable object.
</p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>configuration live view of the internal configuration state.</dd>
</dl>
</li>
</ul>
<a name="property-java.lang.String-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>property</h4>
<pre><a href="../../../../jakarta/ws/rs/core/Configurable.html" title="type parameter in Configurable">C</a>&nbsp;property(java.lang.String&nbsp;name,
java.lang.Object&nbsp;value)</pre>
<div class="block">Set the new configuration property, if already set, the existing value of the property will be updated. Setting a
<code>null</code> value into a property effectively removes the property from the property bag.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - property name.</dd>
<dd><code>value</code> - (new) property value. <code>null</code> value removes the property with the given name.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the updated configurable instance.</dd>
</dl>
</li>
</ul>
<a name="register-java.lang.Class-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>register</h4>
<pre><a href="../../../../jakarta/ws/rs/core/Configurable.html" title="type parameter in Configurable">C</a>&nbsp;register(java.lang.Class&lt;?&gt;&nbsp;componentClass)</pre>
<div class="block">Register a class of a custom JAX-RS component (such as an extension provider or a <a href="../../../../jakarta/ws/rs/core/Feature.html" title="interface in jakarta.ws.rs.core"><code>feature</code></a> meta-provider) to be instantiated and used in the scope of this configurable context.
Implementations SHOULD warn about and ignore registrations that do not conform to the requirements of supported
JAX-RS component types in the given configurable context. Any subsequent registration attempts for a component type,
for which a class or instance-based registration already exists in the system MUST be rejected by the JAX-RS
implementation and a warning SHOULD be raised to inform the user about the rejected registration.
The registered JAX-RS component class is registered as a contract provider of all the recognized JAX-RS or
implementation-specific extension contracts including meta-provider contracts, such as <code>Feature</code> or
<a href="../../../../jakarta/ws/rs/container/DynamicFeature.html" title="interface in jakarta.ws.rs.container"><code>DynamicFeature</code></a>.
<p>
As opposed to component instances registered via <a href="../../../../jakarta/ws/rs/core/Configurable.html#register-java.lang.Object-"><code>register(Object)</code></a> method, the lifecycle of components
registered using this class-based <code>register(...)</code> method is fully managed by the JAX-RS implementation or any
underlying IoC container supported by the implementation.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>componentClass</code> - JAX-RS component class to be configured in the scope of this configurable context.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the updated configurable context.</dd>
</dl>
</li>
</ul>
<a name="register-java.lang.Class-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>register</h4>
<pre><a href="../../../../jakarta/ws/rs/core/Configurable.html" title="type parameter in Configurable">C</a>&nbsp;register(java.lang.Class&lt;?&gt;&nbsp;componentClass,
int&nbsp;priority)</pre>
<div class="block">Register a class of a custom JAX-RS component (such as an extension provider or a <a href="../../../../jakarta/ws/rs/core/Feature.html" title="interface in jakarta.ws.rs.core"><code>feature</code></a> meta-provider) to be instantiated and used in the scope of this configurable context.
<p>
This registration method provides the same functionality as <a href="../../../../jakarta/ws/rs/core/Configurable.html#register-java.lang.Class-"><code>register(Class)</code></a> except that any priority
specified on the registered JAX-RS component class via <code>jakarta.annotation.Priority</code> annotation is overridden
with the supplied <code>priority</code> value.
</p>
<p>
Note that in case the priority is not applicable to a particular provider contract implemented by the class of the
registered component, the supplied <code>priority</code> value will be ignored for that contract.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>componentClass</code> - JAX-RS component class to be configured in the scope of this configurable context.</dd>
<dd><code>priority</code> - the overriding priority for the registered component and all the provider contracts the component
implements.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the updated configurable context.</dd>
</dl>
</li>
</ul>
<a name="register-java.lang.Class-java.lang.Class...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>register</h4>
<pre><a href="../../../../jakarta/ws/rs/core/Configurable.html" title="type parameter in Configurable">C</a>&nbsp;register(java.lang.Class&lt;?&gt;&nbsp;componentClass,
java.lang.Class&lt;?&gt;...&nbsp;contracts)</pre>
<div class="block">Register a class of a custom JAX-RS component (such as an extension provider or a <a href="../../../../jakarta/ws/rs/core/Feature.html" title="interface in jakarta.ws.rs.core"><code>feature</code></a> meta-provider) to be instantiated and used in the scope of this configurable context.
<p>
This registration method provides the same functionality as <a href="../../../../jakarta/ws/rs/core/Configurable.html#register-java.lang.Class-"><code>register(Class)</code></a> except the JAX-RS component
class is only registered as a provider of the listed extension provider or meta-provider <code>contracts</code>. All
explicitly enumerated contract types must represent a class or an interface implemented or extended by the registered
component. Contracts that are not <code>assignable from</code> the registered component
class MUST be ignored and implementations SHOULD raise a warning to inform users about the ignored contract(s).
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>componentClass</code> - JAX-RS component class to be configured in the scope of this configurable context.</dd>
<dd><code>contracts</code> - the specific extension provider or meta-provider contracts implemented by the component for which
the component should be registered. Implementations MUST ignore attempts to register a component class for an empty
or <code>null</code> collection of contracts via this method and SHOULD raise a warning about such event.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the updated configurable context.</dd>
</dl>
</li>
</ul>
<a name="register-java.lang.Class-java.util.Map-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>register</h4>
<pre><a href="../../../../jakarta/ws/rs/core/Configurable.html" title="type parameter in Configurable">C</a>&nbsp;register(java.lang.Class&lt;?&gt;&nbsp;componentClass,
java.util.Map&lt;java.lang.Class&lt;?&gt;,java.lang.Integer&gt;&nbsp;contracts)</pre>
<div class="block">Register a class of a custom JAX-RS component (such as an extension provider or a <a href="../../../../jakarta/ws/rs/core/Feature.html" title="interface in jakarta.ws.rs.core"><code>feature</code></a> meta-provider) to be instantiated and used in the scope of this configurable context.
<p>
This registration method provides same functionality as <a href="../../../../jakarta/ws/rs/core/Configurable.html#register-java.lang.Class-java.lang.Class...-"><code>register(Class, Class[])</code></a> except that any priority
specified on the registered JAX-RS component class via <code>jakarta.annotation.Priority</code> annotation is overridden for
each extension provider contract type separately with an integer priority value specified as a value in the supplied
map of [contract type, priority] pairs.
</p>
<p>
Note that in case a priority is not applicable to a provider contract registered for the JAX-RS component, the
supplied priority value is ignored for such contract.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>componentClass</code> - JAX-RS component class to be configured in the scope of this configurable context.</dd>
<dd><code>contracts</code> - map of the specific extension provider and meta-provider contracts and their associated priorities
for which the JAX-RS component is registered. All contracts in the map must represent a class or an interface
implemented or extended by the JAX-RS component. Contracts that are not <code>assignable from</code> the registered component class MUST be ignored and implementations SHOULD raise a warning to inform
users about the ignored contract(s).</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the updated configurable context.</dd>
</dl>
</li>
</ul>
<a name="register-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>register</h4>
<pre><a href="../../../../jakarta/ws/rs/core/Configurable.html" title="type parameter in Configurable">C</a>&nbsp;register(java.lang.Object&nbsp;component)</pre>
<div class="block">Register an instance of a custom JAX-RS component (such as an extension provider or a <a href="../../../../jakarta/ws/rs/core/Feature.html" title="interface in jakarta.ws.rs.core"><code>feature</code></a> meta-provider) to be instantiated and used in the scope of this configurable context.
Implementations SHOULD warn about and ignore registrations that do not conform to the requirements of supported
JAX-RS component types in the given configurable context. Any subsequent registration attempts for a component type,
for which a class or instance-based registration already exists in the system MUST be rejected by the JAX-RS
implementation and a warning SHOULD be raised to inform the user about the rejected registration.
The registered JAX-RS component is registered as a contract provider of all the recognized JAX-RS or
implementation-specific extension contracts including meta-provider contracts, such as <code>Feature</code> or
<a href="../../../../jakarta/ws/rs/container/DynamicFeature.html" title="interface in jakarta.ws.rs.container"><code>DynamicFeature</code></a>.
<p>
As opposed to components registered via <a href="../../../../jakarta/ws/rs/core/Configurable.html#register-java.lang.Class-"><code>register(Class)</code></a> method, the lifecycle of providers registered using
this instance-based <code>register(...)</code> is not managed by JAX-RS runtime. The same registered component instance is
used during the whole lifespan of the configurable context. Fields and properties of all registered JAX-RS component
instances are injected with their declared dependencies (see <a href="../../../../jakarta/ws/rs/core/Context.html" title="annotation in jakarta.ws.rs.core"><code>Context</code></a>) by the JAX-RS runtime prior to use.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>component</code> - JAX-RS component instance to be configured in the scope of this configurable context.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the updated configurable context.</dd>
</dl>
</li>
</ul>
<a name="register-java.lang.Object-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>register</h4>
<pre><a href="../../../../jakarta/ws/rs/core/Configurable.html" title="type parameter in Configurable">C</a>&nbsp;register(java.lang.Object&nbsp;component,
int&nbsp;priority)</pre>
<div class="block">Register an instance of a custom JAX-RS component (such as an extension provider or a <a href="../../../../jakarta/ws/rs/core/Feature.html" title="interface in jakarta.ws.rs.core"><code>feature</code></a> meta-provider) to be instantiated and used in the scope of this configurable context.
<p>
This registration method provides the same functionality as <a href="../../../../jakarta/ws/rs/core/Configurable.html#register-java.lang.Object-"><code>register(Object)</code></a> except that any priority
specified on the registered JAX-RS component class via <code>jakarta.annotation.Priority</code> annotation is overridden
with the supplied <code>priority</code> value.
</p>
<p>
Note that in case the priority is not applicable to a particular provider contract implemented by the class of the
registered component, the supplied <code>priority</code> value will be ignored for that contract.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>component</code> - JAX-RS component instance to be configured in the scope of this configurable context.</dd>
<dd><code>priority</code> - the overriding priority for the registered component and all the provider contracts the component
implements.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the updated configurable context.</dd>
</dl>
</li>
</ul>
<a name="register-java.lang.Object-java.lang.Class...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>register</h4>
<pre><a href="../../../../jakarta/ws/rs/core/Configurable.html" title="type parameter in Configurable">C</a>&nbsp;register(java.lang.Object&nbsp;component,
java.lang.Class&lt;?&gt;...&nbsp;contracts)</pre>
<div class="block">Register an instance of a custom JAX-RS component (such as an extension provider or a <a href="../../../../jakarta/ws/rs/core/Feature.html" title="interface in jakarta.ws.rs.core"><code>feature</code></a> meta-provider) to be instantiated and used in the scope of this configurable context.
<p>
This registration method provides the same functionality as <a href="../../../../jakarta/ws/rs/core/Configurable.html#register-java.lang.Object-"><code>register(Object)</code></a> except the JAX-RS component
class is only registered as a provider of the listed extension provider or meta-provider <code>contracts</code>. All
explicitly enumerated contract types must represent a class or an interface implemented or extended by the registered
component. Contracts that are not <code>assignable from</code> the registered component
class MUST be ignored and implementations SHOULD raise a warning to inform users about the ignored contract(s).
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>component</code> - JAX-RS component instance to be configured in the scope of this configurable context.</dd>
<dd><code>contracts</code> - the specific extension provider or meta-provider contracts implemented by the component for which
the component should be registered. Implementations MUST ignore attempts to register a component class for an empty
or <code>null</code> collection of contracts via this method and SHOULD raise a warning about such event.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the updated configurable context.</dd>
</dl>
</li>
</ul>
<a name="register-java.lang.Object-java.util.Map-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>register</h4>
<pre><a href="../../../../jakarta/ws/rs/core/Configurable.html" title="type parameter in Configurable">C</a>&nbsp;register(java.lang.Object&nbsp;component,
java.util.Map&lt;java.lang.Class&lt;?&gt;,java.lang.Integer&gt;&nbsp;contracts)</pre>
<div class="block">Register an instance of a custom JAX-RS component (such as an extension provider or a <a href="../../../../jakarta/ws/rs/core/Feature.html" title="interface in jakarta.ws.rs.core"><code>feature</code></a> meta-provider) to be instantiated and used in the scope of this configurable context.
<p>
This registration method provides same functionality as <a href="../../../../jakarta/ws/rs/core/Configurable.html#register-java.lang.Object-java.lang.Class...-"><code>register(Object, Class[])</code></a> except that any priority
specified on the registered JAX-RS component class via <code>jakarta.annotation.Priority</code> annotation is overridden for
each extension provider contract type separately with an integer priority value specified as a value in the supplied
map of [contract type, priority] pairs.
</p>
<p>
Note that in case a priority is not applicable to a provider contract registered for the JAX-RS component, the
supplied priority value is ignored for such contract.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>component</code> - JAX-RS component instance to be configured in the scope of this configurable context.</dd>
<dd><code>contracts</code> - map of the specific extension provider and meta-provider contracts and their associated priorities
for which the JAX-RS component is registered. All contracts in the map must represent a class or an interface
implemented or extended by the JAX-RS component. Contracts that are not <code>assignable from</code> the registered component class MUST be ignored and implementations SHOULD raise a warning to inform
users about the ignored contract(s).</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the updated configurable context.</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/CacheControl.html" title="class in jakarta.ws.rs.core"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../jakarta/ws/rs/core/Configuration.html" title="interface 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/Configurable.html" target="_top">Frames</a></li>
<li><a href="Configurable.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>