|
Internet Chess ToolKit v0.2.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectictk.boardgame.chess.net.ics.ICSProtocolHandler
The generic connection object. This handles logins, disconnects and chunking the server messages.
Constructor Summary | |
ICSProtocolHandler()
|
Method Summary | |
void |
addConnectionListener(ICSConnectionListener listener)
|
abstract void |
connect()
|
abstract void |
disconnect()
|
void |
dispatchConnectionEvent(ICSConnectionEvent evt)
|
ICSEventRouter |
getEventRouter()
returns the event router being used for this connetion. |
java.lang.String |
getHandle()
returns the handle that the user is logged in as. |
java.lang.String |
getHost()
gets the name of the host that you want to / or have connected to. |
java.lang.String |
getPassword()
returns the password used to login. |
int |
getPort()
gets the port number you want to / or have connected to. |
boolean |
isConnected()
is the program currently connected to the host. |
boolean |
isLagCompensated()
this is true if the connection has, or is currently set to have, lag compensation turned on for the connection. |
boolean |
isLoggedIn()
is the user currently logged into the server. |
void |
removeConnectionListener(ICSConnectionListener listener)
|
abstract void |
sendCommand(java.lang.String cmd)
|
abstract void |
sendCommand(java.lang.String cmd,
boolean echo)
|
void |
setEventRouter(ICSEventRouter router)
sets the object to do the event routing for this connection. |
void |
setHandle(java.lang.String handle)
sets the user login handle. |
void |
setHost(java.lang.String host)
set the host (server) you want to connect to. |
void |
setLagCompensation(boolean t)
sets the connection for lag compensation if t is true. |
void |
setPassword(java.lang.String password)
sets the password this user will use to connect. |
void |
setPort(int port)
sets the port number you want to connect to. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.lang.Runnable |
run |
Constructor Detail |
public ICSProtocolHandler()
Method Detail |
public void setHandle(java.lang.String handle)
public java.lang.String getHandle()
public void setPassword(java.lang.String password)
public java.lang.String getPassword()
public void setHost(java.lang.String host)
public java.lang.String getHost()
public void setPort(int port)
public int getPort()
public void setLagCompensation(boolean t)
java.lang.IllegalStateException
- if there is an active connection.public boolean isLagCompensated()
public boolean isConnected()
public boolean isLoggedIn()
public void setEventRouter(ICSEventRouter router)
public ICSEventRouter getEventRouter()
public abstract void connect() throws java.net.UnknownHostException, java.io.IOException
java.net.UnknownHostException
java.io.IOException
public abstract void disconnect()
public abstract void sendCommand(java.lang.String cmd)
public abstract void sendCommand(java.lang.String cmd, boolean echo)
public void addConnectionListener(ICSConnectionListener listener)
public void removeConnectionListener(ICSConnectionListener listener)
public void dispatchConnectionEvent(ICSConnectionEvent evt)
|
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 |