summaryrefslogtreecommitdiffstats
path: root/sandbox
diff options
context:
space:
mode:
authoredwardsmj <edwardsmj@13f79535-47bb-0310-9956-ffa450edef68>2008-10-29 10:55:31 +0000
committeredwardsmj <edwardsmj@13f79535-47bb-0310-9956-ffa450edef68>2008-10-29 10:55:31 +0000
commit0d8d686b0185f5d8f16ceb85d3605c2b88c648f8 (patch)
tree3512c1be8d4d56b7d97b3e0af809349b7613a8bd /sandbox
parentc2a3cc994324cb8873562dd4c4eafe9858ecca57 (diff)
@EventTypes annotations added (as examples)
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@708868 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sandbox')
-rw-r--r--sandbox/event/samples/event-jms/src/main/java/weather/WeatherPublisher.java2
-rw-r--r--sandbox/event/samples/event-jms/src/main/java/weather/WeatherSubscriberComponent.java3
2 files changed, 4 insertions, 1 deletions
diff --git a/sandbox/event/samples/event-jms/src/main/java/weather/WeatherPublisher.java b/sandbox/event/samples/event-jms/src/main/java/weather/WeatherPublisher.java
index cdaabd9f54..c2de66e7d1 100644
--- a/sandbox/event/samples/event-jms/src/main/java/weather/WeatherPublisher.java
+++ b/sandbox/event/samples/event-jms/src/main/java/weather/WeatherPublisher.java
@@ -18,6 +18,7 @@
*/
package weather;
+import org.osoa.sca.annotations.EventTypes;
import org.osoa.sca.annotations.Remotable;
// FIXME: At the moment, we need this @Remotable to make sure all the processing
@@ -25,6 +26,7 @@ import org.osoa.sca.annotations.Remotable;
@Remotable
public interface WeatherPublisher {
+ @EventTypes("ExampleEvent")
void publishWeatherReport(String report);
}
diff --git a/sandbox/event/samples/event-jms/src/main/java/weather/WeatherSubscriberComponent.java b/sandbox/event/samples/event-jms/src/main/java/weather/WeatherSubscriberComponent.java
index 2d8d17260e..89920dc31b 100644
--- a/sandbox/event/samples/event-jms/src/main/java/weather/WeatherSubscriberComponent.java
+++ b/sandbox/event/samples/event-jms/src/main/java/weather/WeatherSubscriberComponent.java
@@ -22,7 +22,7 @@ import java.util.Date;
import org.osoa.sca.annotations.Consumer;
import org.osoa.sca.annotations.Remotable;
-
+import org.osoa.sca.annotations.EventTypes;
/**
@@ -32,6 +32,7 @@ import org.osoa.sca.annotations.Remotable;
public class WeatherSubscriberComponent {
@Consumer(name="weatherSubscriber")
+ @EventTypes("ExampleEvent")
public void onWeather(String report) {
System.out.println("Weather report received at " + new Date() + ": " + report);
}