Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpnehrer2005-12-22 15:22:12 +0000
committerpnehrer2005-12-22 15:22:12 +0000
commit3dc561b619d37d336b042e387c4aca996024ccde (patch)
treefe8becf846e15b4e2ac527e68179cc583d5c87cd
parenta5451629e429b3973fde3c7bc9a3c7c4ac6cb2b6 (diff)
downloadorg.eclipse.ecf-3dc561b619d37d336b042e387c4aca996024ccde.tar.gz
org.eclipse.ecf-3dc561b619d37d336b042e387c4aca996024ccde.tar.xz
org.eclipse.ecf-3dc561b619d37d336b042e387c4aca996024ccde.zip
Exposed transactional nature of data sharing in API.
-rw-r--r--framework/bundles/org.eclipse.ecf.datashare/src/org/eclipse/ecf/datashare/Participant.java6
-rw-r--r--framework/bundles/org.eclipse.ecf.datashare/src/org/eclipse/ecf/datashare/ReceiveException.java27
2 files changed, 32 insertions, 1 deletions
diff --git a/framework/bundles/org.eclipse.ecf.datashare/src/org/eclipse/ecf/datashare/Participant.java b/framework/bundles/org.eclipse.ecf.datashare/src/org/eclipse/ecf/datashare/Participant.java
index 877860bf9..bdc118957 100644
--- a/framework/bundles/org.eclipse.ecf.datashare/src/org/eclipse/ecf/datashare/Participant.java
+++ b/framework/bundles/org.eclipse.ecf.datashare/src/org/eclipse/ecf/datashare/Participant.java
@@ -54,7 +54,11 @@ public interface Participant {
* @param data
* message (e.g., a shared data update) from another participant
*/
- void receive(Object data);
+ void receive(Object data) throws ReceiveException;
+
+ void accept();
+
+ void discard();
/**
* Notifies this participant that another participant is joining the
diff --git a/framework/bundles/org.eclipse.ecf.datashare/src/org/eclipse/ecf/datashare/ReceiveException.java b/framework/bundles/org.eclipse.ecf.datashare/src/org/eclipse/ecf/datashare/ReceiveException.java
new file mode 100644
index 000000000..48cb7131b
--- /dev/null
+++ b/framework/bundles/org.eclipse.ecf.datashare/src/org/eclipse/ecf/datashare/ReceiveException.java
@@ -0,0 +1,27 @@
+package org.eclipse.ecf.datashare;
+
+public class ReceiveException extends Exception {
+
+ private static final long serialVersionUID = -482269807774549871L;
+
+ public ReceiveException() {
+ super();
+ // TODO Auto-generated constructor stub
+ }
+
+ public ReceiveException(String arg0) {
+ super(arg0);
+ // TODO Auto-generated constructor stub
+ }
+
+ public ReceiveException(String arg0, Throwable arg1) {
+ super(arg0, arg1);
+ // TODO Auto-generated constructor stub
+ }
+
+ public ReceiveException(Throwable arg0) {
+ super(arg0);
+ // TODO Auto-generated constructor stub
+ }
+
+}

Back to the top