com.eriksilkensen.sudoku
Class SudokuReader

java.lang.Object
  extended by com.eriksilkensen.net.IncomingReader
      extended by com.eriksilkensen.sudoku.SudokuReader
All Implemented Interfaces:
java.lang.Runnable

public class SudokuReader
extends IncomingReader

A Sudoku-specific IncomingReader that handles all messages that come through the Server.

It handles all messages inside the handleMessage() method, which delegates the task to other private handlers. SudokuReaders may be passed an optional

Version:
04/26/07
Author:
Erik Silkensen

Field Summary
static java.lang.String BOARD_MESSAGE
           
static java.lang.String HTLM_MESSAGE
           
static java.lang.String UPDT_MESSAGE
           
 
Fields inherited from class com.eriksilkensen.net.IncomingReader
arg, client
 
Constructor Summary
SudokuReader(Client client, java.lang.String name, ChatRoom chatRoom)
          Passes along the creation of this Reader to the super class
 
Method Summary
 void handleMessage(java.lang.String message)
          Hook-method that allows the SudokuReader to intercept the message and handle it however it wants.
 
Methods inherited from class com.eriksilkensen.net.IncomingReader
getName, run
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BOARD_MESSAGE

public static final java.lang.String BOARD_MESSAGE
See Also:
Constant Field Values

UPDT_MESSAGE

public static final java.lang.String UPDT_MESSAGE
See Also:
Constant Field Values

HTLM_MESSAGE

public static final java.lang.String HTLM_MESSAGE
See Also:
Constant Field Values
Constructor Detail

SudokuReader

public SudokuReader(Client client,
                    java.lang.String name,
                    ChatRoom chatRoom)
Passes along the creation of this Reader to the super class

Parameters:
client - the Client whose reference is needed
name - the name of the person using this Reader
Method Detail

handleMessage

public void handleMessage(java.lang.String message)
Hook-method that allows the SudokuReader to intercept the message and handle it however it wants. This method is called when the IncomingReader class encounters a new message.

Overrides:
handleMessage in class IncomingReader
Parameters:
message - the message