| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (version 1.7.0_25) on Mon Mar 31 09:56:26 CEST 2014 --> |
| <meta http-equiv="Content-Type" content="text/html" charset="UTF-8"> |
| <title>InstanceBuilder (Apache Felix iPOJO ~ JavaDoc 1.11.2 API)</title> |
| <meta name="date" content="2014-03-31"> |
| <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="InstanceBuilder (Apache Felix iPOJO ~ JavaDoc 1.11.2 API)"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar_top"> |
| <!-- --> |
| </a><a href="#skip-navbar_top" title="Skip navigation links"></a><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="class-use/InstanceBuilder.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> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../org/apache/felix/ipojo/extender/ExtensionDeclaration.html" title="interface in org.apache.felix.ipojo.extender"><span class="strong">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/felix/ipojo/extender/InstanceDeclaration.html" title="interface in org.apache.felix.ipojo.extender"><span class="strong">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/felix/ipojo/extender/InstanceBuilder.html" target="_top">Frames</a></li> |
| <li><a href="InstanceBuilder.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../../allclasses-noframe.html">All 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: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method_summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </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">org.apache.felix.ipojo.extender</div> |
| <h2 title="Interface InstanceBuilder" class="title">Interface InstanceBuilder</h2> |
| </div> |
| <div class="contentContainer"> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Known Implementing Classes:</dt> |
| <dd><a href="../../../../../org/apache/felix/ipojo/extender/internal/declaration/service/DefaultInstanceBuilder.html" title="class in org.apache.felix.ipojo.extender.internal.declaration.service">DefaultInstanceBuilder</a></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>public interface <a href="../../../../../src-html/org/apache/felix/ipojo/extender/InstanceBuilder.html#line.32">InstanceBuilder</a></pre> |
| <div class="block">Support class for fluent instance declaration building. |
| This class can be used to specify instance details like naming, component's type, component's version. |
| The <a href="../../../../../org/apache/felix/ipojo/extender/InstanceBuilder.html#context(org.osgi.framework.BundleContext)"><code>context(org.osgi.framework.BundleContext)</code></a> method can be used to override the default |
| <a href="http://www.osgi.org/javadoc/r4v43/core/org/osgi/framework/BundleContext.html?is-external=true" title="class or interface in org.osgi.framework"><code>BundleContext</code></a> used for declaration service registration.</div> |
| <dl><dt><span class="strong">Since:</span></dt> |
| <dd>1.11.2</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="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span>Methods</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/felix/ipojo/extender/DeclarationHandle.html" title="interface in org.apache.felix.ipojo.extender">DeclarationHandle</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/felix/ipojo/extender/InstanceBuilder.html#build()">build</a></strong>()</code> |
| <div class="block">Build the declaration handle (never contains any configuration).</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/felix/ipojo/extender/ConfigurationBuilder.html" title="interface in org.apache.felix.ipojo.extender">ConfigurationBuilder</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/felix/ipojo/extender/InstanceBuilder.html#configure()">configure</a></strong>()</code> |
| <div class="block">Access the dedicated builder for configuration (properties).</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/felix/ipojo/extender/InstanceBuilder.html" title="interface in org.apache.felix.ipojo.extender">InstanceBuilder</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/felix/ipojo/extender/InstanceBuilder.html#context(org.osgi.framework.BundleContext)">context</a></strong>(<a href="http://www.osgi.org/javadoc/r4v43/core/org/osgi/framework/BundleContext.html?is-external=true" title="class or interface in org.osgi.framework">BundleContext</a> context)</code> |
| <div class="block">Override the default BundleContext used for declaration service registration.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/felix/ipojo/extender/InstanceBuilder.html" title="interface in org.apache.felix.ipojo.extender">InstanceBuilder</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/felix/ipojo/extender/InstanceBuilder.html#name(java.lang.String)">name</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</code> |
| <div class="block">Specify the instance name.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/felix/ipojo/extender/InstanceBuilder.html" title="interface in org.apache.felix.ipojo.extender">InstanceBuilder</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/felix/ipojo/extender/InstanceBuilder.html#type(java.lang.Class)">type</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> type)</code> |
| <div class="block">Specify the component's type of this instance.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/felix/ipojo/extender/InstanceBuilder.html" title="interface in org.apache.felix.ipojo.extender">InstanceBuilder</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/felix/ipojo/extender/InstanceBuilder.html#type(java.lang.String)">type</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> type)</code> |
| <div class="block">Specify the component's type of this instance.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/felix/ipojo/extender/InstanceBuilder.html" title="interface in org.apache.felix.ipojo.extender">InstanceBuilder</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/felix/ipojo/extender/InstanceBuilder.html#version(java.lang.String)">version</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> version)</code> |
| <div class="block">Specify the component's version of this instance.</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="name(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>name</h4> |
| <pre><a href="../../../../../org/apache/felix/ipojo/extender/InstanceBuilder.html" title="interface in org.apache.felix.ipojo.extender">InstanceBuilder</a> <a href="../../../../../src-html/org/apache/felix/ipojo/extender/InstanceBuilder.html#line.39">name</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</pre> |
| <div class="block">Specify the instance name. Using null will result in an anonymous instance.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>name</code> - instance name or null</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>this builder</dd></dl> |
| </li> |
| </ul> |
| <a name="type(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>type</h4> |
| <pre><a href="../../../../../org/apache/felix/ipojo/extender/InstanceBuilder.html" title="interface in org.apache.felix.ipojo.extender">InstanceBuilder</a> <a href="../../../../../src-html/org/apache/felix/ipojo/extender/InstanceBuilder.html#line.46">type</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> type)</pre> |
| <div class="block">Specify the component's type of this instance.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>type</code> - type of the instance (cannot be null).</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>this builder</dd></dl> |
| </li> |
| </ul> |
| <a name="type(java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>type</h4> |
| <pre><a href="../../../../../org/apache/felix/ipojo/extender/InstanceBuilder.html" title="interface in org.apache.felix.ipojo.extender">InstanceBuilder</a> <a href="../../../../../src-html/org/apache/felix/ipojo/extender/InstanceBuilder.html#line.53">type</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> type)</pre> |
| <div class="block">Specify the component's type of this instance.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>type</code> - type of the instance (cannot be null).</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>this builder</dd></dl> |
| </li> |
| </ul> |
| <a name="version(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>version</h4> |
| <pre><a href="../../../../../org/apache/felix/ipojo/extender/InstanceBuilder.html" title="interface in org.apache.felix.ipojo.extender">InstanceBuilder</a> <a href="../../../../../src-html/org/apache/felix/ipojo/extender/InstanceBuilder.html#line.61">version</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> version)</pre> |
| <div class="block">Specify the component's version of this instance. If null is used, |
| the factory without any version attribute will be used.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>version</code> - component's version (can be null).</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>this builder</dd></dl> |
| </li> |
| </ul> |
| <a name="context(org.osgi.framework.BundleContext)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>context</h4> |
| <pre><a href="../../../../../org/apache/felix/ipojo/extender/InstanceBuilder.html" title="interface in org.apache.felix.ipojo.extender">InstanceBuilder</a> <a href="../../../../../src-html/org/apache/felix/ipojo/extender/InstanceBuilder.html#line.71">context</a>(<a href="http://www.osgi.org/javadoc/r4v43/core/org/osgi/framework/BundleContext.html?is-external=true" title="class or interface in org.osgi.framework">BundleContext</a> context)</pre> |
| <div class="block">Override the default BundleContext used for declaration service registration. |
| Use this with <bold>caution</bold>, for example, if the bundle does not import the |
| <code><a href="../../../../../org/apache/felix/ipojo/extender/package-summary.html"><code>org.apache.felix.ipojo.extender</code></a></code> package, declarations may not be |
| linked and activated properly.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>context</code> - new context to be used.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>this builder</dd></dl> |
| </li> |
| </ul> |
| <a name="configure()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>configure</h4> |
| <pre><a href="../../../../../org/apache/felix/ipojo/extender/ConfigurationBuilder.html" title="interface in org.apache.felix.ipojo.extender">ConfigurationBuilder</a> <a href="../../../../../src-html/org/apache/felix/ipojo/extender/InstanceBuilder.html#line.96">configure</a>()</pre> |
| <div class="block">Access the dedicated builder for configuration (properties). |
| Notice that when this method is used, the called must use <a href="../../../../../org/apache/felix/ipojo/extender/ConfigurationBuilder.html#build()"><code>ConfigurationBuilder.build()</code></a> |
| to build the instance declaration configured with the right set of properties. Any attempt |
| to use <a href="../../../../../org/apache/felix/ipojo/extender/InstanceBuilder.html#build()"><code>build()</code></a> will result in a new declaration with no properties associated. |
| |
| Good usage (produced declaration has the associated properties): |
| <pre> |
| DeclarationHandle handle = builder.configure() |
| .property("hello", "world") |
| .build(); |
| </pre> |
| |
| Bad usage (produced declaration does not have the associated properties): |
| <pre> |
| builder.configure() |
| .property("hello", "world"); |
| |
| DeclarationHandle handle = builder.build(); |
| </pre></div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>the instance configuration builder</dd></dl> |
| </li> |
| </ul> |
| <a name="build()"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>build</h4> |
| <pre><a href="../../../../../org/apache/felix/ipojo/extender/DeclarationHandle.html" title="interface in org.apache.felix.ipojo.extender">DeclarationHandle</a> <a href="../../../../../src-html/org/apache/felix/ipojo/extender/InstanceBuilder.html#line.104">build</a>()</pre> |
| <div class="block">Build the declaration handle (never contains any configuration). |
| Notice that the declaration is not yet published (no automatic activation). |
| The client has to do it through <a href="../../../../../org/apache/felix/ipojo/extender/DeclarationHandle.html#publish()"><code>DeclarationHandle.publish()</code></a></div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>the handle to the declaration</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><a href="#skip-navbar_bottom" title="Skip navigation links"></a><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="class-use/InstanceBuilder.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> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../org/apache/felix/ipojo/extender/ExtensionDeclaration.html" title="interface in org.apache.felix.ipojo.extender"><span class="strong">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/felix/ipojo/extender/InstanceDeclaration.html" title="interface in org.apache.felix.ipojo.extender"><span class="strong">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/felix/ipojo/extender/InstanceBuilder.html" target="_top">Frames</a></li> |
| <li><a href="InstanceBuilder.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../allclasses-noframe.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> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method_summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method_detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip-navbar_bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 2014. All rights reserved.</small></p> |
| </body> |
| </html> |