|
Internet Chess ToolKit v0.2.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ictk.boardgame.chess.net.ics.event.ICSEvent
A message from the server indicating something happened. All events are timestamped (with the client's receiving time). If Log.debug is true then the original server message is also stored. If Log.debug isn't true you'll save some memory overhead and the native message can be rebuilt from the appropriate parser.
Fake messages are also supported (those issued by bots but intending to emulate the server).
Field Summary | |
static int |
AUTO_SALUTE_EVENT
|
static int |
AVAIL_INFO_EVENT
|
static int |
BOARD_SAY_EVENT
|
static int |
BOARD_UPDATE_EVENT
|
static int |
CHALLENGE_EVENT
|
static int |
CHANNEL_EVENT
|
static long |
DEBUG
|
static int |
GAME_CREATED_EVENT
|
static int |
GAME_NOTIFICATION_EVENT
|
static int |
GAME_RESULT_EVENT
|
static int |
HISTORY_EVENT
|
static int |
KIBITZ_EVENT
|
static int |
MATCH_REQUEST_EVENT
|
static int |
MOVE_LIST_EVENT
|
static int |
NUM_EVENTS
|
static int |
PLAYER_CONNECTION_EVENT
|
static int |
PLAYER_NOTIFICATION_EVENT
|
static int |
QTELL_EVENT
|
static int |
SAY_EVENT
|
static int |
SEEK_AD_EVENT
|
static int |
SEEK_AD_READABLE_EVENT
|
static int |
SEEK_CLEAR_EVENT
|
static int |
SEEK_REMOVE_EVENT
|
static int |
SEEK_REMOVE_READABLE_EVENT
|
static int |
SHOUT_EVENT
|
static int |
TAKEBACK_REQUEST_EVENT
|
static int |
TELL_EVENT
|
static int |
TOURNAMENT_CHANNEL_EVENT
|
static int |
UNKNOWN_EVENT
|
static int |
USER_DEFINED_EVENT
|
static int |
WHISPER_EVENT
|
Constructor Summary | |
ICSEvent(ICSProtocolHandler server,
int eventType)
|
|
ICSEvent(int eventType)
|
Method Summary | |
java.lang.String |
DEBUG_getOriginal()
this method returns the original text that was parsed to get the the event. |
ICSEventParser |
getEventParser()
|
int |
getEventType()
returns the type of the object (for easy casting) |
java.lang.String |
getMessage()
returns a non-parseable string associated with this message, or if an error in the parsing as occured setting the message type to UNKNOWN_EVENT then this will contain the entire original event string. |
abstract java.lang.String |
getReadable()
returns a readable form of this event. |
ICSProtocolHandler |
getServer()
returns the server that originated this message |
java.util.Date |
getTimestamp()
this is the moment the event was received from the server. |
boolean |
isFake()
is this a QTell in disquise? |
void |
setEventParser(ICSEventParser parser)
|
void |
setEventType(int type)
sets the type of event this is. |
void |
setFake(boolean t)
is this a QTell in disquise? |
void |
setMessage(java.lang.String mesg)
sets a non-parseable string associated with this message, or if an error in the parsing as occured setting the message type to UNKNOWN_EVENT then this will contain the entire original event string. |
void |
setOriginal(java.lang.String s)
this method stores the original message that was parsed to create this event. |
void |
setServer(ICSProtocolHandler server)
sets the server this event originally came from |
void |
setTimestamp(java.util.Date timestamp)
sets the timestamp to the value specified. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final long DEBUG
public static final int UNKNOWN_EVENT
public static final int BOARD_UPDATE_EVENT
public static final int GAME_CREATED_EVENT
public static final int GAME_RESULT_EVENT
public static final int GAME_NOTIFICATION_EVENT
public static final int TAKEBACK_REQUEST_EVENT
public static final int CHANNEL_EVENT
public static final int SHOUT_EVENT
public static final int TOURNAMENT_CHANNEL_EVENT
public static final int TELL_EVENT
public static final int SAY_EVENT
public static final int CHALLENGE_EVENT
public static final int SEEK_AD_EVENT
public static final int SEEK_REMOVE_EVENT
public static final int SEEK_AD_READABLE_EVENT
public static final int SEEK_REMOVE_READABLE_EVENT
public static final int SEEK_CLEAR_EVENT
public static final int KIBITZ_EVENT
public static final int WHISPER_EVENT
public static final int BOARD_SAY_EVENT
public static final int QTELL_EVENT
public static final int AUTO_SALUTE_EVENT
public static final int MOVE_LIST_EVENT
public static final int MATCH_REQUEST_EVENT
public static final int PLAYER_NOTIFICATION_EVENT
public static final int AVAIL_INFO_EVENT
public static final int USER_DEFINED_EVENT
public static final int PLAYER_CONNECTION_EVENT
public static final int HISTORY_EVENT
public static final int NUM_EVENTS
Constructor Detail |
public ICSEvent(ICSProtocolHandler server, int eventType)
public ICSEvent(int eventType)
Method Detail |
public ICSProtocolHandler getServer()
public void setServer(ICSProtocolHandler server)
public int getEventType()
public void setEventType(int type)
public java.util.Date getTimestamp()
public void setTimestamp(java.util.Date timestamp)
public java.lang.String getMessage()
public void setMessage(java.lang.String mesg)
public ICSEventParser getEventParser()
public void setEventParser(ICSEventParser parser)
public void setFake(boolean t)
public boolean isFake()
public abstract java.lang.String getReadable()
public void setOriginal(java.lang.String s)
public java.lang.String DEBUG_getOriginal()
public java.lang.String toString()
|
Submit a bug or feature Visit the Website Internet Chess ToolKit is licensed under the GPL v2 . |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |