blob: a5af7de171fe413d94af411d867ccef0313a1251 (
plain)
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
|
package alden;
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;
}
}
|