klaus.cs
Class KlausFreechessConnection

java.lang.Object
  extended by free.util.Connection
      extended by free.freechess.FreechessConnection
          extended by klaus.cs.KlausFreechessConnection

public class KlausFreechessConnection
extends free.freechess.FreechessConnection

FICS connection for Klaus, based on Jin implementation. This class extends the jin free.freechess.FreechessConnection class and dispatches events to where they belong.

Since:
2009-05-13
Author:
Stephan Hillebrand

Field Summary
private  ICSView parent
           
 
Fields inherited from class free.freechess.FreechessConnection
TITLES_REGEX, USERNAME_REGEX
 
Constructor Summary
KlausFreechessConnection(String uname, String pwd, ICSView view)
          Creates a new Klaus freechess connection.
 
Method Summary
protected  void handleMessage(Object lineObj)
           
protected  boolean processChannelTell(String username, String titles, int channelNumber, String message)
           
protected  boolean processCShout(String username, String titles, String message)
           
protected  boolean processShout(String username, String titles, String message)
           
 
Methods inherited from class free.freechess.FreechessConnection
createInputStream, filterLine, getIvarState, getRequestedIvarState, handleConnected, handleLoginSucceeded, isEssentialIvar, processAbortOffered, processAdjournOffered, processAnnouncement, processBSetupMode, processDeltaBoard, processDisconnection, processDrawOffered, processGameEnd, processGameInfo, processIllegalMove, processIShout, processIvarStateChanged, processKibitz, processLine, processMatchOffered, processOffer, processOfferRemoved, processPersonalTell, processPlayerCounteredTakebackOffer, processPlayerDeclined, processPlayerOffered, processPlayerOfferedTakeback, processPlayerWithdrew, processPrimaryGameChanged, processPTell, processQTell, processSayTell, processSeekAdded, processSeeksCleared, processSeeksRemoved, processSimulCurrentBoardChanged, processStoppedExamining, processStoppedObserving, processStyle12, processTakebackOffered, processTShout, processWhisper, readMessage, sendCommand, sendCommand, sendLoginSequence, setInterface, setIvarState, setStyle
 
Methods inherited from class free.util.Connection
close, connectImpl, connectionInterrupted, execRunnable, getHost, getOutputStream, getPassword, getPort, getRequestedUsername, getUsername, handleConnectingFailed, handleDisconnection, handleLoginFailed, initiateConnect, initiateLogin, isConnected, isConnecting, isLoggedIn, loginFailed, loginSucceeded
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parent

private ICSView parent
Constructor Detail

KlausFreechessConnection

public KlausFreechessConnection(String uname,
                                String pwd,
                                ICSView view)
Creates a new Klaus freechess connection.

Parameters:
uname - the user name
pwd - the password
view - the ICSView associated to this connection
Method Detail

handleMessage

protected void handleMessage(Object lineObj)
Overrides:
handleMessage in class free.freechess.FreechessConnection

processChannelTell

protected boolean processChannelTell(String username,
                                     String titles,
                                     int channelNumber,
                                     String message)
Overrides:
processChannelTell in class free.freechess.FreechessConnection

processCShout

protected boolean processCShout(String username,
                                String titles,
                                String message)
Overrides:
processCShout in class free.freechess.FreechessConnection

processShout

protected boolean processShout(String username,
                               String titles,
                               String message)
Overrides:
processShout in class free.freechess.FreechessConnection