|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object aigames.soccer.application.LogMessageBuilder
Class for creating log messages for observer clients.
Constructor Summary | |
LogMessageBuilder()
Class constructor - creates class instance and initiates log structure. |
Method Summary | |
void |
addBegin(java.lang.String name)
Adds to log information about player which starts game. |
void |
addError(java.lang.String who,
java.lang.String reason)
Adds to log information about error which occured during game. |
void |
addMap(int mapWidth,
int mapHeight,
int goalHeight)
Adds map informations to log. |
void |
addMove(Move m,
java.util.Date date)
Adds move to log. |
void |
addName(java.lang.String name)
Adds player name to log. |
void |
addTextElement(java.lang.String nodeName,
java.lang.String value)
Helper method, which adds text element to log. |
void |
addWinner(java.lang.String name)
Adds to log information about game winner. |
org.dom4j.Document |
getMessage()
Returns document containing entire log. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LogMessageBuilder()
Method Detail |
public void addMove(Move m, java.util.Date date)
m
- Move to add.date
- Date at which move mwas made.public void addName(java.lang.String name)
name
- Player name.public void addMap(int mapWidth, int mapHeight, int goalHeight)
mapWidth
- Field width.mapHeight
- Field height.goalHeight
- Goal height.public void addBegin(java.lang.String name)
name
- Player name.public void addWinner(java.lang.String name)
name
- public void addError(java.lang.String who, java.lang.String reason)
who
- User name which message casued error.reason
- Message explaining error cause.public void addTextElement(java.lang.String nodeName, java.lang.String value)
nodeName
- Name of the element.value
- Element value.public org.dom4j.Document getMessage()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |