blob: d98e2ba904abb8d3ea4f97a05ccfeda14da5d71f [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="de">
<head>
<!-- Generated by javadoc -->
<title>OSGIServiceContext (Apache Tamaya Base 0.5-incubating-SNAPSHOT API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="keywords" content="org.apache.tamaya.core.internal.OSGIServiceContext class">
<meta name="keywords" content="isInitialized()">
<meta name="keywords" content="getClassLoader()">
<meta name="keywords" content="init()">
<meta name="keywords" content="ordinal()">
<meta name="keywords" content="getService()">
<meta name="keywords" content="create()">
<meta name="keywords" content="getServices()">
<meta name="keywords" content="getResources()">
<meta name="keywords" content="getResource()">
<meta name="keywords" content="register()">
<meta name="keywords" content="reset()">
<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="OSGIServiceContext (Apache Tamaya Base 0.5-incubating-SNAPSHOT API)";
}
}
catch(err) {
}
//-->
var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
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/OSGIServiceContext.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">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<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>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&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><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= 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">org.apache.tamaya.core.internal</a></div>
<h2 title="Class OSGIServiceContext" class="title">Class OSGIServiceContext</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.apache.tamaya.core.internal.OSGIServiceContext</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><code><a href="../../spi/ClassloaderAware.html" title="interface in org.apache.tamaya.spi">ClassloaderAware</a></code>, <code><a href="../../spi/ServiceContext.html" title="interface in org.apache.tamaya.spi">ServiceContext</a></code></dd>
</dl>
<hr>
<pre>public class <span class="typeNameLabel">OSGIServiceContext</span>
extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>
implements <a href="../../spi/ServiceContext.html" title="interface in org.apache.tamaya.spi">ServiceContext</a></pre>
<div class="block">ServiceContext implementation based on OSGI Service mechanisms.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<ul class="blockList">
<li class="blockList"><a id="fields.inherited.from.class.org.apache.tamaya.spi.ServiceContext">
<!-- -->
</a>
<h3>Fields inherited from interface&nbsp;org.apache.tamaya.spi.<a href="../../spi/ServiceContext.html" title="interface in org.apache.tamaya.spi">ServiceContext</a></h3>
<code><a href="../../spi/ServiceContext.html#PRIORITY_ANNOTATION_AVAILABLE">PRIORITY_ANNOTATION_AVAILABLE</a></code></li>
</ul>
</li>
</ul>
</section>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(org.apache.tamaya.core.internal.OSGIServiceLoader)">OSGIServiceContext</a></span>&#8203;(<a href="OSGIServiceLoader.html" title="class in org.apache.tamaya.core.internal">OSGIServiceLoader</a>&nbsp;osgiServiceLoader)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<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="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<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>
<tr id="i0" class="altColor">
<td class="colFirst"><code>&lt;T&gt;&nbsp;T</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#create(java.lang.Class,java.util.function.Supplier)">create</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a>&lt;T&gt;&nbsp;serviceType,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a>&lt;T&gt;&nbsp;supplier)</code></th>
<td class="colLast">
<div class="block">Factory method to createObject a type, hereby a new instance is created on each access.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ClassLoader.html?is-external=true" title="class or interface in java.lang" class="externalLink">ClassLoader</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getClassLoader()">getClassLoader</a></span>()</code></th>
<td class="colLast">
<div class="block">Get the currently assigned cassloader instance.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net" class="externalLink">URL</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getResource(java.lang.String)">getResource</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;resource)</code></th>
<td class="colLast">
<div class="block">Loads a resource from the current runtime context.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink">Collection</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net" class="externalLink">URL</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getResources(java.lang.String)">getResources</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;resource)</code></th>
<td class="colLast">
<div class="block">Loads resources from the current runtime context.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>&lt;T&gt;&nbsp;T</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getService(java.lang.Class,java.util.function.Supplier)">getService</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a>&lt;T&gt;&nbsp;serviceType,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a>&lt;T&gt;&nbsp;supplier)</code></th>
<td class="colLast">
<div class="block">Access a service singleton via its type.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>&lt;T&gt;&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a>&lt;T&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getServices(java.lang.Class,java.util.function.Supplier)">getServices</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a>&lt;T&gt;&nbsp;serviceType,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a>&lt;T&gt;&gt;&nbsp;supplier)</code></th>
<td class="colLast">
<div class="block">Access a createList current services, given its type.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#init(java.lang.ClassLoader)">init</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ClassLoader.html?is-external=true" title="class or interface in java.lang" class="externalLink">ClassLoader</a>&nbsp;classLoader)</code></th>
<td class="colLast">
<div class="block">Initializes this instance with the classloader to be used.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isInitialized()">isInitialized</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ordinal()">ordinal</a></span>()</code></th>
<td class="colLast">
<div class="block">Get the ordinal of the ServiceContext.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>&lt;T&gt;&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a>&lt;T&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#register(java.lang.Class,java.util.List,boolean)">register</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a>&lt;T&gt;&nbsp;serviceType,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a>&lt;T&gt;&nbsp;instances,
boolean&nbsp;force)</code></th>
<td class="colLast">
<div class="block">Registers the given instancea as servicea for the given instance, if no
* instance already has been registered.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>&lt;T&gt;&nbsp;T</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#register(java.lang.Class,T,boolean)">register</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a>&lt;T&gt;&nbsp;serviceType,
T&nbsp;instance,
boolean&nbsp;force)</code></th>
<td class="colLast">
<div class="block">Registers the given instance as a singleton service for the given instance, if no
instance already has been registered.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#reset()">reset</a></span>()</code></th>
<td class="colLast">
<div class="block">Resets the current service context, removing all loaded services.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink">wait</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.org.apache.tamaya.spi.ServiceContext">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;org.apache.tamaya.spi.<a href="../../spi/ServiceContext.html" title="interface in org.apache.tamaya.spi">ServiceContext</a></h3>
<code><a href="../../spi/ServiceContext.html#create(java.lang.Class)">create</a>, <a href="../../spi/ServiceContext.html#getService(java.lang.Class)">getService</a>, <a href="../../spi/ServiceContext.html#getServices(java.lang.Class)">getServices</a></code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a id="&lt;init&gt;(org.apache.tamaya.core.internal.OSGIServiceLoader)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>OSGIServiceContext</h4>
<pre>public&nbsp;OSGIServiceContext&#8203;(<a href="OSGIServiceLoader.html" title="class in org.apache.tamaya.core.internal">OSGIServiceLoader</a>&nbsp;osgiServiceLoader)</pre>
</li>
</ul>
</li>
</ul>
</section>
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="isInitialized()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isInitialized</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;isInitialized()</pre>
</li>
</ul>
<a id="getClassLoader()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getClassLoader</h4>
<pre class="methodSignature">public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ClassLoader.html?is-external=true" title="class or interface in java.lang" class="externalLink">ClassLoader</a>&nbsp;getClassLoader()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../spi/ClassloaderAware.html#getClassLoader()">ClassloaderAware</a></code></span></div>
<div class="block">Get the currently assigned cassloader instance.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../spi/ClassloaderAware.html#getClassLoader()">getClassLoader</a></code>&nbsp;in interface&nbsp;<code><a href="../../spi/ClassloaderAware.html" title="interface in org.apache.tamaya.spi">ClassloaderAware</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the classloader, never null.</dd>
</dl>
</li>
</ul>
<a id="init(java.lang.ClassLoader)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>init</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;init&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ClassLoader.html?is-external=true" title="class or interface in java.lang" class="externalLink">ClassLoader</a>&nbsp;classLoader)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../spi/ClassloaderAware.html#init(java.lang.ClassLoader)">ClassloaderAware</a></code></span></div>
<div class="block">Initializes this instance with the classloader to be used.
This method is called by the implementation when the instance is loaded
through the <a href="../../spi/ServiceContextManager.html" title="class in org.apache.tamaya.spi"><code>ServiceContextManager</code></a>.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../spi/ClassloaderAware.html#init(java.lang.ClassLoader)">init</a></code>&nbsp;in interface&nbsp;<code><a href="../../spi/ClassloaderAware.html" title="interface in org.apache.tamaya.spi">ClassloaderAware</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>classLoader</code> - the target classloader, not not null.</dd>
</dl>
</li>
</ul>
<a id="ordinal()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ordinal</h4>
<pre class="methodSignature">public&nbsp;int&nbsp;ordinal()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../spi/ServiceContext.html#ordinal()">ServiceContext</a></code></span></div>
<div class="block">Get the ordinal of the ServiceContext.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../spi/ServiceContext.html#ordinal()">ordinal</a></code>&nbsp;in interface&nbsp;<code><a href="../../spi/ServiceContext.html" title="interface in org.apache.tamaya.spi">ServiceContext</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>ordinal of the ServiceContext. The one with the highest ordinal will be taken.</dd>
</dl>
</li>
</ul>
<a id="getService(java.lang.Class,java.util.function.Supplier)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getService</h4>
<pre class="methodSignature">public&nbsp;&lt;T&gt;&nbsp;T&nbsp;getService&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a>&lt;T&gt;&nbsp;serviceType,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a>&lt;T&gt;&nbsp;supplier)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../spi/ServiceContext.html#getService(java.lang.Class,java.util.function.Supplier)">ServiceContext</a></code></span></div>
<div class="block">Access a service singleton via its type.
If multiple implementations for the very serviceType exist then
the one with the highest <a href="https://docs.oracle.com/javase/8/docs/api/javax/annotation/Priority.html?is-external=true" title="class or interface in javax.annotation" class="externalLink"><code>Priority</code></a> will be used.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../spi/ServiceContext.html#getService(java.lang.Class,java.util.function.Supplier)">getService</a></code>&nbsp;in interface&nbsp;<code><a href="../../spi/ServiceContext.html" title="interface in org.apache.tamaya.spi">ServiceContext</a></code></dd>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - the type of the service type.</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>serviceType</code> - the service type.</dd>
<dd><code>supplier</code> - the supplier to be used, if no services could be evaluated. If null,
an empty collection is returned, when no services
could be located.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The instance to be used, or <code>null</code></dd>
</dl>
</li>
</ul>
<a id="create(java.lang.Class,java.util.function.Supplier)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>create</h4>
<pre class="methodSignature">public&nbsp;&lt;T&gt;&nbsp;T&nbsp;create&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a>&lt;T&gt;&nbsp;serviceType,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a>&lt;T&gt;&nbsp;supplier)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../spi/ServiceContext.html#create(java.lang.Class,java.util.function.Supplier)">ServiceContext</a></code></span></div>
<div class="block">Factory method to createObject a type, hereby a new instance is created on each access.
If multiple implementations for the very serviceType exist then
the one with the highest <a href="https://docs.oracle.com/javase/8/docs/api/javax/annotation/Priority.html?is-external=true" title="class or interface in javax.annotation" class="externalLink"><code>Priority</code></a> will be used as the base
for creating subsequent instances.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../spi/ServiceContext.html#create(java.lang.Class,java.util.function.Supplier)">create</a></code>&nbsp;in interface&nbsp;<code><a href="../../spi/ServiceContext.html" title="interface in org.apache.tamaya.spi">ServiceContext</a></code></dd>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - the type of the service type.</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>serviceType</code> - the service type.</dd>
<dd><code>supplier</code> - the supplier to create a new service, if no service could be autodetected.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The new instance to be used, or <code>null</code></dd>
</dl>
</li>
</ul>
<a id="getServices(java.lang.Class,java.util.function.Supplier)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getServices</h4>
<pre class="methodSignature">public&nbsp;&lt;T&gt;&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a>&lt;T&gt;&nbsp;getServices&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a>&lt;T&gt;&nbsp;serviceType,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a>&lt;T&gt;&gt;&nbsp;supplier)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../spi/ServiceContext.html#getServices(java.lang.Class,java.util.function.Supplier)">ServiceContext</a></code></span></div>
<div class="block">Access a createList current services, given its type. The bootstrap mechanism should
order the instance for precedence, hereby the most significant should be
first in order. If no instances could be found, the instances supplied by the
supplier given are registered and used.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../spi/ServiceContext.html#getServices(java.lang.Class,java.util.function.Supplier)">getServices</a></code>&nbsp;in interface&nbsp;<code><a href="../../spi/ServiceContext.html" title="interface in org.apache.tamaya.spi">ServiceContext</a></code></dd>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - the type of the createList element returned by this method</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>serviceType</code> - the service type.</dd>
<dd><code>supplier</code> - the supplier to be used, if no services could be evaluated. If null,
an empty collection is returned, when no services
could be located.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The instance to be used, never <code>null</code></dd>
</dl>
</li>
</ul>
<a id="getResources(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getResources</h4>
<pre class="methodSignature">public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink">Collection</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net" class="externalLink">URL</a>&gt;&nbsp;getResources&#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;resource)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../spi/ServiceContext.html#getResources(java.lang.String)">ServiceContext</a></code></span></div>
<div class="block">Loads resources from the current runtime context. This method allows to use runtime
specific code to load resources, e.g. within OSGI environments.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../spi/ServiceContext.html#getResources(java.lang.String)">getResources</a></code>&nbsp;in interface&nbsp;<code><a href="../../spi/ServiceContext.html" title="interface in org.apache.tamaya.spi">ServiceContext</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>resource</code> - the resource, not <code>null</code>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the resources found</dd>
</dl>
</li>
</ul>
<a id="getResource(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getResource</h4>
<pre class="methodSignature">public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net" class="externalLink">URL</a>&nbsp;getResource&#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;resource)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../spi/ServiceContext.html#getResource(java.lang.String)">ServiceContext</a></code></span></div>
<div class="block">Loads a resource from the current runtime context. This method allows to use runtime
specific code to load a resource, e.g. within OSGI environments.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../spi/ServiceContext.html#getResource(java.lang.String)">getResource</a></code>&nbsp;in interface&nbsp;<code><a href="../../spi/ServiceContext.html" title="interface in org.apache.tamaya.spi">ServiceContext</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>resource</code> - the resource, not <code>null</code>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the resource found, or <code>null</code>.</dd>
</dl>
</li>
</ul>
<a id="register(java.lang.Class,java.lang.Object,boolean)">
<!-- -->
</a><a id="register(java.lang.Class,T,boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>register</h4>
<pre class="methodSignature">public&nbsp;&lt;T&gt;&nbsp;T&nbsp;register&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a>&lt;T&gt;&nbsp;serviceType,
T&nbsp;instance,
boolean&nbsp;force)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../spi/ServiceContext.html#register(java.lang.Class,T,boolean)">ServiceContext</a></code></span></div>
<div class="block">Registers the given instance as a singleton service for the given instance, if no
instance already has been registered.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../spi/ServiceContext.html#register(java.lang.Class,T,boolean)">register</a></code>&nbsp;in interface&nbsp;<code><a href="../../spi/ServiceContext.html" title="interface in org.apache.tamaya.spi">ServiceContext</a></code></dd>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - thy type.</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>serviceType</code> - the type to register, not null.</dd>
<dd><code>instance</code> - the instance, not null.</dd>
<dd><code>force</code> - if true, any existing instance will be replaced.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the instance registered or already present.</dd>
</dl>
</li>
</ul>
<a id="register(java.lang.Class,java.util.List,boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>register</h4>
<pre class="methodSignature">public&nbsp;&lt;T&gt;&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a>&lt;T&gt;&nbsp;register&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a>&lt;T&gt;&nbsp;serviceType,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a>&lt;T&gt;&nbsp;instances,
boolean&nbsp;force)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../spi/ServiceContext.html#register(java.lang.Class,java.util.List,boolean)">ServiceContext</a></code></span></div>
<div class="block">Registers the given instancea as servicea for the given instance, if no
* instance already has been registered.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../spi/ServiceContext.html#register(java.lang.Class,java.util.List,boolean)">register</a></code>&nbsp;in interface&nbsp;<code><a href="../../spi/ServiceContext.html" title="interface in org.apache.tamaya.spi">ServiceContext</a></code></dd>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - thy type.</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>serviceType</code> - the type to register, not null.</dd>
<dd><code>instances</code> - the instancea, not null.</dd>
<dd><code>force</code> - if true, any existing instances will be replaced.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the instances registered or already present.</dd>
</dl>
</li>
</ul>
<a id="reset()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>reset</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;reset()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../spi/ServiceContext.html#reset()">ServiceContext</a></code></span></div>
<div class="block">Resets the current service context, removing all loaded services. This implicitly triggers a new load
of the service context.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../spi/ServiceContext.html#reset()">reset</a></code>&nbsp;in interface&nbsp;<code><a href="../../spi/ServiceContext.html" title="interface in org.apache.tamaya.spi">ServiceContext</a></code></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/OSGIServiceContext.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">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses.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>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&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><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
<p class="legalCopy"><small>Copyright &#169; 2014&#x2013;2019 <a href="https://apache.org">Apache Software Foundation</a>. All rights reserved.</small></p>
</footer>
</body>
</html>