summaryrefslogtreecommitdiffstats
path: root/sandbox/event
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox/event')
-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);
}