Skip to Content.
Sympa Menu

notify-dpml - r1905 - in trunk/central/site/src/docs/metro/component: . lifecycle

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell at BerliOS <mcconnell AT mail.berlios.de>
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: r1905 - in trunk/central/site/src/docs/metro/component: . lifecycle
  • Date: Tue, 13 Mar 2007 05:28:21 +0100

Author: mcconnell
Date: 2007-03-13 05:28:21 +0100 (Tue, 13 Mar 2007)
New Revision: 1905

Added:
trunk/central/site/src/docs/metro/component/lifecycle/
trunk/central/site/src/docs/metro/component/lifecycle/state.xml
Removed:
trunk/central/site/src/docs/metro/component/state/
Modified:
trunk/central/site/src/docs/metro/component/navigation.xml
Log:
repackaging

Copied: trunk/central/site/src/docs/metro/component/lifecycle (from rev 1903,
trunk/central/site/src/docs/metro/component/state)

Added: trunk/central/site/src/docs/metro/component/lifecycle/state.xml
===================================================================
--- trunk/central/site/src/docs/metro/component/state/state.xml 2007-03-13
04:24:56 UTC (rev 1903)
+++ trunk/central/site/src/docs/metro/component/lifecycle/state.xml
2007-03-13 04:28:21 UTC (rev 1905)
@@ -0,0 +1,147 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<document>
+
+ <properties>
+ <author email="mcconnell AT dpml.net">Stephen McConnell</author>
+ <title>DPML Metro Component Type State Datatype</title>
+ </properties>
+
+ <body>
+
+ <section name="State Descriptor Element">
+
+ <subsection name="Description">
+
+ <p>
+ A state is an immutable datastructure that defines a collection
+ of available transitions, management operations, and possibly
+ initialization or termination triggers. Actionable features
+ of a state are exposed when the state is within the current state
path.
+ The current state path is a path composed of the current state, it's
+ parent, parent's patrent, etc. unit the root state is reached. As
+ such, any operations declared within the root state will always be
+ available where operations and/transitions in sub-states will only
+ available if the associated state is present in the state path.
+ </p>
+
+ </subsection>
+
+ <subsection name="Attributes">
+
+ <table>
+ <tr>
+ <td><tt>name</tt></td>
+ <td>The name of the state (required on sub-states).</td>
+ </tr>
+ <tr>
+ <td><tt>terminal</tt></td>
+ <td>If set to 'true' the state will be classified as a terminal
state.</td>
+ </tr>
+ </table>
+
+ </subsection>
+
+ <subsection name="Nested Elements">
+
+ <table>
+ <tr>
+ <td><tt><a href="trigger/index.html">trigger</a></tt></td>
+ <td>An initialization or termination trigger.</td>
+ </tr>
+ <tr>
+ <td><tt><a href="state.html">state</a></tt></td>
+ <td>A nested state.</td>
+ </tr>
+ <tr>
+ <td><tt><a href="transition.html">transition</a></tt></td>
+ <td>A state transition.</td>
+ </tr>
+ <tr>
+ <td><tt><a href="operation.html">operation</a></tt></td>
+ <td>A management operation.</td>
+ </tr>
+ </table>
+
+ </subsection>
+
+ </section>
+
+ <section name="Example">
+
+<source><![CDATA[
+<?xml version="1.0"?>
+
+<type xmlns="link:xsd:dpml/metro/dpml-type#1.0">
+
+ <info name="example"
+ class="net.dpml.test.ExampleComponent"
+ version="0.0.0"
+ lifestyle="thread"
+ collection="system"
+ threadsafe="unknown"/>
+
+ <services>
+ <service class="net.dpml.test.ColorManager" version="1.0.0"/>
+ </services>
+
+ <context>
+ <entry key="color" class="java.awt.Color" optional="false"/>
+ </context>
+
+ <state xmlns="link:xsd:dpml/metro/dpml-state#1.0">
+ <trigger event="initialization">
+ <transition name="init" target="available"/>
+ </trigger>
+ <state name="available">
+ <trigger event="termination">
+ <transition name="terminate" target="../terminated"/>
+ </trigger>
+ </state>
+ <state name="terminated" terminal="true"/>
+ </state>
+
+</type>
+]]></source>
+
+ </section>
+
+ <section name="Technical Note">
+
+ <subsection name="Importing a State Graph">
+
+ <p>
+ As an alternative to the above attributes and nested elements, a
+ state graph may be imported from an external source. For example, a
+ graph defining a common lifecycle model can be shared across
multiple
+ components.
+ </p>
+
+ </subsection>
+
+ <subsection name="XGraph Resource">
+
+ <p>
+ The following example demonstrates the import of a state graph
+ using the <tt>class</tt> attribute. The classname supplied must
+ be a class that has a collocated <tt>.xgraph</tt> resource. The
+ <tt>.xgraph</tt> resource is an XML file containing a state model
+ described using the same attribute and element combinanations as
+ described above.
+ </p>
+
+<pre><![CDATA[
+<c:type name="http" class="net.dpml.http.impl.HttpServerImpl"
threadsafe="true">
+ <state class="net.dpml.activity.Startable"/>
+</c:type>
+]]></pre>
+
+ </subsection>
+
+
+ </section>
+
+ </body>
+
+</document>
+

Modified: trunk/central/site/src/docs/metro/component/navigation.xml
===================================================================
--- trunk/central/site/src/docs/metro/component/navigation.xml 2007-03-13
04:25:37 UTC (rev 1904)
+++ trunk/central/site/src/docs/metro/component/navigation.xml 2007-03-13
04:28:21 UTC (rev 1905)
@@ -27,7 +27,7 @@
<menu>
<item name="Component Annotations" href="annotation/index.html"/>
<item name="Component Directives" href="directive/index.html"/>
- <item name="Lifecycle Graph" href="state/index.html"/>
+ <item name="Lifecycle Graph" href="lifecycle/index.html"/>
<item name="Packaged Profiles" href="profile/index.html"/>
</menu>





  • r1905 - in trunk/central/site/src/docs/metro/component: . lifecycle, mcconnell at BerliOS, 03/13/2007

Archive powered by MHonArc 2.6.24.

Top of Page