directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Directory Server v1.5 > Codec Subsystem
Date Mon, 31 Jan 2011 04:32:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/2036/9/1/_/styles/combined.css?spaceKey=DIRxSRVx11&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://cwiki.apache.org/confluence/display/DIRxSRVx11/Codec+Subsystem">Codec
Subsystem</a></h2>
    <h4>Page  <b>added</b> by             <a href="https://cwiki.apache.org/confluence/display/~akarasulu">Alex
Karasulu</a>
    </h4>
         <br/>
    <div class="notificationGreySide">
         
<div class='panelMacro'><table class='warningMacro'><colgroup><col width='24'><col></colgroup><tr><td
valign='top'><img src="/confluence/images/icons/emoticons/forbidden.gif" width="16"
height="16" align="absmiddle" alt="" border="0"></td><td>This document at this
point represents the end state of the codec subsystem. We are presently trying to get to this
state. The point is this is where we want to be and by documenting it we can all align towards
this end state.</td></tr></table></div>

<h2><a name="CodecSubsystem-FinalConfiguration"></a>Final Configuration</h2>

<p>The codec is an extensible subsystem enabling extension for new controls and extended
operations. It hides internal implementation details as much as possible exposing a very simple
API for using it for embedding purposes. An SPI is provided for those extending it while still
exposing as little as possible, however much more is exposed by the SPI to enable pluggable
controls and extended operations.</p>

<p>The codec is naturally embedded into the client API, studio and the server. Although
we don't foresee many using the API, it helps us keep the embedding interface as small as
possible for our internal projects. Then again others may have a reason for embedding the
codec into their applications. By making this portion of the codec into a separate jar/bundle
and only depending on it in our projects, we can be certain to prevent implementation creep
into the rest of our stack.</p>

<p>The codec exposes much more in its SPI for those wanting to extend it with new controls
and extended operations. This SPI is a separate module in itself. This makes sure more implementation
details do not seep into higher levels in our project yet making sure all necessary details
are exposed to extenders.</p>

<h3><a name="CodecSubsystem-ControlandExtendedOperationModularity"></a>Control
and Extended Operation Modularity</h3>

<p>The extension mechanism uses OSGi. Control and extended operation bundles are provided
by developers and made available. If these bundles are started (via supplied configuration
parameters) they register controls and extended operations into the codec.</p>

<p>Either the entire codec will run inside an OSGi environment (future goal) or it will
use an embedded instance of Felix. Embedding Felix into the codec itself allows us to interface
with bundles that can be dynamically loaded to register their controls and extended.</p>

<p>Those wanting to extend the codec by writing new controls and extended operations
need to create two separate bundles. From this point we'll talk about controls only but the
same mechanism applies to extended operations. First an API bundle that exposes a </p>

<p>The codec top level directory is located under shared. It is a maven multiproject
having the following directory layout:</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>codec/
   core
   api
   spi
   controls/
      replication/
        api/
        impl/
      ppolicy/
        api/
        impl/
   extended/
      foo/
         api/
         impl/
      bar/ 
         api/
         impl/
</pre>
</div></div>

    </div>
    <div id="commentsSection" class="wiki-content pageSection">
       <div style="float: right;">
            <a href="https://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
       </div>
       <a href="https://cwiki.apache.org/confluence/display/DIRxSRVx11/Codec+Subsystem">View
Online</a>
           </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message