| <!DOCTYPE HTML> |
| <!-- NewPage --> |
| <html lang="de"> |
| <head> |
| <!-- Generated by javadoc --> |
| <title>ServiceContext (Apache Tamaya Base 0.4-incubating API)</title> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <meta name="keywords" content="org.apache.tamaya.spi.ServiceContext interface"> |
| <meta name="keywords" content="PRIORITY_ANNOTATION_AVAILABLE"> |
| <meta name="keywords" content="checkPriorityAnnotation()"> |
| <meta name="keywords" content="ordinal()"> |
| <meta name="keywords" content="getPriority()"> |
| <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="ServiceContext (Apache Tamaya Base 0.4-incubating API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var data = {"i0":1,"i1":18,"i2":6,"i3":1,"i4":18,"i5":18,"i6":18,"i7":6,"i8":18,"i9":6,"i10":18,"i11":6,"i12":6,"i13":6}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],16:["t5","Default Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| 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/ServiceContext.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 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: </li> |
| <li>Nested | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li>Constr | </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"> </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> <a href="package-summary.html">org.apache.tamaya.spi</a></div> |
| <h2 title="Interface ServiceContext" class="title">Interface ServiceContext</h2> |
| </div> |
| <div class="contentContainer"> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Superinterfaces:</dt> |
| <dd><code><a href="ClassloaderAware.html" title="interface in org.apache.tamaya.spi">ClassloaderAware</a></code></dd> |
| </dl> |
| <dl> |
| <dt>All Known Implementing Classes:</dt> |
| <dd><code><a href="../spisupport/DefaultServiceContext.html" title="class in org.apache.tamaya.spisupport">DefaultServiceContext</a></code>, <code><a href="../core/internal/OSGIServiceContext.html" title="class in org.apache.tamaya.core.internal">OSGIServiceContext</a></code></dd> |
| </dl> |
| <hr> |
| <pre>public interface <span class="typeNameLabel">ServiceContext</span> |
| extends <a href="ClassloaderAware.html" title="interface in org.apache.tamaya.spi">ClassloaderAware</a></pre> |
| <div class="block">This class models the component that is managing the lifecycle current the |
| services used by the Configuration API.</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> |
| <table class="memberSummary"> |
| <caption><span>Fields</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Field</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PRIORITY_ANNOTATION_AVAILABLE">PRIORITY_ANNOTATION_AVAILABLE</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">True if the <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> annotation class is available on the classpath.</div> |
| </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"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span><span id="t5" class="tableTab"><span><a href="javascript:show(16);">Default Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Method</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#checkPriorityAnnotation(java.lang.ClassLoader)">checkPriorityAnnotation</a></span>​(<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> classLoader)</code></th> |
| <td class="colLast"> |
| <div class="block">Checks if the <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> annotation class is on the classpath.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>default <T> T</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#create(java.lang.Class)">create</a></span>​(<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><T> serviceType)</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="i2" class="altColor"> |
| <td class="colFirst"><code><T> 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>​(<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><T> 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><T> 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="i3" class="rowColor"> |
| <td class="colFirst"><code>static int</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getPriority(java.lang.Object)">getPriority</a></span>​(<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> o)</code></th> |
| <td class="colLast"> |
| <div class="block">Checks the given instance for a @Priority annotation.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>default <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>​(<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> resource)</code></th> |
| <td class="colLast"> |
| <div class="block">Loads a resource from the current runtime context.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>default <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><<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="#getResources(java.lang.String)">getResources</a></span>​(<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> resource)</code></th> |
| <td class="colLast"> |
| <div class="block">Loads resources from the current runtime context.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>default <T> T</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getService(java.lang.Class)">getService</a></span>​(<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><T> serviceType)</code></th> |
| <td class="colLast"> |
| <div class="block">Access a service singleton via its type.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code><T> 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>​(<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><T> 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><T> supplier)</code></th> |
| <td class="colLast"> |
| <div class="block">Access a service singleton via its type.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>default <T> <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><T></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getServices(java.lang.Class)">getServices</a></span>​(<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><T> serviceType)</code></th> |
| <td class="colLast"> |
| <div class="block">Access a createList current services, given its type.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code><T> <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><T></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getServices(java.lang.Class,java.util.function.Supplier)">getServices</a></span>​(<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><T> 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><<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><T>> supplier)</code></th> |
| <td class="colLast"> |
| <div class="block">Access a createList current services, given its type.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>default 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="i11" class="rowColor"> |
| <td class="colFirst"><code><T> <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><T></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#register(java.lang.Class,java.util.List,boolean)">register</a></span>​(<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><T> type, |
| <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><T> instances, |
| boolean 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="i12" class="altColor"> |
| <td class="colFirst"><code><T> T</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#register(java.lang.Class,T,boolean)">register</a></span>​(<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><T> type, |
| T instance, |
| boolean 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="i13" 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.org.apache.tamaya.spi.ClassloaderAware"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from interface org.apache.tamaya.spi.<a href="ClassloaderAware.html" title="interface in org.apache.tamaya.spi">ClassloaderAware</a></h3> |
| <code><a href="ClassloaderAware.html#getClassLoader()">getClassLoader</a>, <a href="ClassloaderAware.html#init(java.lang.ClassLoader)">init</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="field.detail"> |
| <!-- --> |
| </a> |
| <h3>Field Detail</h3> |
| <a id="PRIORITY_ANNOTATION_AVAILABLE"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>PRIORITY_ANNOTATION_AVAILABLE</h4> |
| <pre>static final boolean PRIORITY_ANNOTATION_AVAILABLE</pre> |
| <div class="block">True if the <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> annotation class is available on the classpath.</div> |
| </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="checkPriorityAnnotation(java.lang.ClassLoader)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>checkPriorityAnnotation</h4> |
| <pre class="methodSignature">static boolean checkPriorityAnnotation​(<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> classLoader)</pre> |
| <div class="block">Checks if the <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> annotation class is on the classpath.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>classLoader</code> - the target classloader, not null.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true, if the annotation is loaded.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="ordinal()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>ordinal</h4> |
| <pre class="methodSignature">default int ordinal()</pre> |
| <div class="block">Get the ordinal of the ServiceContext.</div> |
| <dl> |
| <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="getPriority(java.lang.Object)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getPriority</h4> |
| <pre class="methodSignature">static int getPriority​(<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> o)</pre> |
| <div class="block">Checks the given instance for a @Priority annotation. If present the annotation's value is evaluated. If no such |
| annotation is present, a default priority of <code>1</code> is returned.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>o</code> - the instance, not <code>null</code>.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a priority, by default 1.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getService(java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getService</h4> |
| <pre class="methodSignature">default <T> T getService​(<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><T> serviceType)</pre> |
| <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="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> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The instance to be used, or <code>null</code></dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../ConfigException.html" title="class in org.apache.tamaya">ConfigException</a></code> - if there are multiple service implementations with the maximum priority.</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"><T> T getService​(<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><T> 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><T> supplier)</pre> |
| <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="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> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../ConfigException.html" title="class in org.apache.tamaya">ConfigException</a></code> - if there are multiple service implementations with the maximum priority.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="create(java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>create</h4> |
| <pre class="methodSignature">default <T> T create​(<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><T> serviceType)</pre> |
| <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="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> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The new instance to be used, or <code>null</code></dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../ConfigException.html" title="class in org.apache.tamaya">ConfigException</a></code> - if there are multiple service implementations with the maximum priority.</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"><T> T create​(<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><T> 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><T> supplier)</pre> |
| <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="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>supplier</code> - the supplier to create a new service, if no service could be autodetected.</dd> |
| <dd><code>serviceType</code> - the service type.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The new instance to be used, or <code>null</code></dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../ConfigException.html" title="class in org.apache.tamaya">ConfigException</a></code> - if there are multiple service implementations with the maximum priority.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getServices(java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getServices</h4> |
| <pre class="methodSignature">default <T> <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><T> getServices​(<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><T> serviceType)</pre> |
| <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.</div> |
| <dl> |
| <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> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The instance to be used, never <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"><T> <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><T> getServices​(<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><T> 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><<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><T>> supplier)</pre> |
| <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="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">default <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><<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>> getResources​(<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> resource)</pre> |
| <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="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">default <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> getResource​(<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> resource)</pre> |
| <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="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"><T> T register​(<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><T> type, |
| T instance, |
| boolean force)</pre> |
| <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="paramLabel">Type Parameters:</span></dt> |
| <dd><code>T</code> - thy type.</dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>type</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"><T> <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><T> register​(<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><T> type, |
| <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><T> instances, |
| boolean force)</pre> |
| <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="paramLabel">Type Parameters:</span></dt> |
| <dd><code>T</code> - thy type.</dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>type</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">void reset()</pre> |
| <div class="block">Resets the current service context, removing all loaded services. This implicitly triggers a new load |
| of the service context.</div> |
| </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/ServiceContext.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 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: </li> |
| <li>Nested | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li>Constr | </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 © 2014–2019 <a href="https://apache.org">Apache Software Foundation</a>. All rights reserved.</small></p> |
| </footer> |
| </body> |
| </html> |