diff options
Diffstat (limited to '')
-rw-r--r-- | site/trunk/site-publish/assembly-model-for-event-processing.html | 187 |
1 files changed, 187 insertions, 0 deletions
diff --git a/site/trunk/site-publish/assembly-model-for-event-processing.html b/site/trunk/site-publish/assembly-model-for-event-processing.html new file mode 100644 index 0000000000..a997b91cc4 --- /dev/null +++ b/site/trunk/site-publish/assembly-model-for-event-processing.html @@ -0,0 +1,187 @@ + +<!-- + + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE- 2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + + +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<HTML> + <HEAD> + <!-- generateKeywords macro --> + <META name="description" content="Apache Tuscany"> + <META name="keywords" content="apache, apache tuscany, tuscany, service, services, fabric, soa, service oriented architecture, sca, service component architecture, das, sdo, csa, ruby, opensource"> + <!-- generateKeywords macro end --> + + <LINK type="text/css" rel="stylesheet" href="http://tuscany.apache.org/stylesheets/default.css"> + <LINK rel="SHORTCUT ICON" href="https://cwiki.apache.org/confluence/display/TUSCANY/$images/favicon.ico"> + <TITLE>Apache Tuscany : Assembly Model for Event Processing</TITLE> + <META http-equiv="Content-Type" content="text/html;charset=UTF-8"></HEAD> + + <BODY onload="init()"> + <!-- topNav macro --> + <TABLE valign="top" border="0" cellspacing="0" cellpadding="0" width="100%" background="http://tuscany.apache.org/images/TuscanyLogoNEW_Text_120px_bg.jpg"> + <TR> + <TD valing="top" align="left"> + <A href="https://cwiki.apache.org/confluence/pages/viewpage.action?spaceKey=TUSCANY&title=$siteroot"><IMG src="http://tuscany.apache.org/images/TuscanyLogoNEW_Text_120px_bg.jpg" height="91" width="25" border="0"></A> + </TD> + <TD> + <A href="http://tuscany.apache.org/"><IMG src="http://tuscany.apache.org/images/TuscanyLogo.jpg" border="0"></A> + </TD> + + <TD width="100%"> + + </TD> + + <!-- Adds the edit page link to the top banner--> + <TD valign="bottom"> + <DIV style="padding: 2px 10px; margin: 0px;"> + <A href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=99637"> + <IMG src="http://tuscany.apache.org/images/notep_16.gif" height="16" width="16" border="0" align="absmiddle" title="Edit Page"></A> + </DIV> + </TD> + + </TR> + </TABLE> + <!-- topNav macro end --> + + <!-- breadCrumbs macro --> + <TABLE border="0" cellpadding="2" cellspacing="0" width="100%"> + <TR class="topBar"> + <TD align="left" valign="middle" class="topBarDiv" nowrap="true" width="100%"> + <A href="home.html" title="Apache Tuscany">Apache Tuscany</A> > <A href="home.html" title="Home">Home</A> > <A href="sca-overview.html" title="SCA Overview">SCA Overview</A> > <A href="sca-java.html" title="SCA Java">SCA Java</A> > <A href="java-sca-documentation-menu.html" title="Java SCA Documentation Menu">Java SCA Documentation Menu</A> > <A href="sca-java-event-processing.html" title="SCA Java Event Processing">SCA Java Event Processing</A> > <A href="" title="Assembly Model for Event Processing">Assembly Model for Event Processing</A> + </TD> + + <TD align="right" valign="middle" class="topBarDiv" align="left" nowrap="true"> + <A href="http://mail-archives.apache.org/mod_mbox/tuscany-user">User List</A> | <A href="http://mail-archives.apache.org/mod_mbox/tuscany-dev">Dev List</A> | <A href="http://issues.apache.org/jira/browse/Tuscany">Issue Tracker</A> + </TD> + </TR> + </TABLE> + <!-- breadCrumbs macro end --> + + + <TABLE border="0" cellpadding="0" width="100%" bgcolor="#FFFFFF"> + <TR> + <TD align="left" valign="top"> + + <!-- pageContent macro --> + <DIV id="PageContent"> + + <DIV class="pagecontent"> + <DIV class="wiki-content"> + <P>This page describes the SCA Assembly model for event processing.</P> + +<P>The SCA Assembly model for Event Processing is an extension of the standard SCA Assembly model. All the standard SCA Assembly model features continue to be available. The Event Processing model adds the following extensions:</P> +<UL> + <LI>Component Type is extended so that the Component Type can have zero or more <producer/> elements and zero or more <consumer/> elements, alongside <service/> and <reference/> elements</LI> + <LI>Component elements are extended so that a Component can have zero or more <consumer/> elements and zero or more <producer/> elements, which can be used to configure the consumer and producer elements of the implementation used by the Component</LI> + <LI>Component producers can be linked to component consumers in the assembly through @target attribute in the component producer elements or @source attribute in the component consumer elements</LI> +</UL> + + +<H2><A name="AssemblyModelforEventProcessing-ComponentTypeEventProcessingExtensions"></A>Component Type - Event Processing Extensions</H2> + +<P>The component type of an implementation is extended to include zero or more <B><EM>consumer</EM></B> elements and zero or more <B><EM>producer</EM></B> elements:</P> +<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent"> +<PRE class="code-java"> +<componentType> + <implementation ... />? + <service ... />* + <reference ... />* + <property ... />* + <consumer name=<SPAN class="code-quote">"xs:NCName"</SPAN> eventTypes=<SPAN class="code-quote">"list of xs:QName"</SPAN>?/>* + <producer name=<SPAN class="code-quote">"xs:NCName"</SPAN> eventTypes=<SPAN class="code-quote">"list of xs:QName"</SPAN>?/>* +</componentType> +</PRE> +</DIV></DIV> +<P>Each consumer and each producer has a Name. The Name must be unique amongst the names of consumers, producers, services, references of the componentType.</P> + +<P>Each consumer and each producer has an optional list of event types. For a producer, the list of event types indicates which event types can be produced by the producer. If no event types are listed, the producer may produce events of any type. For a consumer, the list of event types indicates which event types can be consumed by the consumer - and this list is used to filter messages received by the consumer - only events with event types that are in the list will be sent to the consumer. If no event types are listed, then all event types are consumed by the consumer.</P> + +<H2><A name="AssemblyModelforEventProcessing-ComponentEventProcessingExtensions"></A>Component - Event Processing Extensions</H2> + +<P>The component element within an SCA composite is extended to include zero or more consumer elements and zero or more producer elements.</P> +<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent"> +<PRE class="code-java"> +<component ... >* + <implementation/> + <service ... />* + <reference ... />* + <property ... />* + <consumer name=<SPAN class="code-quote">"xs:NCName"</SPAN> source=<SPAN class="code-quote">"list of xs:anyURI"</SPAN>? eventTypes=<SPAN class="code-quote">"list of xs:QName"</SPAN>?> + <filters/>* + </consumer> + <producer name=<SPAN class="code-quote">"xs:NCName"</SPAN> target=<SPAN class="code-quote">"list of xs:anyURI"</SPAN>? eventTypes=<SPAN class="code-quote">"list of xs:QName"</SPAN>?> + </producer> +</component> +</PRE> +</DIV></DIV> +<P>The component consumer and producer elements configure the consumer and producer elements of the implementation as described by its component type.<BR> +Component producer elements declare where events from the producer are sent, through the @target attribute. The target attribute lists one or more target consumers, in the form of a space separated list of the form "ComponentName/ConsumerName", where "ComponentName" is the name of a component within the same composite and "ConsumerName" is the name of a consumer on that component.</P> + +<P>Component consumer elements can declare from where the events are received by the consumer, through the @source attribute. The source attribute lists one or more source producers, in the form of a space separated list of the form "ComponentName/ProducerName", where "ComponentName" is the name of a component within the same composite and "ProducerName" is the name of a producer on that component.</P> + +<P>Both consumer and producer elements can declare a list of event types, using the @eventTypes attribute. For a producer, the list of event types indicates which event types can be produced by the producer. If no event types are listed, the producer may produce events of any type. For a consumer, the list of event types indicates which event types can be consumed by the consumer - and this list is used to filter messages received by the consumer - only events with event types that are in the list will be sent to the consumer. If no event types are listed, then all event types are consumed by the consumer.</P> + +<H2><A name="AssemblyModelforEventProcessing-ComponentDiagramincludingProducerandConsumer"></A>Component Diagram including Producer and Consumer</H2> + +<P>The following is a diagram for a component which has services, references, producers and consumers:<SPAN class="image-wrap" style=""><IMG src="assembly-model-for-event-processing.data/Component_Diagram.jpg" style="border: 0px solid black"></SPAN><BR> + </P> + +<H2><A name="AssemblyModelforEventProcessing-CompositewithProducerlinkedtoaConsumer"></A>Composite with Producer linked to a Consumer</H2> + +<P>The following diagram shows a composite with a component producer linked to a component consumer:<SPAN class="image-wrap" style=""><IMG src="assembly-model-for-event-processing.data/Producer_linked_to_Consumer.jpg" style="border: 0px solid black"></SPAN><BR> + The composite corresponding to this is:</P> +<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent"> +<PRE class="code-java"> +<composite name=<SPAN class="code-quote">"Composite_X"</SPAN>> + <component name=<SPAN class="code-quote">"Component1"</SPAN>> + <producer name=<SPAN class="code-quote">"Producer1"</SPAN> target=<SPAN class="code-quote">"Component1/Consumer1"</SPAN>/> + </component> + + <component name=<SPAN class="code-quote">"Component2"</SPAN>> + <consumer name=<SPAN class="code-quote">"Consumer1"</SPAN>/> + </component> +</composite> +</PRE> +</DIV></DIV> + </DIV> + </DIV> + </DIV> + <!-- pageContent macro end --> + + </TD> + </TR> + </TABLE> + + <!-- footer macro --> + <SCRIPT src="http://www.google-analytics.com/urchin.js" type="text/javascript"> + </SCRIPT> + <SCRIPT type="text/javascript"> + _uacct = "UA-1174707-5"; + urchinTracker(); + </SCRIPT> + + <A href="http://www.statcounter.com/" target="_blank"><IMG src="http://c26.statcounter.com/counter.php?sc_project=2619156&java=0&security=94bd7e7d&invisible=0" alt="website stats" border="0"></A> + + <DIV class="footer"> + Copyright � 2003-2012, The Apache Software Foundation </BR> + Apache Tuscany and the Apache Tuscany project logo are trademarks of The Apache Software Foundation. + </DIV> + <!-- footer macro end --> + + </BODY> +</HTML> |