<html>
<head>
<base href="https://wiki.asterisk.org/wiki">
<link rel="stylesheet" href="/wiki/s/en/2171/18/9/_/styles/combined.css?spaceKey=TOP&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://wiki.asterisk.org/wiki/display/TOP/Component+Base+Class">Component Base Class</a></h2>
<h4>Page <b>added</b> by <a href="https://wiki.asterisk.org/wiki/display/~beagles">Brent Eagles</a>
</h4>
<br/>
<div class="notificationGreySide">
<div class='panelMacro'><table class='warningMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/wiki/images/icons/emoticons/forbidden.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>scribbling/in progress</td></tr></table></div>
<h1><a name="ComponentBaseClass-Slidesuggestions%2Fmockup"></a>Slide suggestions/mockup </h1>
<p><font color="white"><br/>
<div class="panel" style="background-color: #7788FF;border-width: 1px;"><div class="panelHeader" style="border-bottom-width: 1px;background-color: #2022FF;"><b>Component Base Class</b></div><div class="panelContent" style="background-color: #7788FF;">
<ul>
        <li>Rationale
        <ul>
                <li>Components share a common start up and shutdown pattern.</li>
                <li>Consistency across components is difficult to maintain, especially when changes to location, replication, etc. occur.</li>
        </ul>
        </li>
        <li>Significance
        <ul>
                <li>Encapsulates most of the Ice related "boilerplate code" for Icebox services.</li>
                <li>Concrete instance of proper start up and shut down protocol.</li>
                <li>Provides some default implementation.</li>
        </ul>
        </li>
</ul>
</div></div></font><br/>
<font color="white"></font></p>
<div class="panel" style="background-color: #7788FF;border-width: 1px;"><div class="panelHeader" style="border-bottom-width: 1px;background-color: #2022FF;"><b>Component Base Class - Features</b></div><div class="panelContent" style="background-color: #7788FF;">
<ul>
        <li>Features
        <ul>
                <li>Simplifies construction and activation of main objects</li>
                <li>Simplifies registration of services with the service locator.</li>
        </ul>
        </li>
</ul>
</div></div>
<p><font color="white"></font></p>
<div class="panel" style="background-color: #7788FF;border-width: 1px;"><div class="panelHeader" style="border-bottom-width: 1px;background-color: #2022FF;"><b>Component Base Class - Anatomy (1/2)</b></div><div class="panelContent" style="background-color: #7788FF;">
<ul>
        <li>Location</li>
        <li>Method groups
        <ul>
                <li>initialization</li>
                <li>service registration</li>
                <li>replication support</li>
                <li>shutdown and cleanup</li>
        </ul>
        </li>
</ul>
</div></div>
<p><font color="white"></font></p>
<div class="panel" style="background-color: #7788FF;border-width: 1px;"><div class="panelHeader" style="border-bottom-width: 1px;background-color: #2022FF;"><b>Component Base Class - Anatomy (2/2)</b></div><div class="panelContent" style="background-color: #7788FF;">
<ul>
        <li>Default implementations
        <ul>
                <li>code snippet for setting up proxies to the locator service.</li>
        </ul>
        </li>
        <li>Abstract (pure virtual) methods.
        <ul>
                <li>createPrimaryServices()</li>
        </ul>
        </li>
</ul>
</div></div>
<h1><a name="ComponentBaseClass-Notes"></a>Notes</h1>
<h2><a name="ComponentBaseClass-Rationale"></a>Rationale</h2>
<p>Components share a common start up and shutdown pattern. </p>
<p>Consistency across components is difficult to maintain, especially when changes to location, replication, etc. occur.</p>
<h2><a name="ComponentBaseClass-Significance"></a>Significance</h2>
<p>Encapsulates most of the Ice related "boilerplate code" for Icebox services. Allowing the developer to get to the actual coding of the component sooner.</p>
<p>Concrete instance of proper start up and shut down protocol.</p>
<h2><a name="ComponentBaseClass-Features"></a>Features</h2>
<p>After building several components, it was apparent that we needed a way to get some consistency in the component initialization code. Since all of the components should perform the same operations, pretty clear patterns emerged and were encapsulated in the <b>Component Base Class</b>. In most cases, each Asterisk SCF component should contain a derived </p>
<p>The source for the component base class can be found in the ice-util-cpp repository. The header file is include/AsteriskSCF/Component/Component.h and the source file is src/Component/Component.cpp.</p>
</div>
<div id="commentsSection" class="wiki-content pageSection">
<div style="float: right;" class="grey">
<a href="https://wiki.asterisk.org/wiki/users/removespacenotification.action?spaceKey=TOP">Stop watching space</a>
<span style="padding: 0px 5px;">|</span>
<a href="https://wiki.asterisk.org/wiki/users/editmyemailsettings.action">Change email notification preferences</a>
</div>
<a href="https://wiki.asterisk.org/wiki/display/TOP/Component+Base+Class">View Online</a>
|
<a href="https://wiki.asterisk.org/wiki/display/TOP/Component+Base+Class?showComments=true&showCommentArea=true#addcomment">Add Comment</a>
</div>
</div>
</div>
</div>
</div>
</body>
</html>