You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by co...@apache.org on 2008/10/17 15:24:00 UTC

[CONF] Apache Tuscany: Assembly Model for Event Processing (page edited)

Assembly Model for Event Processing (TUSCANY) edited by Mike Edwards
      Page: http://cwiki.apache.org/confluence/display/TUSCANY/Assembly+Model+for+Event+Processing
   Changes: http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=99637&originalVersion=3&revisedVersion=4






Content:
---------------------------------------------------------------------

This page describes the SCA Assembly model for event processing.

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:
* 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
* 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
* 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

h2. Component Type - Event Processing Extensions

The component type of an implementation is extended to include zero or more *{_}consumer{_}* elements and zero or more *{_}producer{_}* elements:
{code}
<componentType>
        <implementation ... />?
	<service ... />*
	<reference ... />*
	<property ... />*
        <consumer name="xs:NCName" eventTypes="list of xs:QName"?/>*
	<producer name="xs:NCName" eventTypes="list of xs:QName"?/>*
</componentType>
{code}
Each consumer and each producer has a Name.  The Name must be unique amongst the names of consumers, producers, services, references of the componentType.

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.

h2. Component - Event Processing Extensions 
The component element within an SCA composite is extended to include zero or more consumer elements and zero or more producer elements.
{code}
<component ... >*
	<implementation/>
	<service ... />*
	<reference ... />*
	<property ... />*
	<consumer name="xs:NCName" source="list of xs:anyURI"? eventTypes="list of xs:QName"?>
		<filters/>*
	</consumer>
	<producer name="xs:NCName" target="list of xs:anyURI"? eventTypes="list of xs:QName"?>
	</producer>
</component>

{code}
The component consumer and producer elements configure the consumer and producer elements of the implementation as described by its component type.
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.
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.
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.

---------------------------------------------------------------------
CONFLUENCE INFORMATION
This message is automatically generated by Confluence

Unsubscribe or edit your notifications preferences
   http://cwiki.apache.org/confluence/users/viewnotifications.action

If you think it was sent incorrectly contact one of the administrators
   http://cwiki.apache.org/confluence/administrators.action

If you want more information on Confluence, or have a bug to report see
   http://www.atlassian.com/software/confluence