diff options
author | Jesse Morgan <jesse@jesterpm.net> | 2011-03-05 00:33:40 +0000 |
---|---|---|
committer | Jesse Morgan <jesse@jesterpm.net> | 2011-03-05 00:33:40 +0000 |
commit | 5f27758d3a3543253019f558d8f672c5e8b71c2b (patch) | |
tree | 4a33121be9b11b9cb9584b56c99ec0c22b22d394 /src/common/PeerMessage.java | |
parent | 6a4d24f95534d05aa526eb4b057397edcfc05067 (diff) |
Changed name of alden to common
Diffstat (limited to 'src/common/PeerMessage.java')
-rw-r--r-- | src/common/PeerMessage.java | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/common/PeerMessage.java b/src/common/PeerMessage.java new file mode 100644 index 0000000..4e292b9 --- /dev/null +++ b/src/common/PeerMessage.java @@ -0,0 +1,28 @@ +package common;
+import java.io.*;
+import java.util.*;
+
+
+public class PeerMessage implements Serializable {
+ private static final long serialVersionUID = 3667108226485766929L;
+ public static final String DEFAULT_ID = "TesseractProject";
+
+ public enum Type {
+ JOIN, JOIN_RESULT, ADD_PEERS, REMOVE_PEERS, PAYLOAD, EXTRA;
+ }
+
+ public Type type;
+ public PeerInformation sender;
+ public PeerCoordinates location;
+ public ArrayList<PeerInformation> peers;
+ public CollidableObject payload;
+ public Object extra;
+ public String id;
+
+ public PeerMessage(Type type, PeerInformation sender) {
+ this.type = type;
+ this.sender = sender;
+ peers = new ArrayList<PeerInformation>();
+ this.id = DEFAULT_ID;
+ }
+}
|