Rev 15 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 15 | Rev 73 | ||
|---|---|---|---|
| 1 | /* |
1 | /* |
| 2 | * MbPacketHandler.java |
2 | * MbPacketHandler.java |
| 3 | * |
3 | * |
| 4 | * Created on den 25 augusti 2003, 00:21 |
4 | * Created on den 25 augusti 2003, 00:21 |
| 5 | */ |
5 | */ |
| 6 | package Macbeth.System; |
6 | package Macbeth.System; |
| 7 | 7 | ||
| 8 | /** |
8 | /** |
| 9 | * Implement this interface if your class can handle |
9 | * Implement this interface if your class can handle |
| 10 | * Macbeth packets (this is not the same as receiving |
10 | * Macbeth packets (this is not the same as receiving |
| 11 | * packets - handling packets refers to the process |
11 | * packets - handling packets refers to the process |
| 12 | * or parsing them and reacting to the data found |
12 | * or parsing them and reacting to the data found |
| 13 | * in their contents, while receiving simply refers |
13 | * in their contents, while receiving simply refers |
| 14 | * to the process of taking care of an incoming packet) |
14 | * to the process of taking care of an incoming packet) |
| 15 | * @author Jimmy |
15 | * @author Jimmy |
| 16 | */ |
16 | */ |
| 17 | public interface MbPacketHandler { |
17 | public interface MbPacketHandler { |
| 18 | /** |
18 | /** |
| 19 | * Must be called before calling handlePacket. |
19 | * Must be called before calling handlePacket. |
| 20 | * If this returns false, it means that handlePacket |
20 | * If this returns false, it means that handlePacket |
| 21 | * cannot be called just yet. |
21 | * cannot be called just yet. |
| 22 | * @return True if it's OK to call handlePacket yet, False otherwise. |
22 | * @return True if it's OK to call handlePacket yet, False otherwise. |
| 23 | */ |
23 | */ |
| 24 | public boolean canHandlePacket(); |
24 | public boolean canHandlePacket(); |
| 25 | 25 | ||
| 26 | /** |
26 | /** |
| 27 | * This is called when you need to handle/parse a packet |
27 | * This is called when you need to handle/parse a packet |
| 28 | */ |
28 | */ |
| 29 | public void handlePacket(MbPacket p); |
29 | public void handlePacket(MbPacket p); |
| 30 | } |
30 | } |
| 31 | 31 | ||