summaryrefslogtreecommitdiffstats
path: root/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Consumer.java
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Consumer.java')
-rw-r--r--sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Consumer.java21
1 files changed, 19 insertions, 2 deletions
diff --git a/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Consumer.java b/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Consumer.java
index 1120e7ce87..a77e97bbe1 100644
--- a/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Consumer.java
+++ b/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Consumer.java
@@ -19,6 +19,7 @@
package org.apache.tuscany.sca.assembly;
import java.util.List;
+import java.util.Set;
/**
@@ -31,8 +32,24 @@ public interface Consumer extends EventTarget, Contract {
List<EventSource> getSources();
- String getOperationName();
+ // Operation related information
+ /**
+ * Adds an operation to the consumer along with a list of the accepted event types.
+ * If the event types are null, then any event type is accepted
+ */
+ void addOperation( String operationName, String eventTypes );
- void setOperationName(String operationName);
+ /**
+ * Gets the operations for this consumer, by name
+ * @return
+ */
+ Set<String> getOperations();
+
+ /**
+ * Returns the operation which handles a given event type for this consumer
+ * @param eventType - the event type name, which can be null (meaning "any event type")
+ * @return the operation which handles this event type - null if no operation handles the event type
+ */
+ String getOperationByEventType( String eventType );
}