org.eclipse.palamedes.gdl.connection
Class Message

java.lang.Object
  extended by org.eclipse.palamedes.gdl.connection.Message

public class Message
extends java.lang.Object

This class handles all message related transformations.

Author:
ingo

Constructor Summary
Message(java.lang.String message)
          Constructs a message object from a message string.
 
Method Summary
 java.lang.String getGameDescription()
           
 java.lang.String getMatchId()
           
 java.lang.String[] getMoves()
           
static java.lang.String[] getMoveSubstrings(java.lang.String gdl)
          This method parses a GDL string into a ExpressionList.
 int getPlayClock()
           
 java.lang.String getRole()
           
 int getStartClock()
           
 int getType()
           
 boolean hasMoves()
           
 void parseMessage(java.lang.String message)
          This method parses the message string into a message object.
 void setGameDescription(java.lang.String gameDescription)
           
 void setMatchId(java.lang.String matchId)
           
 void setMoves(java.lang.String[] moves)
           
 void setPlayClock(int playClock)
           
 void setRole(java.lang.String role)
           
 void setStartClock(int startClock)
           
 void setType(int type)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Message

public Message(java.lang.String message)
Constructs a message object from a message string.

Parameters:
message -
Method Detail

parseMessage

public void parseMessage(java.lang.String message)
This method parses the message string into a message object.

Parameters:
message -

getMoveSubstrings

public static java.lang.String[] getMoveSubstrings(java.lang.String gdl)
This method parses a GDL string into a ExpressionList. If a error occurs while parsing the result will be an empty list.

Parameters:
gdl -

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getGameDescription

public java.lang.String getGameDescription()
Returns:
the gameDescription

setGameDescription

public void setGameDescription(java.lang.String gameDescription)
Parameters:
gameDescription - the gameDescription to set

getMatchId

public java.lang.String getMatchId()
Returns:
the matchId

setMatchId

public void setMatchId(java.lang.String matchId)
Parameters:
matchId - the matchId to set

getMoves

public java.lang.String[] getMoves()
Returns:
the moves

hasMoves

public boolean hasMoves()
Returns:
whether the message contains moves or not

setMoves

public void setMoves(java.lang.String[] moves)
Parameters:
moves - the moves to set

getPlayClock

public int getPlayClock()
Returns:
the playClock

setPlayClock

public void setPlayClock(int playClock)
Parameters:
playClock - the playClock to set

getRole

public java.lang.String getRole()
Returns:
the role

setRole

public void setRole(java.lang.String role)
Parameters:
role - the role to set

getStartClock

public int getStartClock()
Returns:
the startClock

setStartClock

public void setStartClock(int startClock)
Parameters:
startClock - the startClock to set

getType

public int getType()
Returns:
the type

setType

public void setType(int type)
Parameters:
type - the type to set