Skip to main content
summaryrefslogtreecommitdiffstats
blob: 2029c72a3541474b9804e9af133955f4b777520b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*******************************************************************************
 * Copyright (c) 2010 Boeing.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     Boeing - initial API and implementation
 *******************************************************************************/
package org.eclipse.osee.framework.messaging.internal;

import org.eclipse.osee.framework.messaging.MessageID;
import org.eclipse.osee.framework.messaging.test.msg.TestMessage;

/**
 * @author Andrew M. Finkbeiner
 */
public enum TestMessages implements MessageID {
   TestTopic(true, "ABVlXX3B9UaWogL++MgA", "topic:someTopic", null),
   JMS_TOPIC(true, "ABWApt8OtWlAnz5CJXQA", "topic:test.topic.Mynewthing.removeme", TestMessage.class),
   VM_TOPIC(true, "ABWHSTHuTlQb5xWueMAA", "topic:inThisJVM", TestMessage.class),
   test(true, "ABWoNNdp0RnrO5T5bWwA", "test", null),
   test2(true, "ABWpvHZTpBTR+PhVrwgA", "test2", null),
   replyTopic(true, "ABWswvHPoR6RpnW9oGAA", "topic:someTopicThatNeedsAReply", null, true);

   private String name;
   private Class<?> clazz;
   boolean isReplyRequired;
   private String guid;

   TestMessages(boolean isTopic, String guid, String name, Class<?> clazz, boolean isReplyRequired) {
      this.guid = guid;
      this.name = name;
      this.clazz = clazz;
      this.isReplyRequired = isReplyRequired;
   }

   TestMessages(boolean isTopic, String guid, String name, Class<?> clazz) {
      this.name = name;
      this.clazz = clazz;
      this.isReplyRequired = false;
      this.guid = guid;
   }

   @Override
   public String getName() {
      return name;
   }

   @Override
   public Class<?> getSerializationClass() {
      return clazz;
   }

   @Override
   public boolean isReplyRequired() {
      return isReplyRequired;
   }

   @Override
   public String getId() {
      return guid;
   }

   @Override
   public boolean isTopic() {
      return true;
   }
}

Back to the top