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/20 15:44:01 UTC

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

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






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

This page describes the Java Implementation for Event Processing.

The Java Implementation for Event Processing is an extension of the standard SCA Java Implementation model.  All the standard SCA Java implementation features continue to be available to Java implementations.  The following features are added:
* Ability to define one or more methods of the implementation class to be *{_}consumer methods{_}*, consuming one or more *{_}event types{_}*
* Ability to define a field or setter method of the implementation class as an event *{_}producer{_}*, producing one or more *{_}event types _*
* Ability to define *{_}event types{_}* as Java POJO classes

h2. Event Consumer methods

Each method of the implementation that is a consumer for events is annotated with a @Consumer annotation.  Each method must have a *{_}void{_}* return type and a single parameter that is either a specific event type or a supoerclass of one or more event types, including java.lang.Object, which is treated as the supertype of all event types.


h2. Event Producers

Event Producers are identified as a Field or as a Setter method annotated with a @Producer annotation

It is required that the Field or Setter method is typed by a Java interface.  The Java interface must have one or more methods, each of which has a *{_}void{_}* return type and a single parameter that is either a specific event type or a superclass of one or more event types, including java.lang.Object, which is treated as the supertype of all event types.


h2. Event Types

Event types are defined through Java classes that are annotated with a @EventType annotation

h2. Example Java Implementation with Consumer and Producer


h3.  

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