Skip to main content
summaryrefslogtreecommitdiffstats
blob: 45fe82b320a7c2700716fa497dc351a6e5e4fadd (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
/*******************************************************************************
 * Copyright (c) 2004, 2007 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.ote.client.msg.core.internal.state;

import org.eclipse.osee.ote.client.msg.core.internal.MessageSubscription;
import org.eclipse.osee.ote.message.enums.DataType;
import org.eclipse.osee.ote.message.tool.MessageMode;

/**
 * @author Ken J. Aguilar
 */
public abstract class AbstractSubscriptionState implements ISubscriptionState {

   private final DataType type;
   private final MessageMode mode;
   private final MessageSubscription subscription;

   protected AbstractSubscriptionState(MessageSubscription subscription, DataType type, MessageMode mode) {
      this.subscription = subscription;
      this.type = type;
      this.mode = mode;
   }

   protected AbstractSubscriptionState(AbstractSubscriptionState otherState) {
      this.subscription = otherState.getSubscription();
      this.type = otherState.getMemType();
      this.mode = otherState.getMode();
   }

   @Override
   public DataType getMemType() {
      return type;
   }

   @Override
   public MessageMode getMode() {
      return mode;
   }

   protected MessageSubscription getSubscription() {
      return subscription;
   }

   @Override
   public void onCanceled() {
   }

}

Back to the top