1 /*
2 * Loader.java
3 *
4 * Created on February 6, 2003, 4:35 AM
5 */
6
7 package com.mlw.fps.load;
8
9 import java.util.Date;
10
11 import com.mlw.fps.model.business.vo.WeaponUsage;
12
13 /*** The <code>Loader</code> interface is similar to a sax parser. The logs,
14 * stream, or whatever can be parsed. and as events ocure in the logs
15 * methods should be called.
16 *
17 * @todo Will this support streams?
18 * @author Matthew Wilson
19 */
20 public interface Loader
21 {
22 /*** Starts the parsing.
23 */
24 public void load() throws Exception;
25
26
27 /*** Method should be called after a new map has been parsed.
28 * @param date Time event occured.
29 * @param name of the map */
30 public abstract void startMap(Date date, String name);
31
32 /*** Method should be called when a player joins or
33 * switches teams.
34 *
35 * @param player name of the player.
36 * @param team name of the team.
37 * @param role name of the role.
38 */
39 public abstract void setPlayerStatus(String player, String team, String role);
40
41 /*** Method should be called after a new game has been parsed.
42 * @param date Time event occured.
43 */
44 public abstract void startGame(Date date);
45 public abstract void addWeaponUsage(String player, String weapon, WeaponUsage usage);
46 public abstract void endGame(Date date);
47
48 /*** Method should be called after a round map has been parsed.
49 * @param date Time event occured.
50 */
51 public abstract void startRound(Date date);
52 public abstract void endRound(String winningTeam, Date date);
53
54 /*** Method should be called after a new kill has been parsed.
55 * NOTE: The players and weapons need to be take care of here
56 * also.
57 * @param killer the name of the killer
58 * @param weapon the name of the weapon
59 * @param victim the name of the victim.
60 * @param date Time event occured. */
61 public abstract void addKill(Date date, String killer, String weapon, String victim);
62 }
This page was automatically generated by Maven