openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject svn commit: r883256 - in /websites/staging/openwebbeans/trunk/content: ./ openwebbeans-spi.html
Date Sat, 19 Oct 2013 07:54:57 GMT
Author: buildbot
Date: Sat Oct 19 07:54:57 2013
New Revision: 883256

Staging update by buildbot for openwebbeans

    websites/staging/openwebbeans/trunk/content/   (props changed)

Propchange: websites/staging/openwebbeans/trunk/content/
--- cms:source-revision (original)
+++ cms:source-revision Sat Oct 19 07:54:57 2013
@@ -1 +1 @@

Modified: websites/staging/openwebbeans/trunk/content/openwebbeans-spi.html
--- websites/staging/openwebbeans/trunk/content/openwebbeans-spi.html (original)
+++ websites/staging/openwebbeans/trunk/content/openwebbeans-spi.html Sat Oct 19 07:54:57
@@ -75,7 +75,47 @@
         <div id="OwbContent_" class="wiki-content">
 <h1 id="openwebbeans-spi">OpenWebBeans SPI</h1>
-<p>Coming soon...</p>
+<h3 id="what-is-an-spi">What is an SPI?</h3>
+<p>Service Provider Interface (SPI) is an API intended to be implemented
+or extended by a third party. It can be used to enable framework
+extension and  replaceable components.
+- <a href="">wikipedia</a></p>
+<h3 id="how-does-the-spi-functionality-work-in-openwebbeans">How does the SPI functionality
work in OpenWebBeans?</h3>
+<p>First off reading about <a href="openwebbeans-impl.html">OpenWebBeans Core</a>
will give you the overall idea. 
+Now as mentioned in that description the SPI is simply used to integrate other 
+frameworks with OpenWebBeans. The point of gravity for Java EE is definitely going
+towards CDI today and the SPI pattern ensures that OpenWebBeans can manage this handily.</p>
+<p>From a more technical standpoint it's nothing more then a bunch of interfaces. 
+For example a part of the SPI is the following interface:</p>
+<div class="codehilite"><pre><span class="kn">package</span> <span
class="n">org</span><span class="o">.</span><span class="na">apache</span><span
class="o">.</span><span class="na">webbeans</span><span class="o">.</span><span
class="na">spi</span><span class="o">;</span>
+<span class="cm">/**</span>
+<span class="cm">* Conversation related SPI.</span>
+<span class="cm">* @version $Rev$ $Date$</span>
+<span class="cm">*/</span>
+<span class="kd">public</span> <span class="kd">interface</span>
<span class="nc">ConversationService</span>
+<span class="o">{</span>
+    <span class="cm">/**</span>
+<span class="cm">    * Gets the current conversation id or null</span>
+<span class="cm">    * if there is no conversation.</span>
+<span class="cm">    * @return the current conversation id</span>
+<span class="cm">    */</span>
+    <span class="kd">public</span> <span class="n">String</span>
<span class="nf">getConversationId</span><span class="o">();</span>
+    <span class="cm">/**</span>
+<span class="cm">    * Gets the session id of the current session.</span>
+<span class="cm">    * @return the session id of the current user session</span>
+<span class="cm">    */</span>
+    <span class="kd">public</span> <span class="n">String</span>
<span class="nf">getConversationSessionId</span><span class="o">();</span>
+<span class="o">}</span>
+<p>After seeing this interface one can easily conclude that frameworks that want to
utilize the Conversation Id functionality must implement this interface.
+Now since this is part of the specification for JSF 2.x the JSF plugin of course implements
it and actually the JSF 1.2 plugin as well. Supporting the Conversation Id in another plugin
should be rather intuitive and this is true for the SPI in general. </p>

View raw message