blob: d8dd9b94bf1b6b9b66056252111436cc977e9da5 [file] [log] [blame]
Clement Escoffier50254022008-05-16 20:33:54 +00001
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<HTML>
4
5
6<HEAD>
7 <TITLE>Apache Felix - Apache Felix iPOJO Feature Overview</TITLE>
8 <LINK rel="stylesheet" href="http://felix.apache.org/site/media.data/site.css" type="text/css" media="all">
9 <META http-equiv="Content-Type" content="text/html;charset=UTF-8">
10 </HEAD>
11 <BODY>
12 <DIV class="title"><DIV class="logo"><A href="http://felix.apache.org/site/index.html"><IMG border="0" alt="Apache Felix" src="http://felix.apache.org/site/media.data/logo.png"></A></DIV><DIV class="header"><A href="http://www.apache.org/"><IMG border="0" alt="Apache" src="http://felix.apache.org/site/media.data/apache.png"></A></DIV></DIV>
13 <DIV class="menu">
14 <UL>
15 <LI><A href="http://felix.apache.org/site/news.html" title="news">news</A></LI>
16 <LI><A href="http://felix.apache.org/site/license.html" title="license">license</A></LI>
17 <LI><SPAN class="nobr"><A href="http://felix.apache.org/site/downloads.cgi" title="Visit page outside Confluence" rel="nofollow">downloads<SUP><IMG class="rendericon" src="http://cwiki.apache.org/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
18 <LI><A href="http://felix.apache.org/site/documentation.html" title="documentation">documentation</A></LI>
19 <LI><A href="http://felix.apache.org/site/mailinglists.html" title="mailinglists">mailing lists</A></LI>
20 <LI><A href="http://felix.apache.org/site/contributing.html" title="Contributing">contributing</A></LI>
21 <LI><SPAN class="nobr"><A href="http://www.apache.org/" title="Visit page outside Confluence" rel="nofollow">asf<SUP><IMG class="rendericon" src="http://cwiki.apache.org/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
22 <LI><SPAN class="nobr"><A href="http://www.apache.org/foundation/sponsorship.html" title="Visit page outside Confluence" rel="nofollow">sponsorship<SUP><IMG class="rendericon" src="http://cwiki.apache.org/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
23 <LI><SPAN class="nobr"><A href="http://www.apache.org/foundation/thanks.html" title="Visit page outside Confluence" rel="nofollow">sponsors<SUP><IMG class="rendericon" src="http://cwiki.apache.org/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"></SUP></A></SPAN>
24<!-- ApacheCon Ad -->
25<IFRAME src="http://www.apache.org/ads/button.html" style="border-width:0; float: left" frameborder="0" scrolling="no" width="135" height="135"></IFRAME>
26<P style="height: 100px">
27<!-- ApacheCon Ad --></LI>
28</UL>
29 </DIV>
30 <DIV class="main">
31<TABLE class="sectionMacro" border="0" cellpadding="5" cellspacing="0" width="100%"><TBODY><TR>
32<TD class="confluenceTd" valign="top" width="80%">
33<H1><A name="ApacheFelixiPOJOFeatureOverview-ApacheFelixiPOJOFeatureOverview"></A>Apache Felix iPOJO Feature Overview</H1>
34
35<P>This page is an attempt to put all of the features and benefits of iPOJO into a single high-level list so that it is easy to see why you will want to use iPOJO for your applications. This list is not exhaustive, but represents the set of features that are potentially most likely to be needed or are unique.</P>
36
37<H2><A name="ApacheFelixiPOJOFeatureOverview-CoreFeatures"></A>Core Features</H2>
38
39<UL>
40 <LI><B>POJO-based approach</B> &#45; Most components can simply be POJOs and need not have iPOJO&#45; or OSGi-specific API in them.</LI>
41 <LI><B>Simple service provisioning</B> &#45; iPOJO manages all aspects of providing an OSGi service.
42 <UL>
43 <LI><B>Service property management</B>
44 <UL class="alternate" type="square">
45 <LI>Can be controlled by configuration properties.</LI>
46 <LI>Can be mapped to member fields and automatically updated by the component instance at run time by just changing the member field value.</LI>
47 </UL>
48 </LI>
49 <LI><B>Service life cycle participation</B> &#45; The component instance can participate in the service life cycle by declaring a boolean member field that indicates when the service is actually valid (normally a service is assumed to be valid if the component instance's dependencies are satisfied).</LI>
50 </UL>
51 </LI>
52 <LI><B>Rich service dependency model</B> &#45; Automatically manages a full spectrum of service dependencies.
53 <UL>
54 <LI><B>Optional/mandatory</B> service dependencies.</LI>
55 <LI><B>Singular/aggregate</B> service dependencies.</LI>
56 <LI><B>Default service implementations</B> &#45; The component can provide default implementations of dependent services if no providers are available.</LI>
57 <LI><B>Member field or method injection</B> &#45; Also supported in combination.
58 <UL class="alternate" type="square">
59 <LI>Member field injection does not require cluttering component code with bind/unbind methods.</LI>
60 <LI>Member method injection supports various method signatures
61 <UL class="alternate" type="square">
62 <LI>method() &#45; Acts as a simple event-callback mechanism.</LI>
63 <LI>method(&lt;service-interface&gt; svc) &#45; Receives the service object cast to the appropriate interface.</LI>
64 <LI>method(ServiceReference ref) &#45; Receives the OSGi ServiceReference for the service object.</LI>
65 <LI>method(ServiceReference ref, &lt;service-interface&gt; svc) &#45; Receives the OSGi ServiceReference and the service object cast to the appropriate interface.</LI>
66 </UL>
67 </LI>
68 </UL>
69 </LI>
70 <LI><B>Binding policies</B> &#45; Allow components to control how/when their dependencies are bound.
71 <UL class="alternate" type="square">
72 <LI><B>Static</B> &#45; Static dependencies <B>cannot</B> change without invalidating the component instance, so injected services typically do not change at run time and service departures typically result in the component instance being destroyed and potentially recreated.</LI>
73 <LI><B>Dynamic</B> &#45; Dynamic dependencies <B>can</B> change without invalidating the component instance, so injected services can change at run time, but <B>do not</B> change with respect to service priority changes (i.e., they do not automatically switch if a higher priority service appears).</LI>
74 <LI><B>Dynamic priority</B> &#45; Dynamic priority dependencies <B>can</B> change without invalidating the component instance and <B>do</B> dynamically update based on service priority rankings at run time.</LI>
75 </UL>
76 </LI>
77 </UL>
78 </LI>
79 <LI><B>Configuration property management</B> &#45; Integrated with OSGi Configuration Admin service.
80 <UL>
81 <LI><B>Member field/member method injection</B> &#45; Also supported in combination.</LI>
82 <LI><B>Service property propagation</B> &#45; Configuration properties can be configured to update service properties if the component instance is providing a service.</LI>
83 </UL>
84 </LI>
85 <LI><B>Sophisticated concurrency handling</B> &#45; Externalizes concurrency issues so that component code does not need to worry about services changing while they are in use (i.e., no locking protocol in component code).</LI>
86 <LI><B>Deferred instance creation</B> &#45; POJO instances are not created until they are actually needed, thus reducing start-up overhead.</LI>
87 <LI><B>Introspection support</B> &#45; Supports introspecting a component instance and the state of its dependencies.
88 <UL>
89 <LI>Interactive introspection is supported by an arch command for Felix' shell.</LI>
90 </UL>
91 </LI>
92 <LI><B>Extensible</B> &#45; All iPOJO features are implemented via a set of handlers, which is an extensibility mechanism open to developers by which they can support custom functionality (e.g., exporting a provided service remotely, etc.).</LI>
93</UL>
94
95
96<H2><A name="ApacheFelixiPOJOFeatureOverview-Advanced%2FExperimentalFeatures"></A>Advanced/Experimental Features</H2>
97
98<UL>
99 <LI><B>Composite model</B> &#45; iPOJO supports a flexible architectural-like model for composing services.
100 <UL>
101 <LI><B>Flexible composites</B> &#45; A composite is an abstract component implementation.
102 <UL class="alternate" type="square">
103 <LI><B>Sub-services and sub-components</B> &#45; Unlike traditional component composition, an iPOJO composite can be described in terms of services in addition to sub-components; thus sub-service implementation selection is deferred until run time.</LI>
104 <LI><B>Optional/mandatory</B> sub-services and/or sub-components.</LI>
105 <LI><B>Singular/aggregate</B> sub-services and/or sub-components.</LI>
106 </UL>
107 </LI>
108 <LI><B>Hierarchical</B> &#45; A composite component may contain other composite components.
109 <UL class="alternate" type="square">
110 <LI><B>Composite scoping</B> &#45; A composite acts as a scoping mechanism where sub-services/sub-components are not visible externally and external services are not visible internally.</LI>
111 </UL>
112 </LI>
113 <LI><B>Service dependencies</B> &#45; A composite has the full expressive capabilities of primitive components when it comes to service dependencies (see above description of service dependencies in core features).
114 <UL class="alternate" type="square">
115 <LI>For a composite, a service dependency effectively imports an external service into the composite scope from its parent composite (which may be the OSGi service registry in the root case).</LI>
116 </UL>
117 </LI>
118 <LI><B>Composite is just a component</B> &#45; Composites can be instantiated and automatically managed just like a primitive component.</LI>
119 </UL>
120 </LI>
121</UL>
122
123</TD>
124<TD class="confluenceTd" valign="top" width="20%">
125<FORM method="get" class="confluence-searchbox marginlessForm " action="http://felix.apache.org/confluence/dosearchsite.action">
126 <INPUT type="hidden" name="searchQuery.spaceKey" value="FELIX">
127 <INPUT type="text" name="searchQuery.queryString">
128 <INPUT type="submit" value="Search">
129</FORM>
130<HR>
131<H6><A name="ApacheFelixiPOJOFeatureOverview-Overview"></A><B>Overview</B></H6>
132<UL>
133 <LI><A href="http://felix.apache.org/site/apache-felix-ipojo-2.html" title="Apache Felix iPOJO-2">Home Page</A></LI>
134 <LI><A href="#" title="Apache Felix iPOJO Feature Overview">iPOJO Feature Overview</A></LI>
135 <LI><A href="http://felix.apache.org/site/download.html" title="Download">Download &amp; Install </A></LI>
136</UL>
137
138
139<H6><A name="ApacheFelixiPOJOFeatureOverview-GettingStarted"></A><B>Getting Started</B></H6>
140<UL>
141 <LI><A href="http://felix.apache.org/site/ipojo-in-10-minutes.html" title="iPOJO in 10 minutes">iPOJO in 10 minutes</A></LI>
142 <LI><A href="http://felix.apache.org/site/ipojo-hello-word-maven-based-tutorial.html" title="iPOJO Hello Word (Maven-Based) tutorial">iPOJO Hello Word &#40;Maven&#45;Based&#41; tutorial</A></LI>
143 <LI><A href="http://felix.apache.org/site/ipojo-advanced-tutorial.html" title="iPOJO Advanced Tutorial">iPOJO Advanced Tutorial</A></LI>
144</UL>
145
146
147<H6><A name="ApacheFelixiPOJOFeatureOverview-UserGuide"></A><B>User Guide</B></H6>
148<UL>
149 <LI><A href="http://felix.apache.org/site/describing-components.html" title="Describing components">Describing components</A></LI>
150 <LI><A href="http://felix.apache.org/site/how-to-use-ipojo-annotations.html" title="How to use iPOJO Annotations">How to use iPOJO Annotations</A></LI>
151 <LI><A href="http://felix.apache.org/site/ipojo-advanced-topics.html" title="iPOJO Advanced Topics">Advanced Topics</A></LI>
152 <LI><A href="http://felix.apache.org/site/ipojo-faq.html" title="iPOJO FAQ">FAQ</A></LI>
153</UL>
154
155
156<H6><A name="ApacheFelixiPOJOFeatureOverview-Tools"></A><B>Tools</B></H6>
157<UL>
158 <LI><A href="http://felix.apache.org/site/ipojo-eclipse-plug-in.html" title="iPOJO Eclipse Plug-in">iPOJO Eclipse Plug&#45;in</A></LI>
159 <LI><A href="http://felix.apache.org/site/ipojo-ant-task.html" title="iPOJO Ant Task">iPOJO Ant Task</A></LI>
160 <LI><A href="http://felix.apache.org/site/ipojo-maven-plug-in.html" title="iPOJO Maven Plug-in">iPOJO Maven Plug&#45;in</A></LI>
161 <LI><A href="http://felix.apache.org/site/ipojo-concepts-overview.html" title="iPOJO Concepts Overview">iPOJO concepts overview</A></LI>
162</UL>
163
164
165<H6><A name="ApacheFelixiPOJOFeatureOverview-DeveloperGuide"></A><B>Developer Guide</B></H6>
166<UL>
167 <LI><A href="http://felix.apache.org/site/how-to-write-your-own-handler.html" title="How to write your own handler">How to write your own handler</A></LI>
168 <LI><A href="http://felix.apache.org/site/how-to-use-ipojo-manipulation-metadata.html" title="How to use iPOJO Manipulation Metadata">How to use iPOJO Manipulation Metadata</A></LI>
169</UL>
170
171
172<H6><A name="ApacheFelixiPOJOFeatureOverview-Misc%26Contact"></A><B>Misc &amp; Contact</B></H6>
173<UL>
174 <LI><A href="http://felix.apache.org/site/apache-felix-ipojo-issuestracker.html" title="apache-felix-ipojo-issuestracker">Issues Tracker</A></LI>
175 <LI><SPAN class="nobr"><A href="http://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=FELIX&amp;title=Supported%20JVMs&amp;linkCreation=true&amp;fromPageId=82824" title="Create Page: Supported JVMs" class="createlink">Supported JVMs<SUP><IMG class="rendericon" src="http://cwiki.apache.org/confluence/images/icons/plus.gif" height="7" width="7" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
176 <LI><SPAN class="nobr"><A href="http://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=FELIX&amp;title=Supported%20OSGi%20Implementations&amp;linkCreation=true&amp;fromPageId=82824" title="Create Page: Supported OSGi Implementations" class="createlink">Supported OSGi Implementations<SUP><IMG class="rendericon" src="http://cwiki.apache.org/confluence/images/icons/plus.gif" height="7" width="7" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
177 <LI><A href="http://felix.apache.org/site/future-ideas.html" title="Future Ideas">Future Ideas</A></LI>
178 <LI><SPAN class="nobr"><A href="http://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=FELIX&amp;title=Contact&amp;linkCreation=true&amp;fromPageId=82824" title="Create Page: Contact" class="createlink">Contact<SUP><IMG class="rendericon" src="http://cwiki.apache.org/confluence/images/icons/plus.gif" height="7" width="7" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
179 <LI><A href="http://felix.apache.org/site/related-works.html" title="Related Works">Related Works</A></LI>
180 <LI><A href="http://felix.apache.org/site/article-presentations.html" title="Article & Presentations">Article &amp; Presentations</A></LI>
181</UL>
182
183
184<HR>
185<DIV class="" align="center">
186<P><SPAN class="nobr"><A href="http://cwiki.apache.org/confluence/createrssfeed.action?types=blogpost&amp;statuses=created&amp;statuses=modified&amp;spaces=FELIX&amp;labelString=iPOJO&amp;rssType=atom&amp;maxResults=10&amp;timeSpan=5&amp;publicFeed=true&amp;title=iPOJO%20Atom%20Feed" title="Stay tuned!" rel="nofollow"><IMG src="http://cwiki.apache.org/confluence/images/icons/feed-icon-32x32.png" align="absmiddle" border="0"><SUP><IMG class="rendericon" src="http://cwiki.apache.org/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"></SUP></A></SPAN></P></DIV></TD></TR></TBODY></TABLE>
187
188
189 </DIV>
190 </BODY>
191
192
193</HTML>