summaryrefslogtreecommitdiffstats
path: root/sandbox/event/modules
diff options
context:
space:
mode:
authoredwardsmj <edwardsmj@13f79535-47bb-0310-9956-ffa450edef68>2008-10-30 14:16:33 +0000
committeredwardsmj <edwardsmj@13f79535-47bb-0310-9956-ffa450edef68>2008-10-30 14:16:33 +0000
commit9902583f830b403dfeb6928c7134f91b752c4690 (patch)
treebc43122981e5e4e6a893c0305343415e80c16662 /sandbox/event/modules
parentd66fefdff85a267a8ba8938d5be528f8a2c9e499 (diff)
Added EventTypes to Producer & Consumer (via EventSource & EventTarget interfaces) plus and EventTypes interface and implementation class
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@709165 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sandbox/event/modules')
-rw-r--r--sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Consumer.java4
-rw-r--r--sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/EventSource.java10
-rw-r--r--sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/EventTarget.java10
-rw-r--r--sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ConsumerImpl.java25
-rw-r--r--sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ProducerImpl.java17
5 files changed, 52 insertions, 14 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..f464573cdc 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
@@ -30,9 +30,5 @@ public interface Consumer extends EventTarget, Contract {
List<EventSource> getSources();
-
- String getOperationName();
-
- void setOperationName(String operationName);
}
diff --git a/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/EventSource.java b/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/EventSource.java
index 34e2644ed2..4922e1d110 100644
--- a/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/EventSource.java
+++ b/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/EventSource.java
@@ -34,4 +34,14 @@ public interface EventSource extends Base, Extensible, Cloneable {
*/
void setName(String name);
+ /**
+ * Sets the EventTypes handled by the source
+ */
+ void setEventTypes( EventTypes theEventTypes);
+
+ /**
+ * Gets the EventTypes handled by the source
+ */
+ EventTypes getEventType();
+
}
diff --git a/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/EventTarget.java b/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/EventTarget.java
index 6334013c2b..db314d4fe1 100644
--- a/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/EventTarget.java
+++ b/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/EventTarget.java
@@ -34,4 +34,14 @@ public interface EventTarget extends Base, Extensible, Cloneable {
*/
void setName(String name);
+ /**
+ * Sets the EventTypes handled by the target
+ */
+ void setEventTypes( EventTypes theEventTypes);
+
+ /**
+ * Gets the EventTypes handled by the target
+ */
+ EventTypes getEventType();
+
}
diff --git a/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ConsumerImpl.java b/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ConsumerImpl.java
index 1c17d905f1..2d61294f9f 100644
--- a/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ConsumerImpl.java
+++ b/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ConsumerImpl.java
@@ -25,6 +25,7 @@ import org.apache.tuscany.sca.assembly.Binding;
import org.apache.tuscany.sca.assembly.Callback;
import org.apache.tuscany.sca.assembly.Consumer;
import org.apache.tuscany.sca.assembly.EventSource;
+import org.apache.tuscany.sca.assembly.EventTypes;
import org.apache.tuscany.sca.interfacedef.InterfaceContract;
import org.apache.tuscany.sca.policy.PolicySet;
@@ -36,7 +37,7 @@ import org.apache.tuscany.sca.policy.PolicySet;
public class ConsumerImpl extends ContractImpl implements Consumer {
private String name;
- private String operationName;
+ private EventTypes theEventTypes = new EventTypesImpl();
private ArrayList<Binding> bindings = new ArrayList<Binding>();
private ArrayList<EventSource> sourceList = new ArrayList<EventSource>();
@@ -56,14 +57,20 @@ public class ConsumerImpl extends ContractImpl implements Consumer {
public void setName(String name) {
this.name = name;
}
-
- public String getOperationName() {
- return operationName;
- }
-
- public void setOperationName(String operationName) {
- this.operationName = operationName;
- }
+
+ /**
+ * Sets the EventTypes handled by the target
+ */
+ public void setEventTypes( EventTypes eventTypes) {
+ theEventTypes = eventTypes;
+ } // end setEventTypes
+
+ /**
+ * Gets the EventTypes handled by the target
+ */
+ public EventTypes getEventType() {
+ return theEventTypes;
+ } // end getEventType
public <B> B getBinding(Class<B> bindingClass) {
for (Binding binding : bindings) {
diff --git a/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ProducerImpl.java b/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ProducerImpl.java
index 579284d9d0..e9da467c0e 100644
--- a/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ProducerImpl.java
+++ b/sandbox/event/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ProducerImpl.java
@@ -24,6 +24,7 @@ import java.util.List;
import org.apache.tuscany.sca.assembly.Binding;
import org.apache.tuscany.sca.assembly.Callback;
import org.apache.tuscany.sca.assembly.EventTarget;
+import org.apache.tuscany.sca.assembly.EventTypes;
import org.apache.tuscany.sca.assembly.Producer;
import org.apache.tuscany.sca.interfacedef.InterfaceContract;
import org.apache.tuscany.sca.policy.PolicySet;
@@ -36,6 +37,7 @@ import org.apache.tuscany.sca.policy.PolicySet;
public class ProducerImpl extends ContractImpl implements Producer {
private String name;
+ private EventTypes theEventTypes = new EventTypesImpl();
private ArrayList<Binding> bindings = new ArrayList<Binding>();
private ArrayList<EventTarget> targets = new ArrayList<EventTarget>();
@@ -50,7 +52,20 @@ public class ProducerImpl extends ContractImpl implements Producer {
this.name = name;
}
-
+ /**
+ * Sets the EventTypes handled by the target
+ */
+ public void setEventTypes( EventTypes eventTypes) {
+ theEventTypes = eventTypes;
+ } // end setEventTypes
+
+ /**
+ * Gets the EventTypes handled by the target
+ */
+ public EventTypes getEventType() {
+ return theEventTypes;
+ } // end getEventType
+
public List<EventTarget> getTargets() {
return targets;
}