KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tcsimulator > QueueEvent


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

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 JavaDoc("Cannot create QueueEvent: Unrecognized action type: " + action);
16     }
17   }
18
19   public int getAction() {
20     return this.action;
21   }
22
23 }
24
Popular Tags