1 4 package com.tcsimulator; 5 6 public class QueueEvent { 7 public static final int SERVER_CRASH = 0; 8 public static final int SERVER_RESTART = 1; 9 private final int action; 10 11 public QueueEvent(int action) { 12 if (action == SERVER_CRASH || action == SERVER_RESTART) { 13 this.action = action; 14 } else { 15 throw new AssertionError ("Cannot create QueueEvent: Unrecognized action type: " + action); 16 } 17 } 18 19 public int getAction() { 20 return this.action; 21 } 22 23 } 24 | Popular Tags |