Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/event/CoverageMessages.java13
-rw-r--r--plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/ResMessages.java13
-rw-r--r--plugins/org.eclipse.osee.framework.messaging.test/src/org/eclipse/osee/framework/messaging/internal/TestMessages.java18
-rw-r--r--plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/MessageID.java6
-rw-r--r--plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/SystemTopic.java9
-rw-r--r--plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ConnectionNodeActiveMq.java18
-rw-r--r--plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/services/BaseMessages.java28
-rw-r--r--plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/OteBaseMessages.java7
8 files changed, 25 insertions, 87 deletions
diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/event/CoverageMessages.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/event/CoverageMessages.java
index 28ee84399f..7a2ae0a447 100644
--- a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/event/CoverageMessages.java
+++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/event/CoverageMessages.java
@@ -9,7 +9,6 @@ public enum CoverageMessages implements MessageID {
private Class<?> clazz;
boolean isReplyRequired;
private String guid;
- private String destination;
private boolean isTopic;
CoverageMessages(boolean isTopic, String guid, String name, Class<?> clazz, boolean isReplyRequired) {
@@ -18,11 +17,6 @@ public enum CoverageMessages implements MessageID {
this.clazz = clazz;
this.isReplyRequired = isReplyRequired;
this.isTopic = isTopic;
- if (isTopic) {
- destination = "topic:" + guid;
- } else {
- destination = guid;
- }
}
@Override
@@ -41,15 +35,10 @@ public enum CoverageMessages implements MessageID {
}
@Override
- public String getGuid() {
+ public String getId() {
return guid;
}
- @Override
- public String getMessageDestination() {
- return destination;
- }
-
public boolean isTopic() {
return isTopic;
}
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 8329a0c5e9..5638063a08 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
@@ -18,7 +18,6 @@ public enum ResMessages implements MessageID {
private Class<?> clazz;
boolean isReplyRequired;
private String guid;
- private String destination;
private boolean isTopic;
ResMessages(boolean isTopic, String guid, String name, Class<?> clazz, boolean isReplyRequired) {
@@ -27,11 +26,6 @@ public enum ResMessages implements MessageID {
this.clazz = clazz;
this.isReplyRequired = isReplyRequired;
this.isTopic = isTopic;
- if (isTopic) {
- destination = "topic:" + guid;
- } else {
- destination = guid;
- }
}
@Override
@@ -50,15 +44,10 @@ public enum ResMessages implements MessageID {
}
@Override
- public String getGuid() {
+ public String getId() {
return guid;
}
- @Override
- public String getMessageDestination() {
- return destination;
- }
-
public boolean isTopic() {
return isTopic;
}
diff --git a/plugins/org.eclipse.osee.framework.messaging.test/src/org/eclipse/osee/framework/messaging/internal/TestMessages.java b/plugins/org.eclipse.osee.framework.messaging.test/src/org/eclipse/osee/framework/messaging/internal/TestMessages.java
index 87579d0ed6..0984f02557 100644
--- a/plugins/org.eclipse.osee.framework.messaging.test/src/org/eclipse/osee/framework/messaging/internal/TestMessages.java
+++ b/plugins/org.eclipse.osee.framework.messaging.test/src/org/eclipse/osee/framework/messaging/internal/TestMessages.java
@@ -24,18 +24,12 @@ public enum TestMessages implements MessageID {
private Class<?> clazz;
boolean isReplyRequired;
private String guid;
- private String destination;
TestMessages(boolean isTopic, String guid, String name, Class<?> clazz, boolean isReplyRequired){
this.guid = guid;
this.name = name;
this.clazz = clazz;
this.isReplyRequired = isReplyRequired;
- if(isTopic){
- destination = "topic:"+guid;
- } else {
- destination = guid;
- }
}
TestMessages(boolean isTopic, String guid,String name, Class<?> clazz){
@@ -43,11 +37,6 @@ public enum TestMessages implements MessageID {
this.clazz = clazz;
this.isReplyRequired = false;
this.guid = guid;
- if(isTopic){
- destination = "topic:"+guid;
- } else {
- destination = guid;
- }
}
@Override
@@ -66,15 +55,10 @@ public enum TestMessages implements MessageID {
}
@Override
- public String getGuid() {
+ public String getId() {
return guid;
}
- @Override
- public String getMessageDestination() {
- return destination;
- }
-
@Override
public boolean isTopic() {
return true;
diff --git a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/MessageID.java b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/MessageID.java
index 60cb1ae49e..ca2682cd33 100644
--- a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/MessageID.java
+++ b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/MessageID.java
@@ -5,17 +5,15 @@
*/
package org.eclipse.osee.framework.messaging;
-import org.eclipse.osee.framework.core.data.Identity;
import org.eclipse.osee.framework.core.data.Named;
/**
* @author Andrew M. Finkbeiner
*
*/
-public interface MessageID extends Named, Identity{
-
- String getMessageDestination();
+public interface MessageID extends Named {
Class<?> getSerializationClass();
boolean isReplyRequired();
boolean isTopic();
+ String getId();
}
diff --git a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/SystemTopic.java b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/SystemTopic.java
index 6852f20665..0b319e5a43 100644
--- a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/SystemTopic.java
+++ b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/SystemTopic.java
@@ -10,7 +10,7 @@ package org.eclipse.osee.framework.messaging;
*/
public enum SystemTopic implements MessageID {
- JMS_HEALTH_STATUS("topic:jms.health.status"),
+ JMS_HEALTH_STATUS("jms.health.status"),
KILL_TEST_JMS_BROKER("jms.kill.broker");
private String name;
@@ -25,11 +25,6 @@ public enum SystemTopic implements MessageID {
}
@Override
- public String getMessageDestination() {
- return name;
- }
-
- @Override
public Class<?> getSerializationClass() {
return null;
}
@@ -40,7 +35,7 @@ public enum SystemTopic implements MessageID {
}
@Override
- public String getGuid() {
+ public String getId() {
return name;
}
diff --git a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ConnectionNodeActiveMq.java b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ConnectionNodeActiveMq.java
index 398eef8b94..7291839ed7 100644
--- a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ConnectionNodeActiveMq.java
+++ b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ConnectionNodeActiveMq.java
@@ -14,7 +14,6 @@ import java.util.Map.Entry;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutorService;
import java.util.logging.Level;
-
import javax.jms.Connection;
import javax.jms.DeliveryMode;
import javax.jms.ExceptionListener;
@@ -26,7 +25,6 @@ import javax.jms.MessageProducer;
import javax.jms.Session;
import javax.jms.TemporaryTopic;
import javax.jms.Topic;
-
import org.apache.activemq.ActiveMQConnectionFactory;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.core.exception.OseeWrappedException;
@@ -166,7 +164,7 @@ class ConnectionNodeActiveMq implements ConnectionNodeFailoverSupport, MessageLi
destination = getOrCreateTopic(messageId);
MessageConsumer consumer = session.createConsumer(destination);
consumer.setMessageListener(new ActiveMqMessageListenerWrapper(activeMqUtil, replyProducer, session, listener));
- regularListeners.put(messageId.getGuid(), consumer, listener);
+ regularListeners.put(messageId.getId(), consumer, listener);
statusCallback.success();
} else {
statusCallback.fail(new OseeCoreException("This connection is not started."));
@@ -186,7 +184,7 @@ class ConnectionNodeActiveMq implements ConnectionNodeFailoverSupport, MessageLi
destination = getOrCreateTopic(messageId);
MessageConsumer consumer = session.createConsumer(destination, selector);
consumer.setMessageListener(new ActiveMqMessageListenerWrapper(activeMqUtil, replyProducer, session, listener));
- regularListeners.put(messageId.getGuid(), consumer, listener);
+ regularListeners.put(messageId.getId(), consumer, listener);
statusCallback.success();
} else {
statusCallback.fail(new OseeCoreException("This connection is not started."));
@@ -199,10 +197,10 @@ class ConnectionNodeActiveMq implements ConnectionNodeFailoverSupport, MessageLi
}
private Topic getOrCreateTopic(MessageID messageId) throws JMSException {
- Topic topic = topicCache.get(messageId.getGuid());
+ Topic topic = topicCache.get(messageId.getId());
if (topic == null) {
- topic = session.createTopic(messageId.getGuid());
- topicCache.put(messageId.getGuid(), topic);
+ topic = session.createTopic(messageId.getId());
+ topicCache.put(messageId.getId(), topic);
}
return topic;
}
@@ -224,13 +222,13 @@ class ConnectionNodeActiveMq implements ConnectionNodeFailoverSupport, MessageLi
@Override
public boolean subscribeToReply(MessageID messageId, OseeMessagingListener listener) {
- replyListeners.put(messageId.getGuid(), listener);
+ replyListeners.put(messageId.getId(), listener);
return true;
}
@Override
public void unsubscribe(MessageID messageId, OseeMessagingListener listener, OseeMessagingStatusCallback statusCallback) {
- Map<MessageConsumer, OseeMessagingListener> listeners = regularListeners.getKeyedValues(messageId.getGuid());
+ Map<MessageConsumer, OseeMessagingListener> listeners = regularListeners.getKeyedValues(messageId.getId());
List<MessageConsumer> consumersToRemove = new ArrayList<MessageConsumer>();
if (listeners != null) {
try{
@@ -253,7 +251,7 @@ class ConnectionNodeActiveMq implements ConnectionNodeFailoverSupport, MessageLi
@Override
public boolean unsubscribteToReply(MessageID messageId, OseeMessagingListener listener) {
- replyListeners.remove(messageId.getGuid());
+ replyListeners.remove(messageId.getId());
return true;
}
diff --git a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/services/BaseMessages.java b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/services/BaseMessages.java
index 6897e84e6d..36fdb21624 100644
--- a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/services/BaseMessages.java
+++ b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/services/BaseMessages.java
@@ -15,16 +15,15 @@ import org.eclipse.osee.framework.messaging.services.messages.Synch;
*
*/
public enum BaseMessages implements MessageID {
- ServiceHealth(true, "ABjyjamBQRvvAGcWpRQA", "topic:osee.message.core.ServiceHealth", ServiceHealth.class, false),
- ServiceHealthRequest(true, "ABkAHOSFQ3VUZcfzsAgA", "topic:osee.message.core.ServiceHealthRequest", ServiceHealthRequest.class, true),
- Synch(true, "ABkweOSFQ3yuZcfzsAgA", "topic:osee.message.core.ServiceHealthRequest", Synch.class, true);
+ ServiceHealth(true, "ABjyjamBQRvvAGcWpRQA", "osee.message.core.ServiceHealth", ServiceHealth.class, false),
+ ServiceHealthRequest(true, "ABkAHOSFQ3VUZcfzsAgA", "osee.message.core.ServiceHealthRequest", ServiceHealthRequest.class, true),
+ Synch(true, "ABkweOSFQ3yuZcfzsAgA", "osee.message.core.ServiceHealthRequest", Synch.class, true);
private String name;
private Class<?> clazz;
boolean isReplyRequired;
- private String guid;
- private String destination;
private boolean isTopic;
+ private String guid;
BaseMessages(boolean isTopic, String guid, String name, Class<?> clazz, boolean isReplyRequired){
this.guid = guid;
@@ -32,11 +31,6 @@ public enum BaseMessages implements MessageID {
this.clazz = clazz;
this.isReplyRequired = isReplyRequired;
this.isTopic = isTopic;
- if(isTopic){
- destination = "topic:"+guid;
- } else {
- destination = guid;
- }
}
@Override
@@ -55,16 +49,12 @@ public enum BaseMessages implements MessageID {
}
@Override
- public String getGuid() {
- return guid;
- }
-
- @Override
- public String getMessageDestination() {
- return destination;
- }
-
public boolean isTopic(){
return isTopic;
}
+
+ @Override
+ public String getId() {
+ return guid;
+ }
}
diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/OteBaseMessages.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/OteBaseMessages.java
index 1e8e266dc7..e07ee176ac 100644
--- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/OteBaseMessages.java
+++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/OteBaseMessages.java
@@ -48,15 +48,10 @@ public enum OteBaseMessages implements MessageID {
}
@Override
- public String getGuid() {
+ public String getId() {
return guid;
}
- @Override
- public String getMessageDestination() {
- return destination;
- }
-
@Override
public boolean isTopic() {
return true;

Back to the top