Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorddunne2010-05-27 11:33:34 -0400
committerddunne2010-05-27 11:33:34 -0400
commitf85a9dc603d38e83bfe20bc454868aa5e0ec7c3f (patch)
tree252511c032bd59c9497efa40701d08abd869c359 /plugins/org.eclipse.osee.framework.messaging.event.res
parent78a9b9533e7baa5f36b71af9518e0423350cb7dd (diff)
downloadorg.eclipse.osee-f85a9dc603d38e83bfe20bc454868aa5e0ec7c3f.tar.gz
org.eclipse.osee-f85a9dc603d38e83bfe20bc454868aa5e0ec7c3f.tar.xz
org.eclipse.osee-f85a9dc603d38e83bfe20bc454868aa5e0ec7c3f.zip
events
Diffstat (limited to 'plugins/org.eclipse.osee.framework.messaging.event.res')
-rw-r--r--plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/ResEventManager.java21
-rw-r--r--plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/ResMessages.java6
2 files changed, 21 insertions, 6 deletions
diff --git a/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/ResEventManager.java b/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/ResEventManager.java
index 1fc951be24..96c1d9d220 100644
--- a/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/ResEventManager.java
+++ b/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/ResEventManager.java
@@ -13,6 +13,7 @@ import org.eclipse.osee.framework.messaging.OseeMessagingListener;
import org.eclipse.osee.framework.messaging.OseeMessagingStatusCallback;
import org.eclipse.osee.framework.messaging.ReplyConnection;
import org.eclipse.osee.framework.messaging.event.res.msgs.RemoteBranchEvent1;
+import org.eclipse.osee.framework.messaging.event.res.msgs.RemoteBroadcastEvent1;
import org.eclipse.osee.framework.messaging.event.res.msgs.RemoteTransactionEvent1;
/**
@@ -66,6 +67,7 @@ public class ResEventManager implements OseeMessagingStatusCallback {
this.connectionNode = connectionNode;
connectionNode.subscribe(ResMessages.RemoteTransactionEvent1, new RemoteTransactionEvent1Listener(), instance);
connectionNode.subscribe(ResMessages.RemoteBranchEvent1, new RemoteBranchEvent1Listener(), instance);
+ connectionNode.subscribe(ResMessages.RemoteBroadcastEvent1, new RemoteBroadcastEvent1Listener(), instance);
}
public void kick(RemoteEvent remoteEvent) throws Exception {
@@ -144,4 +146,23 @@ public class ResEventManager implements OseeMessagingStatusCallback {
}
}
+ public class RemoteBroadcastEvent1Listener extends OseeMessagingListener {
+
+ public RemoteBroadcastEvent1Listener() {
+ super(RemoteBroadcastEvent1.class);
+ }
+
+ @Override
+ public void process(final Object message, Map<String, Object> headers, ReplyConnection replyConnection) {
+ RemoteBroadcastEvent1 remoteBroadcastEvent1 = (RemoteBroadcastEvent1) message;
+ System.err.println(String.format(getClass().getSimpleName() + " - received [%s]",
+ message.getClass().getSimpleName()));
+ try {
+ frameworkEventListener.onEvent(remoteBroadcastEvent1);
+ } catch (RemoteException ex) {
+ System.err.println(getClass().getSimpleName() + " - process: " + ex.getLocalizedMessage());
+ }
+ }
+ }
+
}
diff --git a/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/ResMessages.java b/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/ResMessages.java
index 1b0791f5bd..4fa51337a7 100644
--- a/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/ResMessages.java
+++ b/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/ResMessages.java
@@ -1,20 +1,14 @@
package org.eclipse.osee.framework.messaging.event.res;
import org.eclipse.osee.framework.messaging.MessageID;
-import org.eclipse.osee.framework.messaging.event.res.msgs.RemoteAttributeChange1;
-import org.eclipse.osee.framework.messaging.event.res.msgs.RemoteBasicGuidArtifact1;
import org.eclipse.osee.framework.messaging.event.res.msgs.RemoteBranchEvent1;
import org.eclipse.osee.framework.messaging.event.res.msgs.RemoteBroadcastEvent1;
-import org.eclipse.osee.framework.messaging.event.res.msgs.RemoteNetworkSender1;
import org.eclipse.osee.framework.messaging.event.res.msgs.RemoteTransactionDeletedEvent1;
import org.eclipse.osee.framework.messaging.event.res.msgs.RemoteTransactionEvent1;
public enum ResMessages implements MessageID {
- RemoteAttributeChange1(true, "Aylfa1tqjhm0dvCeWVQA", "topic:org.eclipse.osee.coverage.msgs.RemoteAttributeChange1", RemoteAttributeChange1.class, false),
- RemoteBasicGuidArtifact1(true, "Aylfa1uaknpjHWHAw8QA", "topic:org.eclipse.osee.coverage.msgs.RemoteBasicGuidArtifact1", RemoteBasicGuidArtifact1.class, false),
RemoteBranchEvent1(true, "Aylfa1wlKXIbX2gOrVgA", "topic:org.eclipse.osee.coverage.msgs.RemoteBranchEvent1", RemoteBranchEvent1.class, false),
RemoteBroadcastEvent1(true, "Aylfa1y3ZBSIGbVU3JgA", "topic:org.eclipse.osee.coverage.msgs.RemoteBroadcastEvent1", RemoteBroadcastEvent1.class, false),
- RemoteNetworkSender1(true, "Aylfa10VPjPhpdOzeLQA", "topic:org.eclipse.osee.coverage.msgs.RemoteNetworkSender1", RemoteNetworkSender1.class, false),
RemoteTransactionDeletedEvent1(true, "AISIbRbFbXOVTBRJsqQA", "topic:org.eclipse.osee.coverage.msgs.RemoteTransactionDeletedEvent1", RemoteTransactionDeletedEvent1.class, false),
RemoteTransactionEvent1(true, "AISIbRj0KGBv62x2pMAA", "topic:org.eclipse.osee.coverage.msgs.RemoteTransactionEvent1", RemoteTransactionEvent1.class, false);

Back to the top