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